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

Commit 8ddeee98 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

Use foreground broadcast to get device admin msg.

Using a background broadcast is bad, it can take a long
time to get the message back, either accidentally (backed up
behind other broadcasts) or from a deliberately malicious
admin.

Change-Id: Ib7491f8e27dacdc002562aef027ee4664e78e97b
parent 368c5ada
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -2575,6 +2575,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                return;
            }
            Intent intent = new Intent(DeviceAdminReceiver.ACTION_DEVICE_ADMIN_DISABLE_REQUESTED);
            intent.setFlags(Intent.FLAG_RECEIVER_FOREGROUND);
            intent.setComponent(admin.info.getComponent());
            mContext.sendOrderedBroadcastAsUser(intent, new UserHandle(userHandle),
                    null, new BroadcastReceiver() {