summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/SecuritySettings.java
diff options
context:
space:
mode:
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;
}