Fix a regression in enabling unknown sources toggle automerge: ceceb2a
automerge: 8b955d1
* commit '8b955d1d47e1bcf1e989fb437f50dd7f82f1e567':
Fix a regression in enabling unknown sources toggle
This commit is contained in:
@@ -336,7 +336,8 @@ public class SecuritySettings extends SettingsPreferenceFragment
|
||||
KEY_TOGGLE_INSTALL_APPLICATIONS);
|
||||
mToggleAppInstallation.setChecked(isNonMarketAppsAllowed());
|
||||
// Side loading of apps.
|
||||
mToggleAppInstallation.setEnabled(mIsPrimary);
|
||||
// Disable for restricted profiles. For others, check if policy disallows it.
|
||||
mToggleAppInstallation.setEnabled(!um.getUserInfo(UserHandle.myUserId()).isRestricted());
|
||||
if (um.hasUserRestriction(UserManager.DISALLOW_INSTALL_UNKNOWN_SOURCES)
|
||||
|| um.hasUserRestriction(UserManager.DISALLOW_INSTALL_APPS)) {
|
||||
mToggleAppInstallation.setEnabled(false);
|
||||
|
Reference in New Issue
Block a user