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

Commit 17c1c80c authored by Kholoud Mohamed's avatar Kholoud Mohamed Committed by Android (Google) Code Review
Browse files

Merge "send broadcast to explicit role holder component names" into tm-dev

parents 03198028 01962c62
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -13354,8 +13354,12 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
                if (receivers.isEmpty()) {
                    return;
                }
                packageIntent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
                mContext.sendBroadcastAsUser(packageIntent, userHandle);
                for (ResolveInfo receiver : receivers) {
                    final Intent componentIntent = new Intent(packageIntent)
                            .setComponent(receiver.getComponentInfo().getComponentName())
                            .addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
                    mContext.sendBroadcastAsUser(componentIntent, userHandle);
                }
            } catch (RemoteException ex) {
                Slogf.w(LOG_TAG, "Cannot get list of broadcast receivers for %s because: %s.",
                        intent.getAction(), ex);