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

Commit f4b30e21 authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Android (Google) Code Review
Browse files

Merge "Remove the admin from the removing list when refreshing that admin." into nyc-dev

parents a27cf024 7c921331
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;