Merge "Added UserManager.isUsersOnSecondaryDisplaysSupported()"
This commit is contained in:
committed by
Android (Google) Code Review
commit
646dd4f125
@@ -2837,6 +2837,26 @@ public class UserManager {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @hide
|
||||
*/
|
||||
public static boolean isUsersOnSecondaryDisplaysEnabled() {
|
||||
return SystemProperties.getBoolean("fw.users_on_secondary_displays",
|
||||
Resources.getSystem()
|
||||
.getBoolean(R.bool.config_multiuserUsersOnSecondaryDisplays));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether the device allows users to run (and launch activities) on secondary displays.
|
||||
*
|
||||
* @return {@code false} for most devices, except automotive vehicles with passenger displays.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public boolean isUsersOnSecondaryDisplaysSupported() {
|
||||
return isUsersOnSecondaryDisplaysEnabled();
|
||||
}
|
||||
|
||||
/**
|
||||
* Return whether the context user is running in an "unlocked" state.
|
||||
* <p>
|
||||
|
||||
@@ -2629,6 +2629,10 @@
|
||||
will be locked. -->
|
||||
<bool name="config_multiuserDelayUserDataLocking">false</bool>
|
||||
|
||||
<!-- Whether the device allows users to start in background on secondary displays.
|
||||
Should be false for most devices, except automotive vehicle with passenger displays. -->
|
||||
<bool name="config_multiuserUsersOnSecondaryDisplays">false</bool>
|
||||
|
||||
<!-- Whether to automatically switch a non-primary user back to the primary user after a
|
||||
timeout when the device is docked. -->
|
||||
<bool name="config_enableTimeoutToUserZeroWhenDocked">false</bool>
|
||||
|
||||
@@ -453,6 +453,7 @@
|
||||
<java-symbol type="integer" name="config_multiuserMaximumUsers" />
|
||||
<java-symbol type="integer" name="config_multiuserMaxRunningUsers" />
|
||||
<java-symbol type="bool" name="config_multiuserDelayUserDataLocking" />
|
||||
<java-symbol type="bool" name="config_multiuserUsersOnSecondaryDisplays" />
|
||||
<java-symbol type="bool" name="config_enableTimeoutToUserZeroWhenDocked" />
|
||||
<java-symbol type="integer" name="config_userTypePackageWhitelistMode"/>
|
||||
<java-symbol type="xml" name="config_user_types" />
|
||||
|
||||
@@ -6010,6 +6010,10 @@ public class UserManagerService extends IUserManager.Stub {
|
||||
|
||||
} // synchronized (mPackagesLock)
|
||||
|
||||
// Multiple Users on Multiple Display info
|
||||
pw.println(" Supports users on secondary displays: "
|
||||
+ UserManager.isUsersOnSecondaryDisplaysEnabled());
|
||||
|
||||
// Dump some capabilities
|
||||
pw.println();
|
||||
pw.print(" Max users: " + UserManager.getMaxSupportedUsers());
|
||||
|
||||
Reference in New Issue
Block a user