Remove wifi/bt restrictions choice for limited users
Bug: 8631653 Make "Unknown sources" visible but disabled if restricted for limited user. Bug: 8629605 Also show the restriction name as the dialog title in the picker. Change-Id: I8d6ea3571bcc4372347cad6a2c982f35afa7cc09
This commit is contained in:
@@ -260,15 +260,7 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
||||
boolean isSideloadingAllowed =
|
||||
!um.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES);
|
||||
// Side loading of apps.
|
||||
if (isSideloadingAllowed) {
|
||||
mToggleAppInstallation.setEnabled(isSideloadingAllowed);
|
||||
} else {
|
||||
if (deviceAdminCategory != null) {
|
||||
deviceAdminCategory.removePreference(mToggleAppInstallation);
|
||||
} else {
|
||||
mToggleAppInstallation.setEnabled(false);
|
||||
}
|
||||
}
|
||||
mToggleAppInstallation.setEnabled(isSideloadingAllowed);
|
||||
|
||||
// Package verification, only visible to primary user and if enabled
|
||||
mToggleVerifyApps = (CheckBoxPreference) findPreference(KEY_TOGGLE_VERIFY_APPLICATIONS);
|
||||
|
Reference in New Issue
Block a user