diff options
| author | Alice Yang <alice@google.com> | 2013-04-25 22:13:29 -0700 |
|---|---|---|
| committer | Alice Yang <alice@google.com> | 2013-04-25 22:13:29 -0700 |
| commit | 6929654a0db0886821c7b161d7d0beb6ae5efb64 (patch) | |
| tree | 18420046167ed4029b82212339b686b75808485f | |
| parent | 81c1b3ee2f6e32200f1ff48e1b6466bac515ed38 (diff) | |
| download | android_packages_apps_Email-6929654a0db0886821c7b161d7d0beb6ae5efb64.tar.gz android_packages_apps_Email-6929654a0db0886821c7b161d7d0beb6ae5efb64.tar.bz2 android_packages_apps_Email-6929654a0db0886821c7b161d7d0beb6ae5efb64.zip | |
Remove checkboxes from Email
Change-Id: Ie2338cddcf15a278622f72e4827e6b160e16912f
| -rw-r--r-- | res/values/strings.xml | 12 | ||||
| -rw-r--r-- | src/com/android/email/Preferences.java | 33 | ||||
| -rw-r--r-- | src/com/android/email/provider/EmailProvider.java | 4 |
3 files changed, 9 insertions, 40 deletions
diff --git a/res/values/strings.xml b/res/values/strings.xml index 92adc598e..dae1025ed 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -1028,22 +1028,20 @@ as <xliff:g id="filename">%s</xliff:g>.</string> <string name="mailbox_settings_mailbox_sync_window_label">Days to sync</string> <!-- Settings screen, title for whether to show checkboxes or sender image or neither [CHAR LIMIT=150] --> - <string name="preference_conversation_list_icon_title">Checkbox/sender image</string> + <string name="preference_conversation_list_icon_title">Sender image</string> <!-- Options to select from for whether to show checkboxes or sender images [CHAR LIMIT=50] --> <string-array name="prefEntries_conversationListIconName"> - <item>Show checkbox</item> - <item>Show image (not working yet)</item> - <item>Show neither</item> + <item>Show image</item> + <item>Show nothing</item> </string-array> <!-- Description of setting for whether to show checkboxes or sender images [CHAR LIMIT=200] --> - <string name="preference_conversation_list_icon_summary">Choose whether to show checkboxes or sender images in conversation view</string> + <string name="preference_conversation_list_icon_summary">Choose whether to show sender images in conversation view</string> <string-array translatable="false" name="prefValues_conversationListIcon"> - <item>checkbox</item> <item>senderimage</item> <item>none</item> </string-array> <!-- Dialog title for the choosing whether to show checkboxes or sender image [CHAR LIMIT=200] --> - <string name="prefDialogTitle_conversationListIcon">Checkbox/sender image</string> + <string name="prefDialogTitle_conversationListIcon">Sender image</string> <!-- Strings used for account shortcut picker --> <!-- String displayed in launcher [CHAR_LIMIT=10] --> diff --git a/src/com/android/email/Preferences.java b/src/com/android/email/Preferences.java index 7048e730f..a9712882d 100644 --- a/src/com/android/email/Preferences.java +++ b/src/com/android/email/Preferences.java @@ -56,9 +56,7 @@ public class Preferences { private static final String CONFIRM_SEND = "confirm_send"; @Deprecated private static final String SWIPE_DELETE = "swipe_delete"; - @Deprecated - private static final String HIDE_CHECKBOXES = "hide_checkboxes"; - private static final String CONV_LIST_ICON = "conversation_list_icon"; + private static final String CONV_LIST_ICON = "conversation_list_icons"; public static final int AUTO_ADVANCE_NEWER = 0; public static final int AUTO_ADVANCE_OLDER = 1; @@ -67,8 +65,6 @@ public class Preferences { private static final int AUTO_ADVANCE_DEFAULT = AUTO_ADVANCE_OLDER; private static final boolean CONFIRM_DELETE_DEFAULT = false; private static final boolean CONFIRM_SEND_DEFAULT = false; - @Deprecated - private static final boolean HIDE_CHECKBOXES_DEFAULT = false; // The following constants are used as offsets into R.array.general_preference_text_zoom_size. public static final int TEXT_ZOOM_TINY = 0; @@ -79,10 +75,9 @@ public class Preferences { // "normal" will be the default public static final int TEXT_ZOOM_DEFAULT = TEXT_ZOOM_NORMAL; - public static final String CONV_LIST_ICON_CHECKBOX = "checkbox"; public static final String CONV_LIST_ICON_SENDER_IMAGE = "senderimage"; public static final String CONV_LIST_ICON_NONE = "none"; - public static final String CONV_LIST_ICON_DEFAULT = CONV_LIST_ICON_CHECKBOX; + public static final String CONV_LIST_ICON_DEFAULT = CONV_LIST_ICON_SENDER_IMAGE; private static Preferences sPreferences; @@ -202,30 +197,8 @@ public class Preferences { mSharedPreferences.edit().putInt(AUTO_ADVANCE_DIRECTION, direction).apply(); } - /** @deprecated Only used for migration */ - @Deprecated - private boolean hasHideCheckboxes() { - return mSharedPreferences.contains(HIDE_CHECKBOXES); - } - - /** @deprecated Only used for migration */ - @Deprecated - private boolean getHideCheckboxes() { - return mSharedPreferences.getBoolean(HIDE_CHECKBOXES, HIDE_CHECKBOXES_DEFAULT); - } - public String getConversationListIcon() { - if (!mSharedPreferences.contains(CONV_LIST_ICON)) { - if (hasHideCheckboxes()) { - // Migrate to new settings - if (getHideCheckboxes()) { - setConversationListIcon(CONV_LIST_ICON_NONE); - } else { - setConversationListIcon(CONV_LIST_ICON_CHECKBOX); - } - } - } - return mSharedPreferences.getString(CONV_LIST_ICON, "checkbox"); + return mSharedPreferences.getString(CONV_LIST_ICON, CONV_LIST_ICON_SENDER_IMAGE); } public void setConversationListIcon(String value) { diff --git a/src/com/android/email/provider/EmailProvider.java b/src/com/android/email/provider/EmailProvider.java index 07358c452..c4c767039 100644 --- a/src/com/android/email/provider/EmailProvider.java +++ b/src/com/android/email/provider/EmailProvider.java @@ -2652,9 +2652,7 @@ public class EmailProvider extends ContentProvider { } private static int convListIconToUiValue(String convListIcon) { - if (Preferences.CONV_LIST_ICON_CHECKBOX.equals(convListIcon)) { - return UIProvider.ConversationListIcon.SENDER_IMAGE; - } else if (Preferences.CONV_LIST_ICON_SENDER_IMAGE.equals(convListIcon)) { + if (Preferences.CONV_LIST_ICON_SENDER_IMAGE.equals(convListIcon)) { return UIProvider.ConversationListIcon.SENDER_IMAGE; } else if (Preferences.CONV_LIST_ICON_NONE.equals(convListIcon)) { return UIProvider.ConversationListIcon.NONE; |
