Log notification location when a notification action is clicked.

Bug: 120767764
Test: press a smart action from notification shade, and one from a
heads-up notification to ensure the correct notification locations are
logged.
Change-Id: I2fb10bec9c0c1da0807581a0337f8f6b1adc620e
This commit is contained in:
Gustav Sennton
2019-01-28 21:09:54 +00:00
parent 9b23e4f42b
commit 729919670f

View File

@@ -769,7 +769,10 @@ public class NotificationManagerService extends SystemService {
action.isContextual() ? 1 : 0)
.addTaggedData(
MetricsEvent.NOTIFICATION_SMART_SUGGESTION_ASSISTANT_GENERATED,
generatedByAssistant ? 1 : 0));
generatedByAssistant ? 1 : 0)
.addTaggedData(MetricsEvent.NOTIFICATION_LOCATION,
nv.location.toMetricsEventEnum()));
EventLogTags.writeNotificationActionClicked(key, actionIndex,
r.getLifespanMs(now), r.getFreshnessMs(now), r.getExposureMs(now),
nv.rank, nv.count);