Loading services/core/java/com/android/server/notification/NotificationRecord.java +4 −6 Original line number Diff line number Diff line Loading @@ -1291,14 +1291,12 @@ public final class NotificationRecord { lm.addTaggedData(MetricsEvent.FIELD_NOTIFICATION_IMPORTANCE_INITIAL, stats.naturalImportance); } // Log Assistant override if it was itself overridden by System. Since System can't be // overridden, it never needs logging. if (mImportanceExplanationCode == MetricsEvent.IMPORTANCE_EXPLANATION_SYSTEM && mAssistantImportance != IMPORTANCE_UNSPECIFIED) { } // Log Assistant override if present, whether or not importance calculation is complete. if (mAssistantImportance != IMPORTANCE_UNSPECIFIED) { lm.addTaggedData(MetricsEvent.FIELD_NOTIFICATION_IMPORTANCE_ASST, mAssistantImportance); } } return lm; } Loading services/tests/uiservicestests/src/com/android/server/notification/NotificationRecordTest.java +3 −2 Original line number Diff line number Diff line Loading @@ -477,8 +477,9 @@ public class NotificationRecordTest extends UiServiceTestCase { assertEquals(MetricsEvent.IMPORTANCE_EXPLANATION_APP, logMaker.getTaggedData( MetricsEvent.FIELD_NOTIFICATION_IMPORTANCE_INITIAL_EXPLANATION)); // This field is only populated if the assistant was itself overridden by the system. assertNull(logMaker.getTaggedData(MetricsEvent.FIELD_NOTIFICATION_IMPORTANCE_ASST)); // This field is populated whenever mImportanceExplanationCode is. assertEquals(IMPORTANCE_LOW, logMaker.getTaggedData(MetricsEvent.FIELD_NOTIFICATION_IMPORTANCE_ASST)); } @Test Loading Loading
services/core/java/com/android/server/notification/NotificationRecord.java +4 −6 Original line number Diff line number Diff line Loading @@ -1291,14 +1291,12 @@ public final class NotificationRecord { lm.addTaggedData(MetricsEvent.FIELD_NOTIFICATION_IMPORTANCE_INITIAL, stats.naturalImportance); } // Log Assistant override if it was itself overridden by System. Since System can't be // overridden, it never needs logging. if (mImportanceExplanationCode == MetricsEvent.IMPORTANCE_EXPLANATION_SYSTEM && mAssistantImportance != IMPORTANCE_UNSPECIFIED) { } // Log Assistant override if present, whether or not importance calculation is complete. if (mAssistantImportance != IMPORTANCE_UNSPECIFIED) { lm.addTaggedData(MetricsEvent.FIELD_NOTIFICATION_IMPORTANCE_ASST, mAssistantImportance); } } return lm; } Loading
services/tests/uiservicestests/src/com/android/server/notification/NotificationRecordTest.java +3 −2 Original line number Diff line number Diff line Loading @@ -477,8 +477,9 @@ public class NotificationRecordTest extends UiServiceTestCase { assertEquals(MetricsEvent.IMPORTANCE_EXPLANATION_APP, logMaker.getTaggedData( MetricsEvent.FIELD_NOTIFICATION_IMPORTANCE_INITIAL_EXPLANATION)); // This field is only populated if the assistant was itself overridden by the system. assertNull(logMaker.getTaggedData(MetricsEvent.FIELD_NOTIFICATION_IMPORTANCE_ASST)); // This field is populated whenever mImportanceExplanationCode is. assertEquals(IMPORTANCE_LOW, logMaker.getTaggedData(MetricsEvent.FIELD_NOTIFICATION_IMPORTANCE_ASST)); } @Test Loading