Log result of notification pending intent launch
Bug: 225884919 Test: click a notification, verify new logging is present Change-Id: I50c36d930de2c3cc8f080616ffd01a786e366013
This commit is contained in:
@@ -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.
|
||||
|
||||
@@ -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"
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user