Check multi-user support in isUserSwitcherEnabled
isUserSwitcherEnabled now returns false if multi-user is disabled(
supportsMultipleUsers() returns false).
Removed GUEST_USER_ENABLED setting and replaced with DPM.getGuestUserDisabled
check. It currently always returns false, but will be replaced with an actual
policy check.
Bug: 17571233
Change-Id: I41853e8b321b2537952cac5d92e88bfdb8cbd9a8
diff --git a/core/java/android/app/admin/DevicePolicyManager.java b/core/java/android/app/admin/DevicePolicyManager.java
index e6484e9..a118f16 100644
--- a/core/java/android/app/admin/DevicePolicyManager.java
+++ b/core/java/android/app/admin/DevicePolicyManager.java
@@ -2438,6 +2438,17 @@
}
/**
+ * Determine whether or not creating a guest user has been disabled for the device
+ *
+ * @hide
+ */
+ public boolean getGuestUserDisabled(@Nullable ComponentName admin) {
+ // Currently guest users can always be created if multi-user is enabled
+ // TODO introduce a policy for guest user creation
+ return false;
+ }
+
+ /**
* Called by a device/profile owner to set whether the screen capture is disabled. Disabling
* screen capture also prevents the content from being shown on display devices that do not have
* a secure video output. See {@link android.view.Display#FLAG_SECURE} for more details about