Developer setting to skip Package Verification
Add a developer setting to skip package verification when installing over USB/ADB/ADT, but still perform package verification on all other installs. This change also fixes visibility issues. Namely, now all "Verify apps" related settings will disappear when Settings.Global.PACKAGE_VERIFIER_SETTING_VISIBLE is 0. Bug: 7183252 Change-Id: I04cfc4f521d1ecb73df56b172cf29cbd84f53dad
This commit is contained in:
@@ -72,6 +72,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
||||
private static final String KEY_VISIBLE_PATTERN = "visiblepattern";
|
||||
private static final String KEY_TACTILE_FEEDBACK_ENABLED = "unlock_tactile_feedback";
|
||||
private static final String KEY_SECURITY_CATEGORY = "security_category";
|
||||
private static final String KEY_DEVICE_ADMIN_CATEGORY = "device_admin_category";
|
||||
private static final String KEY_LOCK_AFTER_TIMEOUT = "lock_after_timeout";
|
||||
private static final String EXTRA_NO_WIDGET = "com.android.settings.NO_WIDGET";
|
||||
private static final String EXTRA_DEFAULT_WIDGET = "com.android.settings.DEFAULT_WIDGET";
|
||||
@@ -289,8 +290,14 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
||||
mToggleVerifyApps.setChecked(false);
|
||||
mToggleVerifyApps.setEnabled(false);
|
||||
}
|
||||
} else if (mToggleVerifyApps != null) {
|
||||
mToggleVerifyApps.setEnabled(false);
|
||||
} else {
|
||||
PreferenceGroup deviceAdminCategory= (PreferenceGroup)
|
||||
root.findPreference(KEY_DEVICE_ADMIN_CATEGORY);
|
||||
if (deviceAdminCategory != null) {
|
||||
deviceAdminCategory.removePreference(mToggleVerifyApps);
|
||||
} else {
|
||||
mToggleVerifyApps.setEnabled(false);
|
||||
}
|
||||
}
|
||||
|
||||
return root;
|
||||
|
Reference in New Issue
Block a user