Part3 - Don't add padlock if the restriction is not set by admin.
Bug: 26687435 Change-Id: Ibfea6d7d5bd32e7a05dcc2cc32b121c9e50b6a34
This commit is contained in:
@@ -56,6 +56,7 @@ public abstract class AppInfoBase extends SettingsPreferenceFragment
|
||||
protected static final boolean localLOGV = false;
|
||||
|
||||
protected EnforcedAdmin mAppsControlDisallowedAdmin;
|
||||
protected boolean mAppsControlDisallowedBySystem;
|
||||
|
||||
protected ApplicationsState mState;
|
||||
protected ApplicationsState.Session mSession;
|
||||
@@ -97,6 +98,8 @@ public abstract class AppInfoBase extends SettingsPreferenceFragment
|
||||
mSession.resume();
|
||||
mAppsControlDisallowedAdmin = RestrictedLockUtils.checkIfRestrictionEnforced(getActivity(),
|
||||
UserManager.DISALLOW_APPS_CONTROL, mUserId);
|
||||
mAppsControlDisallowedBySystem = RestrictedLockUtils.hasBaseUserRestriction(getActivity(),
|
||||
UserManager.DISALLOW_APPS_CONTROL, mUserId);
|
||||
|
||||
if (!refreshUi()) {
|
||||
setIntentAndFinish(true, true);
|
||||
|
Reference in New Issue
Block a user