Settings changes
Bug: 8685202 Change-Id: Ica781557b91e5ed43221f6e28b9d65cbb044ea55
This commit is contained in:
parent
7ed75feb14
commit
643846abbd
|
@ -1119,10 +1119,6 @@ as <xliff:g id="filename">%s</xliff:g>.</string>
|
||||||
<!-- General preference: Description of the setting for requiring confirmation before
|
<!-- General preference: Description of the setting for requiring confirmation before
|
||||||
message deletion [CHAR LIMIT=64] -->
|
message deletion [CHAR LIMIT=64] -->
|
||||||
<string name="general_preference_confirm_delete_summary">Messages</string>
|
<string name="general_preference_confirm_delete_summary">Messages</string>
|
||||||
<!-- General preference: Label of the setting for enabling swipe-to-delete [CHAR LIMIT=32] -->
|
|
||||||
<string name="general_preference_swipe_delete_label">Swipe to delete</string>
|
|
||||||
<!-- General preference: Description of the setting for enabling swipe-to-delete [CHAR LIMIT=64] -->
|
|
||||||
<string name="general_preference_swipe_delete_summary">Delete a message in the list by swiping</string>
|
|
||||||
<!-- General preference: Label of the setting for requiring confirmation before
|
<!-- General preference: Label of the setting for requiring confirmation before
|
||||||
message sending [CHAR LIMIT=32] -->
|
message sending [CHAR LIMIT=32] -->
|
||||||
<string name="general_preference_confirm_send_label">Confirm before sending</string>
|
<string name="general_preference_confirm_send_label">Confirm before sending</string>
|
||||||
|
|
|
@ -64,11 +64,11 @@
|
||||||
android:summary="@string/general_preference_reply_all_summary" />
|
android:summary="@string/general_preference_reply_all_summary" />
|
||||||
|
|
||||||
<CheckBoxPreference
|
<CheckBoxPreference
|
||||||
android:key="conversation-list-swipe-action"
|
android:key="conversation-list-swipe"
|
||||||
android:persistent="false"
|
android:persistent="false"
|
||||||
android:defaultValue="true"
|
android:defaultValue="true"
|
||||||
android:title="@string/general_preference_swipe_delete_label"
|
android:title="@string/preference_swipe_title"
|
||||||
android:summary="@string/general_preference_swipe_delete_summary" />
|
android:summary="@string/preference_swipe_description" />
|
||||||
|
|
||||||
<PreferenceScreen
|
<PreferenceScreen
|
||||||
android:key="clear_trusted_senders"
|
android:key="clear_trusted_senders"
|
||||||
|
|
|
@ -39,7 +39,6 @@ public class GeneralPreferences extends EmailPreferenceFragment implements
|
||||||
private static final String PREFERENCE_KEY_CONFIRM_DELETE = "confirm_delete";
|
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_CONFIRM_SEND = "confirm_send";
|
||||||
private static final String PREFERENCE_KEY_CONV_LIST_ICON = "conversation_list_icon";
|
private static final String PREFERENCE_KEY_CONV_LIST_ICON = "conversation_list_icon";
|
||||||
private static final String PREFERENCE_KEY_SWIPE_DELETE = "swipe_delete";
|
|
||||||
private static final String PREFERENCE_KEY_CLEAR_TRUSTED_SENDERS = "clear_trusted_senders";
|
private static final String PREFERENCE_KEY_CLEAR_TRUSTED_SENDERS = "clear_trusted_senders";
|
||||||
|
|
||||||
private MailPrefs mMailPrefs;
|
private MailPrefs mMailPrefs;
|
||||||
|
@ -138,11 +137,8 @@ public class GeneralPreferences extends EmailPreferenceFragment implements
|
||||||
} else if (PREFERENCE_KEY_CONFIRM_SEND.equals(key)) {
|
} else if (PREFERENCE_KEY_CONFIRM_SEND.equals(key)) {
|
||||||
mPreferences.setConfirmSend(mConfirmSend.isChecked());
|
mPreferences.setConfirmSend(mConfirmSend.isChecked());
|
||||||
return true;
|
return true;
|
||||||
} else if (MailPrefs.PreferenceKeys.CONVERSATION_LIST_SWIPE_ACTION.equals(key)) {
|
} else if (MailPrefs.PreferenceKeys.CONVERSATION_LIST_SWIPE.equals(key)) {
|
||||||
mMailPrefs
|
mMailPrefs.setConversationListSwipeEnabled(mSwipeDelete.isChecked());
|
||||||
.setConversationListSwipeAction(mSwipeDelete.isChecked()
|
|
||||||
? MailPrefs.ConversationListSwipeActions.DELETE
|
|
||||||
: MailPrefs.ConversationListSwipeActions.DISABLED);
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -169,9 +165,8 @@ public class GeneralPreferences extends EmailPreferenceFragment implements
|
||||||
mConfirmDelete = (CheckBoxPreference) findPreference(PREFERENCE_KEY_CONFIRM_DELETE);
|
mConfirmDelete = (CheckBoxPreference) findPreference(PREFERENCE_KEY_CONFIRM_DELETE);
|
||||||
mConfirmSend = (CheckBoxPreference) findPreference(PREFERENCE_KEY_CONFIRM_SEND);
|
mConfirmSend = (CheckBoxPreference) findPreference(PREFERENCE_KEY_CONFIRM_SEND);
|
||||||
mSwipeDelete = (CheckBoxPreference)
|
mSwipeDelete = (CheckBoxPreference)
|
||||||
findPreference(MailPrefs.PreferenceKeys.CONVERSATION_LIST_SWIPE_ACTION);
|
findPreference(MailPrefs.PreferenceKeys.CONVERSATION_LIST_SWIPE);
|
||||||
mSwipeDelete.setChecked(MailPrefs.ConversationListSwipeActions.DELETE.equals(
|
mSwipeDelete.setChecked(mMailPrefs.getIsConversationListSwipeEnabled());
|
||||||
mMailPrefs.getConversationListSwipeAction(false)));
|
|
||||||
|
|
||||||
final CheckBoxPreference replyAllPreference =
|
final CheckBoxPreference replyAllPreference =
|
||||||
(CheckBoxPreference) findPreference(MailPrefs.PreferenceKeys.DEFAULT_REPLY_ALL);
|
(CheckBoxPreference) findPreference(MailPrefs.PreferenceKeys.DEFAULT_REPLY_ALL);
|
||||||
|
|
|
@ -111,8 +111,6 @@ import java.io.FileNotFoundException;
|
||||||
import java.io.PrintWriter;
|
import java.io.PrintWriter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
@ -297,9 +295,6 @@ public class EmailProvider extends ContentProvider {
|
||||||
// Query parameter indicating the command came from UIProvider
|
// Query parameter indicating the command came from UIProvider
|
||||||
private static final String IS_UIPROVIDER = "is_uiprovider";
|
private static final String IS_UIPROVIDER = "is_uiprovider";
|
||||||
|
|
||||||
private static final String SWIPE_DELETE = Integer.toString(Swipe.DELETE);
|
|
||||||
private static final String SWIPE_DISABLED = Integer.toString(Swipe.DISABLED);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Wrap the UriMatcher call so we can throw a runtime exception if an unknown Uri is passed in
|
* Wrap the UriMatcher call so we can throw a runtime exception if an unknown Uri is passed in
|
||||||
* @param uri the Uri to match
|
* @param uri the Uri to match
|
||||||
|
@ -2538,9 +2533,7 @@ public class EmailProvider extends ContentProvider {
|
||||||
}
|
}
|
||||||
if (projectionColumns.contains(UIProvider.AccountColumns.SettingsColumns.SWIPE)) {
|
if (projectionColumns.contains(UIProvider.AccountColumns.SettingsColumns.SWIPE)) {
|
||||||
values.put(UIProvider.AccountColumns.SettingsColumns.SWIPE,
|
values.put(UIProvider.AccountColumns.SettingsColumns.SWIPE,
|
||||||
MailPrefs.ConversationListSwipeActions.DELETE.equals(mailPrefs
|
mailPrefs.getConversationListSwipeActionInteger(false));
|
||||||
.getConversationListSwipeAction(false))
|
|
||||||
? SWIPE_DELETE : SWIPE_DISABLED);
|
|
||||||
}
|
}
|
||||||
if (projectionColumns.contains(
|
if (projectionColumns.contains(
|
||||||
UIProvider.AccountColumns.SettingsColumns.CONV_LIST_ICON)) {
|
UIProvider.AccountColumns.SettingsColumns.CONV_LIST_ICON)) {
|
||||||
|
|
|
@ -74,10 +74,8 @@ public class PreferenceMigrator extends BasePreferenceMigrator {
|
||||||
final boolean hasSwipeDelete = preferences.hasSwipeDelete();
|
final boolean hasSwipeDelete = preferences.hasSwipeDelete();
|
||||||
if (hasSwipeDelete) {
|
if (hasSwipeDelete) {
|
||||||
@SuppressWarnings("deprecation")
|
@SuppressWarnings("deprecation")
|
||||||
final String swipeAction =
|
final boolean swipeDelete = preferences.getSwipeDelete();
|
||||||
preferences.getSwipeDelete() ? MailPrefs.ConversationListSwipeActions.DELETE
|
mailPrefs.setConversationListSwipeEnabled(swipeDelete);
|
||||||
: MailPrefs.ConversationListSwipeActions.DISABLED;
|
|
||||||
mailPrefs.setConversationListSwipeAction(swipeAction);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Move folder notification settings
|
// Move folder notification settings
|
||||||
|
|
Loading…
Reference in New Issue