diff options
| author | 2023-05-11 17:38:11 +0000 | |
|---|---|---|
| committer | 2023-05-11 12:48:17 -0700 | |
| commit | 9672ee148f751724ebeb15333cf5c7a37467bc6b (patch) | |
| tree | 0edb599ebd9bd4bffc1cc33ccd12933aec1c1b2a | |
| parent | 813b664c004878a35ac85bbc9d679500d77e5513 (diff) | |
Add logging when broadcast is sent using shell commands.
Bug: 280015076
Test: manual
Change-Id: I3102360503d016502333041ae9d1b5ab748ad8b2
| -rw-r--r-- | services/core/java/com/android/server/am/ActivityManagerShellCommand.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java index 8759e3f207c4..979874e49ad1 100644 --- a/services/core/java/com/android/server/am/ActivityManagerShellCommand.java +++ b/services/core/java/com/android/server/am/ActivityManagerShellCommand.java @@ -918,6 +918,7 @@ final class ActivityManagerShellCommand extends ShellCommand { } int runSendBroadcast(PrintWriter pw) throws RemoteException { + pw = new PrintWriter(new TeeWriter(LOG_WRITER_INFO, pw)); Intent intent; try { intent = makeIntent(UserHandle.USER_CURRENT); @@ -931,9 +932,10 @@ final class ActivityManagerShellCommand extends ShellCommand { pw.println("Broadcasting: " + intent); pw.flush(); Bundle bundle = mBroadcastOptions == null ? null : mBroadcastOptions.toBundle(); - mInterface.broadcastIntentWithFeature(null, null, intent, null, receiver, 0, null, null, - requiredPermissions, null, null, android.app.AppOpsManager.OP_NONE, bundle, true, - false, mUserId); + final int result = mInterface.broadcastIntentWithFeature(null, null, intent, null, + receiver, 0, null, null, requiredPermissions, null, null, + android.app.AppOpsManager.OP_NONE, bundle, true, false, mUserId); + Slogf.i(TAG, "Broadcasted %s: " + result, intent); if (!mAsync) { receiver.waitForFinish(); } |