Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7c921331 authored by Sudheer Shanka's avatar Sudheer Shanka
Browse files

Remove the admin from the removing list when refreshing that admin.

Change-Id: I9b597a116db4f1fb894427b4e885f29c3e94abdb
Fixes: 27909181
parent b8572b3d
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -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;