Loading core/java/android/metrics/LogMaker.java +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public class LogMaker { * @hide // TODO Expose in the future? Too late for O. */ public LogMaker setLatency(long milliseconds) { entries.put(MetricsEvent.NOTIFICATION_SINCE_CREATE_MILLIS, milliseconds); entries.put(MetricsEvent.RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS, milliseconds); return this; } Loading packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/IconLoggerImplTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.systemui.statusbar.policy; import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_NUM_STATUS_ICONS; import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_STATUS_ICONS; import static com.android.internal.logging.nano.MetricsProto.MetricsEvent .NOTIFICATION_SINCE_CREATE_MILLIS; .RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS; import static org.junit.Assert.*; import static org.mockito.ArgumentMatchers.any; Loading Loading @@ -119,9 +119,9 @@ public class IconLoggerImplTest extends SysuiTestCase { verify(mMetricsLogger).write(argThat(maker -> { if (IconLoggerImpl.MIN_LOG_INTERVAL > (long) maker.getTaggedData(NOTIFICATION_SINCE_CREATE_MILLIS)) { (long) maker.getTaggedData(RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS)) { Log.e("IconLoggerImplTest", "Invalid latency " + maker.getTaggedData(NOTIFICATION_SINCE_CREATE_MILLIS)); + maker.getTaggedData(RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS)); return false; } if (1 != (int) maker.getTaggedData(FIELD_NUM_STATUS_ICONS)) { Loading proto/src/metrics_constants.proto +4 −0 Original line number Diff line number Diff line Loading @@ -5503,6 +5503,10 @@ message MetricsEvent { // OS: P ACTION_MANAGE_NOTIFICATIONS = 1358; // This value should never appear in log outputs - it is reserved for // internal platform metrics use. RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS = 1359; // ---- End P Constants, all P constants go above this line ---- // First Q constant in master goes here: Loading Loading
core/java/android/metrics/LogMaker.java +1 −1 Original line number Diff line number Diff line Loading @@ -103,7 +103,7 @@ public class LogMaker { * @hide // TODO Expose in the future? Too late for O. */ public LogMaker setLatency(long milliseconds) { entries.put(MetricsEvent.NOTIFICATION_SINCE_CREATE_MILLIS, milliseconds); entries.put(MetricsEvent.RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS, milliseconds); return this; } Loading
packages/SystemUI/tests/src/com/android/systemui/statusbar/policy/IconLoggerImplTest.java +3 −3 Original line number Diff line number Diff line Loading @@ -17,7 +17,7 @@ package com.android.systemui.statusbar.policy; import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_NUM_STATUS_ICONS; import static com.android.internal.logging.nano.MetricsProto.MetricsEvent.FIELD_STATUS_ICONS; import static com.android.internal.logging.nano.MetricsProto.MetricsEvent .NOTIFICATION_SINCE_CREATE_MILLIS; .RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS; import static org.junit.Assert.*; import static org.mockito.ArgumentMatchers.any; Loading Loading @@ -119,9 +119,9 @@ public class IconLoggerImplTest extends SysuiTestCase { verify(mMetricsLogger).write(argThat(maker -> { if (IconLoggerImpl.MIN_LOG_INTERVAL > (long) maker.getTaggedData(NOTIFICATION_SINCE_CREATE_MILLIS)) { (long) maker.getTaggedData(RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS)) { Log.e("IconLoggerImplTest", "Invalid latency " + maker.getTaggedData(NOTIFICATION_SINCE_CREATE_MILLIS)); + maker.getTaggedData(RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS)); return false; } if (1 != (int) maker.getTaggedData(FIELD_NUM_STATUS_ICONS)) { Loading
proto/src/metrics_constants.proto +4 −0 Original line number Diff line number Diff line Loading @@ -5503,6 +5503,10 @@ message MetricsEvent { // OS: P ACTION_MANAGE_NOTIFICATIONS = 1358; // This value should never appear in log outputs - it is reserved for // internal platform metrics use. RESERVED_FOR_LOGBUILDER_LATENCY_MILLIS = 1359; // ---- End P Constants, all P constants go above this line ---- // First Q constant in master goes here: Loading