Merge "Allow low ram device to have multiple users and managed profies" into rvc-dev am: 2260f7102f am: 934f9fafe3 am: 4be31673c7

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/11667418

Change-Id: I0c5abb6c32413b8b876374ce171ce10fe8adf32e
This commit is contained in:
Zhen Zhang
2020-06-03 18:08:58 +00:00
committed by Automerger Merge Worker
2 changed files with 0 additions and 10 deletions

View File

@@ -4090,13 +4090,6 @@ public class UserManager {
public static int getMaxSupportedUsers() {
// Don't allow multiple users on certain builds
if (android.os.Build.ID.startsWith("JVP")) return 1;
if (ActivityManager.isLowRamDeviceStatic()) {
// Low-ram devices are Svelte. Most of the time they don't get multi-user.
if ((Resources.getSystem().getConfiguration().uiMode & Configuration.UI_MODE_TYPE_MASK)
!= Configuration.UI_MODE_TYPE_TELEVISION) {
return 1;
}
}
return SystemProperties.getInt("fw.max_users",
Resources.getSystem().getInteger(R.integer.config_multiuserMaximumUsers));
}

View File

@@ -2250,9 +2250,6 @@ public class UserManagerService extends IUserManager.Stub {
// Managed profiles have their own specific rules.
final boolean isManagedProfile = type.isManagedProfile();
if (isManagedProfile) {
if (ActivityManager.isLowRamDeviceStatic()) {
return false;
}
if (!mContext.getPackageManager().hasSystemFeature(
PackageManager.FEATURE_MANAGED_USERS)) {
return false;