From 8cd28b57ed732656d002d97879e15c5695b54fff Mon Sep 17 00:00:00 2001 From: Amith Yamasani Date: Sun, 8 Jun 2014 17:54:27 -0700 Subject: Apply cross-user restrictions to Shell Even though Shell user is allowed to perform cross-user actions, lock that path down if the target user has restrictions imposed by the profile owner device admin that prevents access via adb. If the profile owner has imposed DISALLOW_DEBUGGING_FEATURES, don't allow the shell user to make the following types of calls: start activities, make service calls, access content providers, send broadcasts, block/unblock packages, clear user data, etc. Bug: 15086577 Change-Id: I9669fc165953076f786ed51cbc17d20d6fa995c3 --- cmds/am/src/com/android/commands/am/Am.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'cmds/am/src') diff --git a/cmds/am/src/com/android/commands/am/Am.java b/cmds/am/src/com/android/commands/am/Am.java index c06ef0d..a0ba32e 100644 --- a/cmds/am/src/com/android/commands/am/Am.java +++ b/cmds/am/src/com/android/commands/am/Am.java @@ -846,7 +846,7 @@ public class Am extends BaseCommand { } private void sendBroadcast() throws Exception { - Intent intent = makeIntent(UserHandle.USER_ALL); + Intent intent = makeIntent(UserHandle.USER_CURRENT); IntentReceiver receiver = new IntentReceiver(); System.out.println("Broadcasting: " + intent); mAm.broadcastIntent(null, intent, null, receiver, 0, null, null, mReceiverPermission, -- cgit v1.1