diff options
author | Amith Yamasani <yamasani@google.com> | 2014-04-23 14:43:23 -0700 |
---|---|---|
committer | Amith Yamasani <yamasani@google.com> | 2014-04-23 14:43:23 -0700 |
commit | 921b71e95f53bb07980ef22b8b6a75ea20490ccd (patch) | |
tree | 3633acc4e7dce7cbd098d2f32ac86b184996e2c3 /packages/SystemUI/src/com/android/systemui/settings | |
parent | e9401df1e801b215ac07ad4391c2bb25f8f36c20 (diff) | |
download | frameworks_base-921b71e95f53bb07980ef22b8b6a75ea20490ccd.zip frameworks_base-921b71e95f53bb07980ef22b8b6a75ea20490ccd.tar.gz frameworks_base-921b71e95f53bb07980ef22b8b6a75ea20490ccd.tar.bz2 |
Don't show managed profiles in the user switcher
Only show users that you can switch to.
Change-Id: Iff6dfccc27230f824d73d02731a045c69419b814
Diffstat (limited to 'packages/SystemUI/src/com/android/systemui/settings')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/settings/UserSwitcherHostView.java | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/settings/UserSwitcherHostView.java b/packages/SystemUI/src/com/android/systemui/settings/UserSwitcherHostView.java index 87ebcc1..d67e7cb 100644 --- a/packages/SystemUI/src/com/android/systemui/settings/UserSwitcherHostView.java +++ b/packages/SystemUI/src/com/android/systemui/settings/UserSwitcherHostView.java @@ -38,6 +38,7 @@ import android.widget.ListView; import android.widget.TextView; import java.util.ArrayList; +import java.util.List; /** * A quick and dirty view to show a user switcher. @@ -118,7 +119,12 @@ public class UserSwitcherHostView extends FrameLayout implements ListView.OnItem public void refreshUsers() { mUserInfo.clear(); - mUserInfo.addAll(mUserManager.getUsers(true)); + List<UserInfo> users = mUserManager.getUsers(true); + for (UserInfo user : users) { + if (!user.isManagedProfile()) { + mUserInfo.add(user); + } + } mAdapter.notifyDataSetChanged(); } |