Remove checkboxes from Email

Change-Id: Ie2338cddcf15a278622f72e4827e6b160e16912f
This commit is contained in:
Alice Yang 2013-04-25 22:13:29 -07:00
parent 81c1b3ee2f
commit 6929654a0d
3 changed files with 9 additions and 40 deletions

View File

@ -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] -->

View File

@ -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) {

View File

@ -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;