summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Will Brockman <brockman@google.com> 2019-01-15 11:36:06 -0500
committer Will Brockman <brockman@google.com> 2019-01-15 11:36:06 -0500
commit2a1e6b856a00fdf989852614ba6fb786d7fd2a46 (patch)
treeb77255c84b1a4ccd3d97a5873733f1eaf10bba20
parentb5f01f16bb5f45c58294d0843787854fe210c1fa (diff)
Create a valid TYPE for the NOTIFICATION_ASSISTANT_ADJUSTMENT Tron log
message, and switch the code to use it. Using the same enum value as before to avoid a discontinuity in the logs. Bug: 122737498 Test: atest FrameworksUiServicesTests Change-Id: I6e890ecc064be18fe478433bf89412c1fbc9c50e
-rw-r--r--proto/src/metrics_constants/metrics_constants.proto4
-rw-r--r--services/core/java/com/android/server/notification/NotificationRecord.java2
2 files changed, 5 insertions, 1 deletions
diff --git a/proto/src/metrics_constants/metrics_constants.proto b/proto/src/metrics_constants/metrics_constants.proto
index 44edb568573c..d464358148b6 100644
--- a/proto/src/metrics_constants/metrics_constants.proto
+++ b/proto/src/metrics_constants/metrics_constants.proto
@@ -73,6 +73,10 @@ message MetricsEvent {
// The view switched to summary mode (most relevant for notifications)
TYPE_COLLAPSE = 14;
+
+ // The notification was adjusted by the assistant. Enum value is
+ // out of sequence due to b/122737498.
+ TYPE_NOTIFICATION_ASSISTANT_ADJUSTMENT = 1573;
}
// Types of alerts, as bit field values
diff --git a/services/core/java/com/android/server/notification/NotificationRecord.java b/services/core/java/com/android/server/notification/NotificationRecord.java
index 559874167429..02fc51f89e62 100644
--- a/services/core/java/com/android/server/notification/NotificationRecord.java
+++ b/services/core/java/com/android/server/notification/NotificationRecord.java
@@ -1263,7 +1263,7 @@ public final class NotificationRecord {
public LogMaker getAdjustmentLogMaker() {
return getLogMaker()
.setCategory(MetricsEvent.NOTIFICATION_ITEM)
- .setType(MetricsEvent.NOTIFICATION_ASSISTANT_ADJUSTMENT);
+ .setType(MetricsEvent.TYPE_NOTIFICATION_ASSISTANT_ADJUSTMENT);
}
@VisibleForTesting