Loading cmds/am/src/com/android/commands/am/Am.java +5 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ public class Am { private int mRepeat = 0; private int mUserId; private String mReceiverPermission; private String mProfileFile; Loading Loading @@ -332,6 +333,8 @@ public class Am { mStartFlags |= ActivityManager.START_FLAG_OPENGL_TRACES; } else if (opt.equals("--user")) { mUserId = parseUserArg(nextArgRequired()); } else if (opt.equals("--receiver-permission")) { mReceiverPermission = nextArgRequired(); } else { System.err.println("Error: Unknown option: " + opt); return null; Loading Loading @@ -608,7 +611,7 @@ public class Am { Intent intent = makeIntent(UserHandle.USER_ALL); IntentReceiver receiver = new IntentReceiver(); System.out.println("Broadcasting: " + intent); mAm.broadcastIntent(null, intent, null, receiver, 0, null, null, null, mAm.broadcastIntent(null, intent, null, receiver, 0, null, null, mReceiverPermission, android.app.AppOpsManager.OP_NONE, true, false, mUserId); receiver.waitForFinish(); } Loading Loading @@ -1408,6 +1411,7 @@ public class Am { "am broadcast: send a broadcast Intent. Options are:\n" + " --user <USER_ID> | all | current: Specify which user to send to; if not\n" + " specified then send to all users.\n" + " --receiver-permission <PERMISSION>: Require receiver to hold permission.\n" + "\n" + "am instrument: start an Instrumentation. Typically this target <COMPONENT>\n" + " is the form <TEST_PACKAGE>/<RUNNER_CLASS>. Options are:\n" + Loading core/java/android/app/PendingIntent.java +2 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,7 @@ public final class PendingIntent implements Parcelable { context.getContentResolver()) : null; try { intent.setAllowFds(false); intent.migrateExtraStreamToClipData(); IIntentSender target = ActivityManagerNative.getDefault().getIntentSender( ActivityManager.INTENT_SENDER_ACTIVITY, packageName, Loading @@ -285,6 +286,7 @@ public final class PendingIntent implements Parcelable { context.getContentResolver()) : null; try { intent.setAllowFds(false); intent.migrateExtraStreamToClipData(); IIntentSender target = ActivityManagerNative.getDefault().getIntentSender( ActivityManager.INTENT_SENDER_ACTIVITY, packageName, Loading core/res/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,7 @@ <protected-broadcast android:name="android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE" /> <protected-broadcast android:name="android.intent.action.AIRPLANE_MODE" /> <protected-broadcast android:name="android.intent.action.ADVANCED_SETTINGS" /> <protected-broadcast android:name="android.intent.action.BUGREPORT_FINISHED" /> <protected-broadcast android:name="android.intent.action.ACTION_IDLE_MAINTENANCE_START" /> <protected-broadcast android:name="android.intent.action.ACTION_IDLE_MAINTENANCE_END" /> Loading packages/Shell/Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-subdir-java-files) LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 LOCAL_PACKAGE_NAME := Shell LOCAL_CERTIFICATE := platform Loading packages/Shell/AndroidManifest.xml +27 −2 Original line number Diff line number Diff line Loading @@ -68,7 +68,32 @@ <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> <uses-permission android:name="android.permission.MANAGE_USERS" /> <uses-permission android:name="android.permission.BLUETOOTH_STACK" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <application android:hasCode="false" android:label="@string/app_label"> <application android:label="@string/app_label"> <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.android.shell" android:grantUriPermissions="true" android:exported="false"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_provider_paths" /> </provider> <activity android:name=".BugreportWarningActivity" android:theme="@*android:style/Theme.Holo.Dialog.Alert" android:finishOnCloseSystemDialogs="true" android:excludeFromRecents="true" android:exported="false" /> <receiver android:name=".BugreportReceiver" android:permission="android.permission.DUMP"> <intent-filter> <action android:name="android.intent.action.BUGREPORT_FINISHED" /> </intent-filter> </receiver> </application> </manifest> Loading
cmds/am/src/com/android/commands/am/Am.java +5 −1 Original line number Diff line number Diff line Loading @@ -63,6 +63,7 @@ public class Am { private int mRepeat = 0; private int mUserId; private String mReceiverPermission; private String mProfileFile; Loading Loading @@ -332,6 +333,8 @@ public class Am { mStartFlags |= ActivityManager.START_FLAG_OPENGL_TRACES; } else if (opt.equals("--user")) { mUserId = parseUserArg(nextArgRequired()); } else if (opt.equals("--receiver-permission")) { mReceiverPermission = nextArgRequired(); } else { System.err.println("Error: Unknown option: " + opt); return null; Loading Loading @@ -608,7 +611,7 @@ public class Am { Intent intent = makeIntent(UserHandle.USER_ALL); IntentReceiver receiver = new IntentReceiver(); System.out.println("Broadcasting: " + intent); mAm.broadcastIntent(null, intent, null, receiver, 0, null, null, null, mAm.broadcastIntent(null, intent, null, receiver, 0, null, null, mReceiverPermission, android.app.AppOpsManager.OP_NONE, true, false, mUserId); receiver.waitForFinish(); } Loading Loading @@ -1408,6 +1411,7 @@ public class Am { "am broadcast: send a broadcast Intent. Options are:\n" + " --user <USER_ID> | all | current: Specify which user to send to; if not\n" + " specified then send to all users.\n" + " --receiver-permission <PERMISSION>: Require receiver to hold permission.\n" + "\n" + "am instrument: start an Instrumentation. Typically this target <COMPONENT>\n" + " is the form <TEST_PACKAGE>/<RUNNER_CLASS>. Options are:\n" + Loading
core/java/android/app/PendingIntent.java +2 −0 Original line number Diff line number Diff line Loading @@ -261,6 +261,7 @@ public final class PendingIntent implements Parcelable { context.getContentResolver()) : null; try { intent.setAllowFds(false); intent.migrateExtraStreamToClipData(); IIntentSender target = ActivityManagerNative.getDefault().getIntentSender( ActivityManager.INTENT_SENDER_ACTIVITY, packageName, Loading @@ -285,6 +286,7 @@ public final class PendingIntent implements Parcelable { context.getContentResolver()) : null; try { intent.setAllowFds(false); intent.migrateExtraStreamToClipData(); IIntentSender target = ActivityManagerNative.getDefault().getIntentSender( ActivityManager.INTENT_SENDER_ACTIVITY, packageName, Loading
core/res/AndroidManifest.xml +1 −0 Original line number Diff line number Diff line Loading @@ -169,6 +169,7 @@ <protected-broadcast android:name="android.intent.action.EXTERNAL_APPLICATIONS_UNAVAILABLE" /> <protected-broadcast android:name="android.intent.action.AIRPLANE_MODE" /> <protected-broadcast android:name="android.intent.action.ADVANCED_SETTINGS" /> <protected-broadcast android:name="android.intent.action.BUGREPORT_FINISHED" /> <protected-broadcast android:name="android.intent.action.ACTION_IDLE_MAINTENANCE_START" /> <protected-broadcast android:name="android.intent.action.ACTION_IDLE_MAINTENANCE_END" /> Loading
packages/Shell/Android.mk +2 −0 Original line number Diff line number Diff line Loading @@ -5,6 +5,8 @@ LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := $(call all-subdir-java-files) LOCAL_STATIC_JAVA_LIBRARIES := android-support-v4 LOCAL_PACKAGE_NAME := Shell LOCAL_CERTIFICATE := platform Loading
packages/Shell/AndroidManifest.xml +27 −2 Original line number Diff line number Diff line Loading @@ -68,7 +68,32 @@ <uses-permission android:name="android.permission.INTERACT_ACROSS_USERS_FULL" /> <uses-permission android:name="android.permission.MANAGE_USERS" /> <uses-permission android:name="android.permission.BLUETOOTH_STACK" /> <uses-permission android:name="android.permission.GET_ACCOUNTS" /> <application android:hasCode="false" android:label="@string/app_label"> <application android:label="@string/app_label"> <provider android:name="android.support.v4.content.FileProvider" android:authorities="com.android.shell" android:grantUriPermissions="true" android:exported="false"> <meta-data android:name="android.support.FILE_PROVIDER_PATHS" android:resource="@xml/file_provider_paths" /> </provider> <activity android:name=".BugreportWarningActivity" android:theme="@*android:style/Theme.Holo.Dialog.Alert" android:finishOnCloseSystemDialogs="true" android:excludeFromRecents="true" android:exported="false" /> <receiver android:name=".BugreportReceiver" android:permission="android.permission.DUMP"> <intent-filter> <action android:name="android.intent.action.BUGREPORT_FINISHED" /> </intent-filter> </receiver> </application> </manifest>