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

Commit 71a2e33d authored by Thiru Ramasamy's avatar Thiru Ramasamy Committed by Automerger Merge Worker
Browse files

Merge "Migrates LOCKSCREEN and BOUNCER logs from TRON to Westworld" into...

Merge "Migrates LOCKSCREEN and BOUNCER logs from TRON to Westworld" into rvc-dev am: 71eaae37 am: 5ad6c18a am: 98631dc3

Change-Id: I8d38a22839312aafcf6fdef0b2802f5a56ef008c
parents c4988ae7 98631dc3
Loading
Loading
Loading
Loading
+49 −0
Original line number Original line Diff line number Diff line
@@ -116,6 +116,9 @@ import android.widget.DateTimeView;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.annotations.VisibleForTesting;
import com.android.internal.colorextraction.ColorExtractor;
import com.android.internal.colorextraction.ColorExtractor;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.MetricsLogger;
import com.android.internal.logging.UiEvent;
import com.android.internal.logging.UiEventLogger;
import com.android.internal.logging.UiEventLoggerImpl;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.logging.nano.MetricsProto.MetricsEvent;
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.statusbar.IStatusBarService;
import com.android.internal.statusbar.RegisterStatusBarResult;
import com.android.internal.statusbar.RegisterStatusBarResult;
@@ -301,6 +304,8 @@ public class StatusBar extends SystemUI implements DemoMode,
    /** If true, the lockscreen will show a distinct wallpaper */
    /** If true, the lockscreen will show a distinct wallpaper */
    public static final boolean ENABLE_LOCKSCREEN_WALLPAPER = true;
    public static final boolean ENABLE_LOCKSCREEN_WALLPAPER = true;


    private static final UiEventLogger sUiEventLogger = new UiEventLoggerImpl();

    static {
    static {
        boolean onlyCoreApps;
        boolean onlyCoreApps;
        try {
        try {
@@ -459,6 +464,44 @@ public class StatusBar extends SystemUI implements DemoMode,
        }
        }
    };
    };


    @VisibleForTesting
    public enum StatusBarUiEvent implements UiEventLogger.UiEventEnum {
        @UiEvent(doc = "Secured lockscreen is opened.")
        LOCKSCREEN_OPEN_SECURE(405),

        @UiEvent(doc = "Lockscreen without security is opened.")
        LOCKSCREEN_OPEN_INSECURE(406),

        @UiEvent(doc = "Secured lockscreen is closed.")
        LOCKSCREEN_CLOSE_SECURE(407),

        @UiEvent(doc = "Lockscreen without security is closed.")
        LOCKSCREEN_CLOSE_INSECURE(408),

        @UiEvent(doc = "Secured bouncer is opened.")
        BOUNCER_OPEN_SECURE(409),

        @UiEvent(doc = "Bouncer without security is opened.")
        BOUNCER_OPEN_INSECURE(410),

        @UiEvent(doc = "Secured bouncer is closed.")
        BOUNCER_CLOSE_SECURE(411),

        @UiEvent(doc = "Bouncer without security is closed.")
        BOUNCER_CLOSE_INSECURE(412);

        private final int mId;

        StatusBarUiEvent(int id) {
            mId = id;
        }

        @Override
        public int getId() {
            return mId;
        }
    }

    protected final H mHandler = createHandler();
    protected final H mHandler = createHandler();


    private int mInteractingWindows;
    private int mInteractingWindows;
@@ -2909,6 +2952,12 @@ public class StatusBar extends SystemUI implements DemoMode,
                    isSecure ? 1 : 0,
                    isSecure ? 1 : 0,
                    unlocked ? 1 : 0);
                    unlocked ? 1 : 0);
            mLastLoggedStateFingerprint = stateFingerprint;
            mLastLoggedStateFingerprint = stateFingerprint;

            StringBuilder uiEventValueBuilder = new StringBuilder();
            uiEventValueBuilder.append(isBouncerShowing ? "BOUNCER" : "LOCKSCREEN");
            uiEventValueBuilder.append(isShowing ? "_OPEN" : "_CLOSE");
            uiEventValueBuilder.append(isSecure ? "_SECURE" : "_INSECURE");
            sUiEventLogger.log(StatusBarUiEvent.valueOf(uiEventValueBuilder.toString()));
        }
        }
    }
    }