Merge "Throw UnsupportedOperationException when creating ephemeral user on a system without split system user." into nyc-dev

This commit is contained in:
Lenka Trochtova
2016-02-24 13:50:16 +00:00
committed by Android (Google) Code Review

View File

@@ -4970,7 +4970,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
Preconditions.checkNotNull(who, "ComponentName is null");
// Allow setting this policy to true only if there is a split system user.
if (forceEphemeralUsers && !mInjector.userManagerIsSplitSystemUser()) {
throw new IllegalArgumentException(
throw new UnsupportedOperationException(
"Cannot force ephemeral users on systems without split system user.");
}
boolean removeAllUsers = false;