summaryrefslogtreecommitdiffstats
path: root/cmds
diff options
context:
space:
mode:
Diffstat (limited to 'cmds')
-rw-r--r--cmds/am/src/com/android/commands/am/Am.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java
index 844900d..9f4bc52 100644
--- a/cmds/am/src/com/android/commands/am/Am.java
+++ b/cmds/am/src/com/android/commands/am/Am.java
@@ -1003,8 +1003,10 @@ public class Am extends BaseCommand {
private void sendBroadcast() throws Exception {
Intent intent = makeIntent(UserHandle.USER_CURRENT);
IntentReceiver receiver = new IntentReceiver();
+ String[] requiredPermissions = mReceiverPermission == null ? null
+ : new String[] {mReceiverPermission};
System.out.println("Broadcasting: " + intent);
- mAm.broadcastIntent(null, intent, null, receiver, 0, null, null, mReceiverPermission,
+ mAm.broadcastIntent(null, intent, null, receiver, 0, null, null, requiredPermissions,
android.app.AppOpsManager.OP_NONE, null, true, false, mUserId);
receiver.waitForFinish();
}