summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/PrivacySettings.java
diff options
context:
space:
mode:
authorChristopher Tate <ctate@google.com>2011-08-12 17:22:41 -0700
committerChristopher Tate <ctate@google.com>2011-08-12 17:22:41 -0700
commitfac0ea781f0c99a446ab6588006b2ac0330cb774 (patch)
tree9f5c5c62e4ff00168a665d50332816a8caccb3ea /src/com/android/settings/PrivacySettings.java
parentd57df23021af08277fc5f0baccdb304115387d07 (diff)
downloadpackages_apps_settings-fac0ea781f0c99a446ab6588006b2ac0330cb774.zip
packages_apps_settings-fac0ea781f0c99a446ab6588006b2ac0330cb774.tar.gz
packages_apps_settings-fac0ea781f0c99a446ab6588006b2ac0330cb774.tar.bz2
Move the desktop backup pw from "Backup and reset" to "Developer" settings
Addresses bug 5136161 Change-Id: Ia26258e0c8b0378184e4bac32a5da47de5da686f
Diffstat (limited to 'src/com/android/settings/PrivacySettings.java')
-rw-r--r--src/com/android/settings/PrivacySettings.java32
1 files changed, 5 insertions, 27 deletions
diff --git a/src/com/android/settings/PrivacySettings.java b/src/com/android/settings/PrivacySettings.java
index 6759500..3f3b9ad 100644
--- a/src/com/android/settings/PrivacySettings.java
+++ b/src/com/android/settings/PrivacySettings.java
@@ -43,13 +43,11 @@ public class PrivacySettings extends SettingsPreferenceFragment implements
private static final String BACKUP_DATA = "backup_data";
private static final String AUTO_RESTORE = "auto_restore";
private static final String CONFIGURE_ACCOUNT = "configure_account";
- private static final String LOCAL_BACKUP_PASSWORD = "local_backup_password";
private IBackupManager mBackupManager;
private CheckBoxPreference mBackup;
private CheckBoxPreference mAutoRestore;
private Dialog mConfirmDialog;
private PreferenceScreen mConfigure;
- private PreferenceScreen mPassword;
private static final int DIALOG_ERASE_BACKUP = 2;
private int mDialogType;
@@ -66,7 +64,6 @@ public class PrivacySettings extends SettingsPreferenceFragment implements
mBackup = (CheckBoxPreference) screen.findPreference(BACKUP_DATA);
mAutoRestore = (CheckBoxPreference) screen.findPreference(AUTO_RESTORE);
mConfigure = (PreferenceScreen) screen.findPreference(CONFIGURE_ACCOUNT);
- mPassword = (PreferenceScreen) screen.findPreference(LOCAL_BACKUP_PASSWORD);
// Vendor specific
if (getActivity().getPackageManager().
@@ -104,16 +101,11 @@ public class PrivacySettings extends SettingsPreferenceFragment implements
setBackupEnabled(true);
}
} else if (preference == mAutoRestore) {
- IBackupManager bm = IBackupManager.Stub.asInterface(
- ServiceManager.getService(Context.BACKUP_SERVICE));
- if (bm != null) {
- // TODO: disable via the backup manager interface
- boolean curState = mAutoRestore.isChecked();
- try {
- bm.setAutoRestore(curState);
- } catch (RemoteException e) {
- mAutoRestore.setChecked(!curState);
- }
+ boolean curState = mAutoRestore.isChecked();
+ try {
+ mBackupManager.setAutoRestore(curState);
+ } catch (RemoteException e) {
+ mAutoRestore.setChecked(!curState);
}
}
return super.onPreferenceTreeClick(preferenceScreen, preference);
@@ -161,8 +153,6 @@ public class PrivacySettings extends SettingsPreferenceFragment implements
mConfigure.setEnabled(configureEnabled);
mConfigure.setIntent(configIntent);
setConfigureSummary(configSummary);
-
- updatePasswordSummary();
}
private void setConfigureSummary(String summary) {
@@ -183,18 +173,6 @@ public class PrivacySettings extends SettingsPreferenceFragment implements
}
}
- private void updatePasswordSummary() {
- try {
- if (mBackupManager.hasBackupPassword()) {
- mPassword.setSummary(R.string.local_backup_password_summary_change);
- } else {
- mPassword.setSummary(R.string.local_backup_password_summary_none);
- }
- } catch (RemoteException e) {
- // Not much we can do here
- }
- }
-
public void onClick(DialogInterface dialog, int which) {
if (which == DialogInterface.BUTTON_POSITIVE) {
//updateProviders();