Keep SwitchPreference status until user makes choice in confirmation dialog.

Bug: 17062433
Change-Id: I2c52be1921e1eefa3b2b2868cc526675c9215a41
This commit is contained in:
arete
2014-08-15 12:04:48 -07:00
committed by Di Wu
parent e3bced2cda
commit 300e920f66
2 changed files with 7 additions and 2 deletions

View File

@@ -113,11 +113,13 @@ public class PrivacySettings extends SettingsPreferenceFragment implements
boolean result = false;
if (preference == mBackup) {
if (nextValue == false) {
// Don't change Switch status until user makes choice in dialog
// so return false here.
showEraseBackupDialog();
} else {
setBackupEnabled(true);
result = true;
}
result = true;
} else if (preference == mAutoRestore) {
try {
mBackupManager.setAutoRestore(nextValue);