diff options
author | Alexandra Gherghina <alexgherghina@google.com> | 2014-07-31 19:30:41 +0100 |
---|---|---|
committer | Alexandra Gherghina <alexgherghina@google.com> | 2014-08-11 10:02:13 +0100 |
commit | 83adb564de5ee7f6c3155f98befb2e449b7b4f6f (patch) | |
tree | a5c825e7645d48c6035fc8d49d17baa9d5f0ae81 /src/com/android/settings/users | |
parent | 6cd90f45b7fb7324eef9d05ae38e0e26bfc934d5 (diff) | |
download | packages_apps_Settings-83adb564de5ee7f6c3155f98befb2e449b7b4f6f.zip packages_apps_Settings-83adb564de5ee7f6c3155f98befb2e449b7b4f6f.tar.gz packages_apps_Settings-83adb564de5ee7f6c3155f98befb2e449b7b4f6f.tar.bz2 |
Show managed profile under accounts rather than users
Also fixes overflow menu to update on remove/add managed profile.
Bug: 16234745
Bug: 16727076
Change-Id: I3283a8fa0096edfce5aad633e09ba3eed6d2174c
Diffstat (limited to 'src/com/android/settings/users')
-rw-r--r-- | src/com/android/settings/users/UserSettings.java | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/src/com/android/settings/users/UserSettings.java b/src/com/android/settings/users/UserSettings.java index 7dc83ef..ba93931 100644 --- a/src/com/android/settings/users/UserSettings.java +++ b/src/com/android/settings/users/UserSettings.java @@ -741,6 +741,10 @@ public class UserSettings extends SettingsPreferenceFragment final boolean voiceCapable = Utils.isVoiceCapable(context); final ArrayList<Integer> missingIcons = new ArrayList<Integer>(); for (UserInfo user : users) { + if (user.isManagedProfile()) { + // Managed profiles appear under Accounts Settings instead + continue; + } Preference pref; if (user.id == UserHandle.myUserId()) { pref = mMePreference; @@ -773,19 +777,11 @@ public class UserSettings extends SettingsPreferenceFragment if (!isInitialized(user)) { if (user.isRestricted()) { pref.setSummary(R.string.user_summary_restricted_not_set_up); - } else if (user.isManagedProfile()) { - pref.setSummary(R.string.user_summary_managed_profile_not_set_up); } else { pref.setSummary(R.string.user_summary_not_set_up); } } else if (user.isRestricted()) { pref.setSummary(R.string.user_summary_restricted_profile); - } else if (user.isManagedProfile()) { - if (user.isEnabled()) { - pref.setSummary(R.string.user_summary_managed_profile); - } else { - pref.setSummary(R.string.user_summary_managed_profile_not_enabled); - } } if (user.iconPath != null) { if (mUserIcons.get(user.id) == null) { @@ -911,8 +907,6 @@ public class UserSettings extends SettingsPreferenceFragment if (!isInitialized(user)) { mHandler.sendMessage(mHandler.obtainMessage( MESSAGE_SETUP_USER, user.id, user.serialNumber)); - } else if (!user.isManagedProfile()) { - switchUserNow(userId); } } } else if (pref == mAddUser) { |