diff --git a/emailcommon/src/com/android/emailcommon/provider/Account.java b/emailcommon/src/com/android/emailcommon/provider/Account.java
index 2e4075fce..54e12e8a9 100755
--- a/emailcommon/src/com/android/emailcommon/provider/Account.java
+++ b/emailcommon/src/com/android/emailcommon/provider/Account.java
@@ -26,8 +26,6 @@ import android.content.OperationApplicationException;
import android.database.ContentObserver;
import android.database.Cursor;
import android.media.RingtoneManager;
-import android.net.ConnectivityManager;
-import android.net.NetworkInfo;
import android.net.Uri;
import android.os.Parcel;
import android.os.Parcelable;
@@ -594,33 +592,6 @@ public final class Account extends EmailContent implements Parcelable {
}
}
- /**
- * Given an account id, determine whether the account is currently prohibited from automatic
- * sync, due to roaming while the account's policy disables this
- * @param context the caller's context
- * @param accountId the account id
- * @return true if the account can't automatically sync due to roaming; false otherwise
- */
- public static boolean isAutomaticSyncDisabledByRoaming(Context context, long accountId) {
- Account account = Account.restoreAccountWithId(context, accountId);
- // Account being deleted; just return
- if (account == null) return false;
- long policyKey = account.mPolicyKey;
- // If no security policy, we're good
- if (policyKey <= 0) return false;
-
- ConnectivityManager cm =
- (ConnectivityManager)context.getSystemService(Context.CONNECTIVITY_SERVICE);
- NetworkInfo info = cm.getActiveNetworkInfo();
- // If we're not on mobile, we're good
- if (info == null || (info.getType() != ConnectivityManager.TYPE_MOBILE)) return false;
- // If we're not roaming, we're good
- if (!info.isRoaming()) return false;
- Policy policy = Policy.restorePolicyWithId(context, policyKey);
- // Account being deleted; just return
- return policy != null && policy.mRequireManualSyncWhenRoaming;
- }
-
/*
* Override this so that we can store the HostAuth's first and link them to the Account
* (non-Javadoc)
diff --git a/res/values/strings.xml b/res/values/strings.xml
index 87742f878..0717759c0 100644
--- a/res/values/strings.xml
+++ b/res/values/strings.xml
@@ -726,51 +726,11 @@
Confirm before deleting
-
- Messages
Confirm before sending
-
- Messages
-
-
- Message text size
-
-
- - Tiny text
- - Small text
- - Normal-sized text
- - Large text
- - Huge text
-
-
-
-
- - 0.8
- - 0.9
- - 1.0
- - 1.2
- - 1.5
-
-
-
- Message text size
-
- Tiny
-
- Small
-
- Normal
-
- Large
-
- Huge
-
-
getWhitelistedSenderAddresses() {
@@ -278,10 +234,6 @@ public class Preferences {
return result;
}
- String packEmailSet(HashSet set) {
- return new JSONArray(set).toString();
- }
-
/**
* Returns the last used account ID as set by {@link #setLastUsedAccountId}.
* The system makes no attempt to automatically track what is considered a "use" - clients
@@ -321,17 +273,6 @@ public class Preferences {
setBoolean(account.getEmailAddress(), REQUIRE_MANUAL_SYNC_DIALOG_SHOWN, value);
}
-
- /**
- * Get whether to show the manual sync dialog. This dialog is shown when the user is roaming,
- * connected to a mobile network, the administrator has set the RequireManualSyncWhenRoaming
- * flag to true, and the dialog has not been shown before for the supplied account.
- */
- public boolean shouldShowRequireManualSync(Context context, Account account) {
- return Account.isAutomaticSyncDisabledByRoaming(context, account.mId)
- && !getHasShownRequireManualSync(account);
- }
-
public void clear() {
mSharedPreferences.edit().clear().apply();
}
diff --git a/src/com/android/email/activity/setup/GeneralPreferences.java b/src/com/android/email/activity/setup/GeneralPreferences.java
index 6f50577a3..88b403e7d 100644
--- a/src/com/android/email/activity/setup/GeneralPreferences.java
+++ b/src/com/android/email/activity/setup/GeneralPreferences.java
@@ -39,7 +39,6 @@ public class GeneralPreferences extends PreferenceFragment implements
OnPreferenceChangeListener {
private static final String PREFERENCE_KEY_AUTO_ADVANCE = "auto_advance";
- private static final String PREFERENCE_KEY_TEXT_ZOOM = "text_zoom";
private static final String PREFERENCE_KEY_CONFIRM_DELETE = "confirm_delete";
private static final String PREFERENCE_KEY_CONFIRM_SEND = "confirm_send";
private static final String PREFERENCE_KEY_CONV_LIST_ICON = "conversation_list_icon";
@@ -47,12 +46,6 @@ public class GeneralPreferences extends PreferenceFragment implements
private MailPrefs mMailPrefs;
private Preferences mPreferences;
private ListPreference mAutoAdvance;
- /**
- * TODO: remove this when we've decided for certain that an app setting is unnecessary
- * (b/5287963)
- */
- @Deprecated
- private ListPreference mTextZoom;
private CheckBoxPreference mConfirmDelete;
private CheckBoxPreference mConfirmSend;
//private CheckBoxPreference mConvListAttachmentPreviews;
@@ -72,10 +65,6 @@ public class GeneralPreferences extends PreferenceFragment implements
// Load the preferences from an XML resource
addPreferencesFromResource(R.xml.general_preferences);
-
- final PreferenceScreen ps = getPreferenceScreen();
- // Merely hide app pref for font size until we're sure it's unnecessary (b/5287963)
- ps.removePreference(findPreference(PREFERENCE_KEY_TEXT_ZOOM));
}
@Override
@@ -103,10 +92,6 @@ public class GeneralPreferences extends PreferenceFragment implements
if (PREFERENCE_KEY_AUTO_ADVANCE.equals(key)) {
mPreferences.setAutoAdvanceDirection(mAutoAdvance.findIndexOfValue((String) newValue));
return true;
- } else if (PREFERENCE_KEY_TEXT_ZOOM.equals(key)) {
- mPreferences.setTextZoom(mTextZoom.findIndexOfValue((String) newValue));
- reloadDynamicSummaries();
- return true;
} else if (MailPrefs.PreferenceKeys.DEFAULT_REPLY_ALL.equals(key)) {
mMailPrefs.setDefaultReplyAll((Boolean) newValue);
return true;
@@ -144,12 +129,6 @@ public class GeneralPreferences extends PreferenceFragment implements
mAutoAdvance.setValueIndex(mPreferences.getAutoAdvanceDirection());
mAutoAdvance.setOnPreferenceChangeListener(this);
- mTextZoom = (ListPreference) findPreference(PREFERENCE_KEY_TEXT_ZOOM);
- if (mTextZoom != null) {
- mTextZoom.setValueIndex(mPreferences.getTextZoom());
- mTextZoom.setOnPreferenceChangeListener(this);
- }
-
final CheckBoxPreference convListIcon =
(CheckBoxPreference) findPreference(PREFERENCE_KEY_CONV_LIST_ICON);
if (convListIcon != null) {
@@ -168,27 +147,6 @@ public class GeneralPreferences extends PreferenceFragment implements
(CheckBoxPreference) findPreference(MailPrefs.PreferenceKeys.DEFAULT_REPLY_ALL);
replyAllPreference.setChecked(mMailPrefs.getDefaultReplyAll());
replyAllPreference.setOnPreferenceChangeListener(this);
-
- reloadDynamicSummaries();
- }
-
- /**
- * Reload any preference summaries that are updated dynamically
- */
- private void reloadDynamicSummaries() {
- if (mTextZoom != null) {
- int textZoomIndex = mPreferences.getTextZoom();
- // Update summary - but only load the array once
- if (mSizeSummaries == null) {
- mSizeSummaries = getActivity().getResources()
- .getTextArray(R.array.general_preference_text_zoom_summary_array);
- }
- CharSequence summary = null;
- if (textZoomIndex >= 0 && textZoomIndex < mSizeSummaries.length) {
- summary = mSizeSummaries[textZoomIndex];
- }
- mTextZoom.setSummary(summary);
- }
}
@Override
diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java
index ce887766b..33fa7f917 100644
--- a/src/com/android/email/provider/EmailProvider.java
+++ b/src/com/android/email/provider/EmailProvider.java
@@ -3458,12 +3458,6 @@ public class EmailProvider extends ContentProvider {
values.put(UIProvider.AccountColumns.SettingsColumns.AUTO_ADVANCE,
autoAdvanceToUiValue(autoAdvance));
}
- if (projectionColumns.contains(
- UIProvider.AccountColumns.SettingsColumns.MESSAGE_TEXT_SIZE)) {
- int textZoom = prefs.getTextZoom();
- values.put(UIProvider.AccountColumns.SettingsColumns.MESSAGE_TEXT_SIZE,
- textZoomToUiValue(textZoom));
- }
// Set default inbox, if we've got an inbox; otherwise, say initial sync needed
final long inboxMailboxId =
Mailbox.findMailboxOfType(context, accountId, Mailbox.TYPE_INBOX);
@@ -3569,23 +3563,6 @@ public class EmailProvider extends ContentProvider {
}
}
- private static int textZoomToUiValue(int textZoom) {
- switch(textZoom) {
- case Preferences.TEXT_ZOOM_HUGE:
- return UIProvider.MessageTextSize.HUGE;
- case Preferences.TEXT_ZOOM_LARGE:
- return UIProvider.MessageTextSize.LARGE;
- case Preferences.TEXT_ZOOM_NORMAL:
- return UIProvider.MessageTextSize.NORMAL;
- case Preferences.TEXT_ZOOM_SMALL:
- return UIProvider.MessageTextSize.SMALL;
- case Preferences.TEXT_ZOOM_TINY:
- return UIProvider.MessageTextSize.TINY;
- default:
- return UIProvider.MessageTextSize.NORMAL;
- }
- }
-
/**
* Generate a Uri string for a combined mailbox uri
* @param type the uri command type (e.g. "uimessages")
@@ -3698,10 +3675,6 @@ public class EmailProvider extends ContentProvider {
values[colPosMap.get(UIProvider.AccountColumns.SettingsColumns.AUTO_ADVANCE)] =
Integer.toString(UIProvider.AutoAdvance.NEWER);
}
- if (colPosMap.containsKey(UIProvider.AccountColumns.SettingsColumns.MESSAGE_TEXT_SIZE)) {
- values[colPosMap.get(UIProvider.AccountColumns.SettingsColumns.MESSAGE_TEXT_SIZE)] =
- Integer.toString(UIProvider.MessageTextSize.NORMAL);
- }
if (colPosMap.containsKey(UIProvider.AccountColumns.SettingsColumns.SNAP_HEADERS)) {
values[colPosMap.get(UIProvider.AccountColumns.SettingsColumns.SNAP_HEADERS)] =
Integer.toString(UIProvider.SnapHeaderValue.ALWAYS);