Part3 - Don't add padlock if the restriction is not set by admin.

Bug: 26687435
Change-Id: Ibfea6d7d5bd32e7a05dcc2cc32b121c9e50b6a34
This commit is contained in:
Sudheer Shanka
2016-02-11 18:48:14 +00:00
parent 7f2a013619
commit 9e9e63b7b3
21 changed files with 207 additions and 84 deletions

View File

@@ -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);