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
diff --git a/services/core/java/com/android/server/notification/NotificationManagerService.java b/services/core/java/com/android/server/notification/NotificationManagerService.java
index de3f50a..a1eeb70 100644
--- a/services/core/java/com/android/server/notification/NotificationManagerService.java
+++ b/services/core/java/com/android/server/notification/NotificationManagerService.java
@@ -769,7 +769,10 @@
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);