Merge "send broadcast to explicit role holder component names" into tm-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
17c1c80c0b
@@ -13354,8 +13354,12 @@ public class DevicePolicyManagerService extends BaseIDevicePolicyManager {
|
|||||||
if (receivers.isEmpty()) {
|
if (receivers.isEmpty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
packageIntent.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
|
for (ResolveInfo receiver : receivers) {
|
||||||
mContext.sendBroadcastAsUser(packageIntent, userHandle);
|
final Intent componentIntent = new Intent(packageIntent)
|
||||||
|
.setComponent(receiver.getComponentInfo().getComponentName())
|
||||||
|
.addFlags(Intent.FLAG_RECEIVER_INCLUDE_BACKGROUND);
|
||||||
|
mContext.sendBroadcastAsUser(componentIntent, userHandle);
|
||||||
|
}
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
Slogf.w(LOG_TAG, "Cannot get list of broadcast receivers for %s because: %s.",
|
Slogf.w(LOG_TAG, "Cannot get list of broadcast receivers for %s because: %s.",
|
||||||
intent.getAction(), ex);
|
intent.getAction(), ex);
|
||||||
|
|||||||
Reference in New Issue
Block a user