Single-user restrictions

New restrictions panel for restricting list of available apps for the user.
Apps that support restrictions can also be configured here.
Restrictions screen is PIN protected and will ask you to create a PIN the
first time you use it.

Change-Id: I7a5267df4272521ad80e6a8b6a18932d07179eb8
This commit is contained in:
Amith Yamasani
2013-06-03 16:41:03 -07:00
parent c911bbe247
commit 0ca80fe4cd
7 changed files with 712 additions and 451 deletions

View File

@@ -116,6 +116,7 @@ public class Settings extends PreferenceActivity
R.id.location_settings,
R.id.security_settings,
R.id.language_settings,
R.id.restriction_settings,
R.id.user_settings,
R.id.account_settings,
R.id.account_add,
@@ -486,6 +487,10 @@ public class Settings extends PreferenceActivity
if (um.hasUserRestriction(UserManager.DISALLOW_MODIFY_ACCOUNTS)) {
target.remove(i);
}
} else if (id == R.id.restriction_settings) {
if (um.isLinkedUser()) {
target.remove(i);
}
}
if (i < target.size() && target.get(i) == header