Don't show Restrictions item if it has been disabled for the user.

Also don't show actual Restrictions content if the fragment was launched
through a different entry point.

Change-Id: I70cb76ca6f68a382e68219053e6f69e7f1fa0150
This commit is contained in:
Amith Yamasani
2013-07-22 16:51:39 -07:00
parent a28787a1cb
commit d5b1a291eb
2 changed files with 15 additions and 6 deletions

View File

@@ -488,7 +488,8 @@ public class Settings extends PreferenceActivity
target.remove(i);
}
} else if (id == R.id.restriction_settings) {
if (um.isLinkedUser()) {
if (um.isLinkedUser()
|| um.hasUserRestriction(UserManager.DISALLOW_APP_RESTRICTIONS)) {
target.remove(i);
}
}