summaryrefslogtreecommitdiffstats
path: root/src/com/android/settings/SettingsActivity.java
diff options
context:
space:
mode:
authorAmith Yamasani <yamasani@google.com>2014-06-06 14:31:37 -0700
committerAmith Yamasani <yamasani@google.com>2014-06-06 14:31:37 -0700
commit4093e40e18f2e8d395ca467f54aef6e763c394f6 (patch)
tree2879be164f4f5bcb9767c03abe9958928967a67a /src/com/android/settings/SettingsActivity.java
parentb76de1d4fabf8381d73df22439e6fac839bd33e7 (diff)
downloadpackages_apps_Settings-4093e40e18f2e8d395ca467f54aef6e763c394f6.tar.gz
packages_apps_Settings-4093e40e18f2e8d395ca467f54aef6e763c394f6.tar.bz2
packages_apps_Settings-4093e40e18f2e8d395ca467f54aef6e763c394f6.zip
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
Diffstat (limited to 'src/com/android/settings/SettingsActivity.java')
-rw-r--r--src/com/android/settings/SettingsActivity.java6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/com/android/settings/SettingsActivity.java b/src/com/android/settings/SettingsActivity.java
index 6ba79ccb2..7dcdfbc7a 100644
--- a/src/com/android/settings/SettingsActivity.java
+++ b/src/com/android/settings/SettingsActivity.java
@@ -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);
}