Show user management UI if a managed profile exists
Show UI even if flags to show multiuser UI are off, if there's a second user on the device. This way there's an affordance to remove the user. Don't show the "Add user" item though. Bug: 15447068 Change-Id: I40273005d6d8d66aed486328615acdab71d51fa4
This commit is contained in:
@@ -1043,8 +1043,12 @@ public class SettingsActivity extends Activity
|
||||
category.removeTile(n);
|
||||
}
|
||||
} else if (id == R.id.user_settings) {
|
||||
boolean hasMultipleUsers =
|
||||
((UserManager) getSystemService(Context.USER_SERVICE))
|
||||
.getUserCount() > 1;
|
||||
if (!UserHandle.MU_ENABLED
|
||||
|| !UserManager.supportsMultipleUsers()
|
||||
|| (!UserManager.supportsMultipleUsers()
|
||||
&& !hasMultipleUsers)
|
||||
|| Utils.isMonkeyRunning()) {
|
||||
category.removeTile(n);
|
||||
}
|
||||
|
Reference in New Issue
Block a user