diff options
Diffstat (limited to 'src')
-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( |