diff options
| author | 2022-04-05 21:54:04 +0000 | |
|---|---|---|
| committer | 2022-04-05 21:54:04 +0000 | |
| commit | 726e379fd15af4f7b10039487025371122d2db58 (patch) | |
| tree | cf0b33fabc8f4b42798a3f4e648fcf2bdfd5426b | |
| parent | 5ca230b6aa922f62550e5a78b728f3cb4b63b8b2 (diff) | |
| parent | d827727a571f7b669102f5d8e5630366974b561d (diff) | |
Merge "Log result of notification pending intent launch" into tm-dev am: b6e4780466 am: d827727a57
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/17451463
Change-Id: I0aab0568ad8dcc92e2542c70703ffdecf2d0b8c0
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2 files changed, 18 insertions, 7 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java index 6fe92fafc075..87ca942edff2 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarter.java @@ -489,7 +489,7 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte ExpandableNotificationRow row, boolean animate, boolean isActivityIntent) { - mLogger.logStartNotificationIntent(entry.getKey(), intent); + mLogger.logStartNotificationIntent(entry.getKey()); try { Runnable onFinishAnimationCallback = animate ? () -> mLaunchEventsEmitter.notifyFinishLaunchNotifActivity(entry) @@ -513,8 +513,10 @@ class StatusBarNotificationActivityStarter implements NotificationActivityStarte mKeyguardStateController.isShowing(), eventTime) : getActivityOptions(mCentralSurfaces.getDisplayId(), adapter); - return intent.sendAndReturnResult(mContext, 0, fillInIntent, null, + int result = intent.sendAndReturnResult(mContext, 0, fillInIntent, null, null, null, options); + mLogger.logSendPendingIntent(entry.getKey(), intent, result); + return result; }); } catch (PendingIntent.CanceledException e) { // the stack trace isn't very helpful here. diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterLogger.kt b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterLogger.kt index d118747a0365..2fbe520a4b61 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterLogger.kt +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarNotificationActivityStarterLogger.kt @@ -32,7 +32,7 @@ class StatusBarNotificationActivityStarterLogger @Inject constructor( buffer.log(TAG, DEBUG, { str1 = key }, { - "(1/4) onNotificationClicked: $str1" + "(1/5) onNotificationClicked: $str1" }) } @@ -40,7 +40,7 @@ class StatusBarNotificationActivityStarterLogger @Inject constructor( buffer.log(TAG, DEBUG, { str1 = key }, { - "(2/4) handleNotificationClickAfterKeyguardDismissed: $str1" + "(2/5) handleNotificationClickAfterKeyguardDismissed: $str1" }) } @@ -48,16 +48,25 @@ class StatusBarNotificationActivityStarterLogger @Inject constructor( buffer.log(TAG, DEBUG, { str1 = key }, { - "(3/4) handleNotificationClickAfterPanelCollapsed: $str1" + "(3/5) handleNotificationClickAfterPanelCollapsed: $str1" }) } - fun logStartNotificationIntent(key: String, pendingIntent: PendingIntent) { + fun logStartNotificationIntent(key: String) { + buffer.log(TAG, INFO, { + str1 = key + }, { + "(4/5) startNotificationIntent: $str1" + }) + } + + fun logSendPendingIntent(key: String, pendingIntent: PendingIntent, result: Int) { buffer.log(TAG, INFO, { str1 = key str2 = pendingIntent.intent.toString() + int1 = result }, { - "(4/4) Starting $str2 for notification $str1" + "(5/5) Started intent $str2 for notification $str1 with result code $int1" }) } |