Make AccountSettings subclass MailPreferenceActivity
b/9566150 Change-Id: I62e0115f11761f9019a1f1ecf96de82bbbb80c3a
This commit is contained in:
parent
b63b39d03e
commit
7b9f7ff76f
@ -20,6 +20,7 @@ import android.app.Application;
|
|||||||
import android.content.Context;
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
|
|
||||||
|
import com.android.email.activity.setup.AccountSettings;
|
||||||
import com.android.email.preferences.EmailPreferenceMigrator;
|
import com.android.email.preferences.EmailPreferenceMigrator;
|
||||||
import com.android.mail.browse.ConversationMessage;
|
import com.android.mail.browse.ConversationMessage;
|
||||||
import com.android.mail.browse.InlineAttachmentViewIntentBuilder;
|
import com.android.mail.browse.InlineAttachmentViewIntentBuilder;
|
||||||
@ -28,6 +29,7 @@ import com.android.mail.browse.InlineAttachmentViewIntentBuilderCreatorHolder;
|
|||||||
import com.android.mail.preferences.BasePreferenceMigrator;
|
import com.android.mail.preferences.BasePreferenceMigrator;
|
||||||
import com.android.mail.preferences.PreferenceMigratorHolder;
|
import com.android.mail.preferences.PreferenceMigratorHolder;
|
||||||
import com.android.mail.preferences.PreferenceMigratorHolder.PreferenceMigratorCreator;
|
import com.android.mail.preferences.PreferenceMigratorHolder.PreferenceMigratorCreator;
|
||||||
|
import com.android.mail.ui.settings.PublicPreferenceActivity;
|
||||||
import com.android.mail.utils.LogTag;
|
import com.android.mail.utils.LogTag;
|
||||||
|
|
||||||
public class EmailApplication extends Application {
|
public class EmailApplication extends Application {
|
||||||
@ -58,5 +60,6 @@ public class EmailApplication extends Application {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
PublicPreferenceActivity.sPreferenceActivityClass = AccountSettings.class;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,6 @@ import android.database.Cursor;
|
|||||||
import android.net.Uri;
|
import android.net.Uri;
|
||||||
import android.os.AsyncTask;
|
import android.os.AsyncTask;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.preference.PreferenceActivity;
|
|
||||||
import android.text.SpannableString;
|
import android.text.SpannableString;
|
||||||
import android.text.TextUtils;
|
import android.text.TextUtils;
|
||||||
import android.text.method.LinkMovementMethod;
|
import android.text.method.LinkMovementMethod;
|
||||||
@ -49,6 +48,7 @@ import com.android.emailcommon.utility.IntentUtilities;
|
|||||||
import com.android.emailcommon.utility.Utility;
|
import com.android.emailcommon.utility.Utility;
|
||||||
import com.android.mail.providers.Folder;
|
import com.android.mail.providers.Folder;
|
||||||
import com.android.mail.providers.UIProvider.EditSettingsExtras;
|
import com.android.mail.providers.UIProvider.EditSettingsExtras;
|
||||||
|
import com.android.mail.ui.settings.MailPreferenceActivity;
|
||||||
import com.android.mail.utils.LogUtils;
|
import com.android.mail.utils.LogUtils;
|
||||||
import com.android.mail.utils.Utils;
|
import com.android.mail.utils.Utils;
|
||||||
import com.google.common.annotations.VisibleForTesting;
|
import com.google.common.annotations.VisibleForTesting;
|
||||||
@ -70,7 +70,7 @@ import java.util.List;
|
|||||||
* sense to use a loader for the accounts list, because it would provide better support for
|
* sense to use a loader for the accounts list, because it would provide better support for
|
||||||
* dealing with accounts being added/deleted and triggering the header reload.
|
* dealing with accounts being added/deleted and triggering the header reload.
|
||||||
*/
|
*/
|
||||||
public class AccountSettings extends PreferenceActivity implements
|
public class AccountSettings extends MailPreferenceActivity implements
|
||||||
SetupDataFragment.SetupDataContainer, SecurityRequiredDialogFragment.Callback,
|
SetupDataFragment.SetupDataContainer, SecurityRequiredDialogFragment.Callback,
|
||||||
CheckSettingsErrorDialogFragment.Callback, AccountCheckSettingsFragment.Callback,
|
CheckSettingsErrorDialogFragment.Callback, AccountCheckSettingsFragment.Callback,
|
||||||
AccountServerBaseFragment.Callback, CheckSettingsProgressDialogFragment.Callback {
|
AccountServerBaseFragment.Callback, CheckSettingsProgressDialogFragment.Callback {
|
||||||
@ -347,7 +347,8 @@ public class AccountSettings extends PreferenceActivity implements
|
|||||||
TextUtils.equals(AccountSetupIncomingFragment.class.getName(), fragmentName) ||
|
TextUtils.equals(AccountSetupIncomingFragment.class.getName(), fragmentName) ||
|
||||||
TextUtils.equals(AccountSettingsEditQuickResponsesFragment.class.getName(),
|
TextUtils.equals(AccountSettingsEditQuickResponsesFragment.class.getName(),
|
||||||
fragmentName) ||
|
fragmentName) ||
|
||||||
TextUtils.equals(DebugFragment.class.getName(), fragmentName));
|
TextUtils.equals(DebugFragment.class.getName(), fragmentName) ||
|
||||||
|
super.isValidFragment(fragmentName));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
@ -482,7 +483,7 @@ public class AccountSettings extends PreferenceActivity implements
|
|||||||
mAppPreferencesHeader.title = getText(R.string.header_label_general_preferences);
|
mAppPreferencesHeader.title = getText(R.string.header_label_general_preferences);
|
||||||
mAppPreferencesHeader.summary = null;
|
mAppPreferencesHeader.summary = null;
|
||||||
mAppPreferencesHeader.iconRes = 0;
|
mAppPreferencesHeader.iconRes = 0;
|
||||||
mAppPreferencesHeader.fragment = GeneralPreferences.class.getCanonicalName();
|
mAppPreferencesHeader.fragment = GeneralPreferences.class.getName();
|
||||||
mAppPreferencesHeader.fragmentArguments = null;
|
mAppPreferencesHeader.fragmentArguments = null;
|
||||||
}
|
}
|
||||||
return mAppPreferencesHeader;
|
return mAppPreferencesHeader;
|
||||||
|
Loading…
Reference in New Issue
Block a user