Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 02fea57d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes from topic "latency" into pi-dev

* changes:
  use the dedicated latency field in logmaker
  add reserved latency field
parents 5d9617c4 c679465c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
    }

+3 −3
Original line number Diff line number Diff line
@@ -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;
@@ -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)) {
+4 −0
Original line number Diff line number Diff line
@@ -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 ----
    // Add new aosp constants above this line.
    // END OF AOSP CONSTANTS