Allow ephemeral users on the split-system-user systems only.
BUG: 27143201
Change-Id: I37f3ca7366648dbf07df39a7a972857e0ff78a9a
diff --git a/services/core/java/com/android/server/pm/UserManagerService.java b/services/core/java/com/android/server/pm/UserManagerService.java
index 788c44a..e7465c0 100644
--- a/services/core/java/com/android/server/pm/UserManagerService.java
+++ b/services/core/java/com/android/server/pm/UserManagerService.java
@@ -1833,6 +1833,11 @@
return null;
}
}
+ if (!UserManager.isSplitSystemUser() && (flags & UserInfo.FLAG_EPHEMERAL) != 0) {
+ Log.e(LOG_TAG,
+ "Ephemeral users are supported on split-system-user systems only.");
+ return null;
+ }
// In split system user mode, we assign the first human user the primary flag.
// And if there is no device owner, we also assign the admin flag to primary user.
if (UserManager.isSplitSystemUser()