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

Commit 954cfce1 authored by Victor Chang's avatar Victor Chang Committed by Android (Google) Code Review
Browse files

Merge "Send DEVICE_OWNER_CHANGED to manifest receivers in background"

parents 981bd31b 94666c05
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -6110,7 +6110,8 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
            try {
                // TODO Send to system too?
                mContext.sendBroadcastAsUser(
                        new Intent(DevicePolicyManager.ACTION_DEVICE_OWNER_CHANGED),
                        new Intent(DevicePolicyManager.ACTION_DEVICE_OWNER_CHANGED)
                                .addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND),
                        UserHandle.of(userId));
            } finally {
                mInjector.binderRestoreCallingIdentity(ident);
@@ -6260,6 +6261,7 @@ public class DevicePolicyManagerService extends IDevicePolicyManager.Stub {
                clearDeviceOwnerLocked(admin, deviceOwnerUserId);
                removeActiveAdminLocked(deviceOwnerComponent, deviceOwnerUserId);
                Intent intent = new Intent(DevicePolicyManager.ACTION_DEVICE_OWNER_CHANGED);
                intent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
                mContext.sendBroadcastAsUser(intent, UserHandle.of(deviceOwnerUserId));
            } finally {
                mInjector.binderRestoreCallingIdentity(ident);