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

Commit 371afc83 authored by Kholoud Mohamed's avatar Kholoud Mohamed Committed by Automerger Merge Worker
Browse files

Merge "send broadcast to explicit role holder component names" into tm-dev am: 17c1c80c

parents b2563c08 17c1c80c
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);