Remove checkboxes from Email
Change-Id: Ie2338cddcf15a278622f72e4827e6b160e16912f
This commit is contained in:
parent
81c1b3ee2f
commit
6929654a0d
@ -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>
|
<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] -->
|
<!-- 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] -->
|
<!-- Options to select from for whether to show checkboxes or sender images [CHAR LIMIT=50] -->
|
||||||
<string-array name="prefEntries_conversationListIconName">
|
<string-array name="prefEntries_conversationListIconName">
|
||||||
<item>Show checkbox</item>
|
<item>Show image</item>
|
||||||
<item>Show image (not working yet)</item>
|
<item>Show nothing</item>
|
||||||
<item>Show neither</item>
|
|
||||||
</string-array>
|
</string-array>
|
||||||
<!-- Description of setting for whether to show checkboxes or sender images [CHAR LIMIT=200] -->
|
<!-- 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">
|
<string-array translatable="false" name="prefValues_conversationListIcon">
|
||||||
<item>checkbox</item>
|
|
||||||
<item>senderimage</item>
|
<item>senderimage</item>
|
||||||
<item>none</item>
|
<item>none</item>
|
||||||
</string-array>
|
</string-array>
|
||||||
<!-- Dialog title for the choosing whether to show checkboxes or sender image [CHAR LIMIT=200] -->
|
<!-- 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 -->
|
<!-- Strings used for account shortcut picker -->
|
||||||
<!-- String displayed in launcher [CHAR_LIMIT=10] -->
|
<!-- String displayed in launcher [CHAR_LIMIT=10] -->
|
||||||
|
@ -56,9 +56,7 @@ public class Preferences {
|
|||||||
private static final String CONFIRM_SEND = "confirm_send";
|
private static final String CONFIRM_SEND = "confirm_send";
|
||||||
@Deprecated
|
@Deprecated
|
||||||
private static final String SWIPE_DELETE = "swipe_delete";
|
private static final String SWIPE_DELETE = "swipe_delete";
|
||||||
@Deprecated
|
private static final String CONV_LIST_ICON = "conversation_list_icons";
|
||||||
private static final String HIDE_CHECKBOXES = "hide_checkboxes";
|
|
||||||
private static final String CONV_LIST_ICON = "conversation_list_icon";
|
|
||||||
|
|
||||||
public static final int AUTO_ADVANCE_NEWER = 0;
|
public static final int AUTO_ADVANCE_NEWER = 0;
|
||||||
public static final int AUTO_ADVANCE_OLDER = 1;
|
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 int AUTO_ADVANCE_DEFAULT = AUTO_ADVANCE_OLDER;
|
||||||
private static final boolean CONFIRM_DELETE_DEFAULT = false;
|
private static final boolean CONFIRM_DELETE_DEFAULT = false;
|
||||||
private static final boolean CONFIRM_SEND_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.
|
// The following constants are used as offsets into R.array.general_preference_text_zoom_size.
|
||||||
public static final int TEXT_ZOOM_TINY = 0;
|
public static final int TEXT_ZOOM_TINY = 0;
|
||||||
@ -79,10 +75,9 @@ public class Preferences {
|
|||||||
// "normal" will be the default
|
// "normal" will be the default
|
||||||
public static final int TEXT_ZOOM_DEFAULT = TEXT_ZOOM_NORMAL;
|
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_SENDER_IMAGE = "senderimage";
|
||||||
public static final String CONV_LIST_ICON_NONE = "none";
|
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;
|
private static Preferences sPreferences;
|
||||||
|
|
||||||
@ -202,30 +197,8 @@ public class Preferences {
|
|||||||
mSharedPreferences.edit().putInt(AUTO_ADVANCE_DIRECTION, direction).apply();
|
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() {
|
public String getConversationListIcon() {
|
||||||
if (!mSharedPreferences.contains(CONV_LIST_ICON)) {
|
return mSharedPreferences.getString(CONV_LIST_ICON, CONV_LIST_ICON_SENDER_IMAGE);
|
||||||
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");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setConversationListIcon(String value) {
|
public void setConversationListIcon(String value) {
|
||||||
|
@ -2652,9 +2652,7 @@ public class EmailProvider extends ContentProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private static int convListIconToUiValue(String convListIcon) {
|
private static int convListIconToUiValue(String convListIcon) {
|
||||||
if (Preferences.CONV_LIST_ICON_CHECKBOX.equals(convListIcon)) {
|
if (Preferences.CONV_LIST_ICON_SENDER_IMAGE.equals(convListIcon)) {
|
||||||
return UIProvider.ConversationListIcon.SENDER_IMAGE;
|
|
||||||
} else if (Preferences.CONV_LIST_ICON_SENDER_IMAGE.equals(convListIcon)) {
|
|
||||||
return UIProvider.ConversationListIcon.SENDER_IMAGE;
|
return UIProvider.ConversationListIcon.SENDER_IMAGE;
|
||||||
} else if (Preferences.CONV_LIST_ICON_NONE.equals(convListIcon)) {
|
} else if (Preferences.CONV_LIST_ICON_NONE.equals(convListIcon)) {
|
||||||
return UIProvider.ConversationListIcon.NONE;
|
return UIProvider.ConversationListIcon.NONE;
|
||||||
|
Loading…
Reference in New Issue
Block a user