Multiuser settings revamp for L, first pass

Include Guest settings
Ability to switch users from Settings
Manage user settings like telephony access

Bug: 15761405
Change-Id: I2cfdc7bc2703ed202aa8bf1261c304c51ce48b29
This commit is contained in:
Amith Yamasani
2014-06-30 15:31:37 +05:30
parent 5b3c3c00b0
commit 9e6ac3d25f
8 changed files with 337 additions and 35 deletions

View File

@@ -683,7 +683,7 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
app.masterEntry.activityName));
}
p.setKey(getKeyForPackage(packageName));
p.setSettingsEnabled(hasSettings || isSettingsApp);
p.setSettingsEnabled((hasSettings || isSettingsApp) && app.masterEntry == null);
p.setPersistent(false);
p.setOnPreferenceChangeListener(this);
p.setOnPreferenceClickListener(this);
@@ -702,7 +702,8 @@ public class AppRestrictionsFragment extends SettingsPreferenceFragment implemen
// Get and populate the defaults, since the user is not going to be
// able to toggle this app ON (it's ON by default and immutable).
// Only do this for restricted profiles, not single-user restrictions
if (hasSettings) {
// Also don't do this for slave icons
if (hasSettings && app.masterEntry == null) {
requestRestrictionsForApp(packageName, p, false);
}
} else if (!mNewUser && isAppEnabledForUser(pi)) {