Merge "Add logging when broadcast is sent using shell commands." into udc-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
8020b8b64c
@@ -918,6 +918,7 @@ final class ActivityManagerShellCommand extends ShellCommand {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int runSendBroadcast(PrintWriter pw) throws RemoteException {
|
int runSendBroadcast(PrintWriter pw) throws RemoteException {
|
||||||
|
pw = new PrintWriter(new TeeWriter(LOG_WRITER_INFO, pw));
|
||||||
Intent intent;
|
Intent intent;
|
||||||
try {
|
try {
|
||||||
intent = makeIntent(UserHandle.USER_CURRENT);
|
intent = makeIntent(UserHandle.USER_CURRENT);
|
||||||
@@ -931,9 +932,10 @@ final class ActivityManagerShellCommand extends ShellCommand {
|
|||||||
pw.println("Broadcasting: " + intent);
|
pw.println("Broadcasting: " + intent);
|
||||||
pw.flush();
|
pw.flush();
|
||||||
Bundle bundle = mBroadcastOptions == null ? null : mBroadcastOptions.toBundle();
|
Bundle bundle = mBroadcastOptions == null ? null : mBroadcastOptions.toBundle();
|
||||||
mInterface.broadcastIntentWithFeature(null, null, intent, null, receiver, 0, null, null,
|
final int result = mInterface.broadcastIntentWithFeature(null, null, intent, null,
|
||||||
requiredPermissions, null, null, android.app.AppOpsManager.OP_NONE, bundle, true,
|
receiver, 0, null, null, requiredPermissions, null, null,
|
||||||
false, mUserId);
|
android.app.AppOpsManager.OP_NONE, bundle, true, false, mUserId);
|
||||||
|
Slogf.i(TAG, "Broadcasted %s: " + result, intent);
|
||||||
if (!mAsync) {
|
if (!mAsync) {
|
||||||
receiver.waitForFinish();
|
receiver.waitForFinish();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user