diff options
author | rich cannings <richc@google.com> | 2012-09-16 15:50:08 -0700 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2012-09-16 15:50:09 -0700 |
commit | d41fd604cbf557d961f48a05fa40a9afc7b7cac6 (patch) | |
tree | d18ff7c76f9aef9a40a427b9049786d37e06d043 | |
parent | 70c6e0fb33efd3ccedc5bac654296e6d556b5fd0 (diff) | |
parent | bbc3045a265238fd80547dd9bb61f6801a038886 (diff) | |
download | packages_apps_settings-d41fd604cbf557d961f48a05fa40a9afc7b7cac6.zip packages_apps_settings-d41fd604cbf557d961f48a05fa40a9afc7b7cac6.tar.gz packages_apps_settings-d41fd604cbf557d961f48a05fa40a9afc7b7cac6.tar.bz2 |
Merge "Ability to hide verification settings" into jb-mr1-dev
-rw-r--r-- | src/com/android/settings/SecuritySettings.java | 19 |
1 files changed, 13 insertions, 6 deletions
diff --git a/src/com/android/settings/SecuritySettings.java b/src/com/android/settings/SecuritySettings.java index ce59fdd..d896a68 100644 --- a/src/com/android/settings/SecuritySettings.java +++ b/src/com/android/settings/SecuritySettings.java @@ -245,12 +245,14 @@ public class SecuritySettings extends SettingsPreferenceFragment mToggleAppInstallation.setChecked(isNonMarketAppsAllowed()); // Package verification - mToggleVerifyApps = (CheckBoxPreference) findPreference(KEY_TOGGLE_VERIFY_APPLICATIONS); - if (isVerifierInstalled()) { - mToggleVerifyApps.setChecked(isVerifyAppsEnabled()); - } else { - mToggleVerifyApps.setChecked(false); - mToggleVerifyApps.setEnabled(false); + if (showVerifierSetting()) { + mToggleVerifyApps = (CheckBoxPreference) findPreference(KEY_TOGGLE_VERIFY_APPLICATIONS); + if (isVerifierInstalled()) { + mToggleVerifyApps.setChecked(isVerifyAppsEnabled()); + } else { + mToggleVerifyApps.setChecked(false); + mToggleVerifyApps.setEnabled(false); + } } mUserSelectedWidget = root.findPreference(KEY_CHOOSE_USER_SELECTED_LOCKSCREEN_WIDGET); @@ -300,6 +302,11 @@ public class SecuritySettings extends SettingsPreferenceFragment return (receivers.size() > 0) ? true : false; } + private boolean showVerifierSetting() { + return Settings.Global.getInt(getContentResolver(), + Settings.Global.PACKAGE_VERIFIER_SETTING_VISIBLE, 1) > 0; + } + private void warnAppInstallation() { // TODO: DialogFragment? mWarnInstallApps = new AlertDialog.Builder(getActivity()).setTitle( |