Merge "Remove the admin from the removing list when refreshing that admin." into nyc-dev
am: f4b30e2
* commit 'f4b30e2147671476564c8bba6edf33aa63334f6e':
Remove the admin from the removing list when refreshing that admin.
Change-Id: Ifd93b6e4d0e495e45fec5388c941675f8edfbf37
This commit is contained in:
@@ -2805,6 +2805,10 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
|
||||
&& getActiveAdminUncheckedLocked(adminReceiver, userHandle) != null) {
|
||||
throw new IllegalArgumentException("Admin is already added");
|
||||
}
|
||||
if (policy.mRemovingAdmins.contains(adminReceiver)) {
|
||||
throw new IllegalArgumentException(
|
||||
"Trying to set an admin which is being removed");
|
||||
}
|
||||
ActiveAdmin newAdmin = new ActiveAdmin(info, /* parent */ false);
|
||||
policy.mAdminMap.put(adminReceiver, newAdmin);
|
||||
int replaceIndex = -1;
|
||||
|
||||
Reference in New Issue
Block a user