summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/SecuritySettings.java
diff options
context:
space:
mode:
authorAndroid (Google) Code Review <android-gerrit@google.com>2009-07-31 20:18:10 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2009-07-31 20:18:10 -0700
commit12fb9066a34a99ed987494e60464158d6702d595 (patch)
tree66853cd213eb3c25f4bd14fa2fc3a70cc9e73820 /src/com/android/settings/SecuritySettings.java
parentb6f1080058a4a56f54642db62cb6c2f81cf4a502 (diff)
parent38322393a6d029349ef4ef4f80757da175029bcb (diff)
downloadpackages_apps_settings-12fb9066a34a99ed987494e60464158d6702d595.zip
packages_apps_settings-12fb9066a34a99ed987494e60464158d6702d595.tar.gz
packages_apps_settings-12fb9066a34a99ed987494e60464158d6702d595.tar.bz2
am 38322393: Merge change 9437 into donut
Merge commit '38322393a6d029349ef4ef4f80757da175029bcb' * commit '38322393a6d029349ef4ef4f80757da175029bcb': Reduce the number of keystore connections.
Diffstat (limited to 'src/com/android/settings/SecuritySettings.java')
-rw-r--r--src/com/android/settings/SecuritySettings.java15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java
index 9e5629d..6f2439c 100644
--- a/src/com/android/settings/SecuritySettings.java
+++ b/src/com/android/settings/SecuritySettings.java
@@ -236,9 +236,10 @@ public class SecuritySettings extends PreferenceActivity implements
PreferenceCategory credStoreCat = new PreferenceCategory(this);
credStoreCat.setTitle(R.string.cstor_settings_category);
root.addPreference(credStoreCat);
- credStoreCat.addPreference(mCstorHelper.createAccessCheckBox());
+ boolean i = mCstorHelper.isCstorInitialized();
+ credStoreCat.addPreference(mCstorHelper.createAccessCheckBox(i));
credStoreCat.addPreference(mCstorHelper.createSetPasswordPreference());
- credStoreCat.addPreference(mCstorHelper.createResetPreference());
+ credStoreCat.addPreference(mCstorHelper.createResetPreference(i));
return root;
}
@@ -805,12 +806,12 @@ public class SecuritySettings extends PreferenceActivity implements
mResetButton.setEnabled(enabled);
}
- private Preference createAccessCheckBox() {
+ private Preference createAccessCheckBox(boolean isInitialized) {
CheckBoxPreference pref = new CheckBoxPreference(
SecuritySettings.this);
pref.setTitle(R.string.cstor_access_title);
pref.setSummary(R.string.cstor_access_summary);
- pref.setChecked(isCstorUnlocked());
+ if (isInitialized) pref.setChecked(isCstorUnlocked());
pref.setOnPreferenceChangeListener(
new Preference.OnPreferenceChangeListener() {
public boolean onPreferenceChange(
@@ -825,7 +826,7 @@ public class SecuritySettings extends PreferenceActivity implements
return true;
}
});
- pref.setEnabled(isCstorInitialized());
+ pref.setEnabled(isInitialized);
mAccessCheckBox = pref;
return pref;
}
@@ -846,7 +847,7 @@ public class SecuritySettings extends PreferenceActivity implements
return pref;
}
- private Preference createResetPreference() {
+ private Preference createResetPreference(boolean isInitialized) {
Preference pref = new Preference(SecuritySettings.this);
pref.setTitle(R.string.cstor_reset_title);
pref.setSummary(R.string.cstor_reset_summary);
@@ -857,7 +858,7 @@ public class SecuritySettings extends PreferenceActivity implements
return true;
}
});
- pref.setEnabled(isCstorInitialized());
+ pref.setEnabled(isInitialized);
mResetButton = pref;
return pref;
}