Use removeUserEvenWhenDisallowed for removing ephemeral user
- To bypass DISALLOW_REMOVE_USER check Bug: 72437780 Test: cts-tradefed run singleCommand cts -m DevicePolicyManager --test com.android.cts.devicepolicy.DeviceOwnerTest#testCreateAndManageUser_StopEphemeralUser_DisallowRemoveUser Change-Id: Ib07ccc4cdbd8da2c2b314da30479e10b9085b697
This commit is contained in:
@@ -743,7 +743,7 @@ class UserController implements Handler.Callback {
|
||||
mInjector.stackSupervisorRemoveUser(userId);
|
||||
// Remove the user if it is ephemeral.
|
||||
if (getUserInfo(userId).isEphemeral()) {
|
||||
mInjector.getUserManager().removeUser(userId);
|
||||
mInjector.getUserManager().removeUserEvenWhenDisallowed(userId);
|
||||
}
|
||||
// Evict the user's credential encryption key.
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user