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

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

Merge "Add logging for the detailed reason of screen on/off."

parents d2b1925d 0e6e5de7
Loading
Loading
Loading
Loading
+8 −0
Original line number Original line Diff line number Diff line
@@ -7124,6 +7124,14 @@ message MetricsEvent {
    // OS: Q
    // OS: Q
    DIALOG_FACE_REMOVE = 1693;
    DIALOG_FACE_REMOVE = 1693;


    // FIELD - Detailed reason in screen wake. One of WAKE_REASON_* in PowerManager.
    // OS: Q
    FIELD_SCREEN_WAKE_REASON = 1694;

    // FIELD - Detailed reason in screen sleep. One of GO_TO_SLEEP_REASON_* in PowerManager.
    // OS: Q
    FIELD_SCREEN_SLEEP_REASON = 1695;

    // ---- End Q Constants, all Q constants go above this line ----
    // ---- End Q Constants, all Q constants go above this line ----
    // Add new aosp constants above this line.
    // Add new aosp constants above this line.
    // END OF AOSP CONSTANTS
    // END OF AOSP CONSTANTS
+4 −0
Original line number Original line Diff line number Diff line
@@ -486,6 +486,8 @@ public class Notifier {
                        log.setType(MetricsEvent.TYPE_OPEN);
                        log.setType(MetricsEvent.TYPE_OPEN);
                        log.setSubtype(why);
                        log.setSubtype(why);
                        log.setLatency(interactiveChangeLatency);
                        log.setLatency(interactiveChangeLatency);
                        log.addTaggedData(
                                MetricsEvent.FIELD_SCREEN_WAKE_REASON, mInteractiveChangeReason);
                        MetricsLogger.action(log);
                        MetricsLogger.action(log);
                        EventLogTags.writePowerScreenState(1, 0, 0, 0, interactiveChangeLatency);
                        EventLogTags.writePowerScreenState(1, 0, 0, 0, interactiveChangeLatency);
                        mPolicy.finishedWakingUp(why);
                        mPolicy.finishedWakingUp(why);
@@ -513,6 +515,8 @@ public class Notifier {
                        log.setType(MetricsEvent.TYPE_CLOSE);
                        log.setType(MetricsEvent.TYPE_CLOSE);
                        log.setSubtype(why);
                        log.setSubtype(why);
                        log.setLatency(interactiveChangeLatency);
                        log.setLatency(interactiveChangeLatency);
                        log.addTaggedData(
                                MetricsEvent.FIELD_SCREEN_SLEEP_REASON, mInteractiveChangeReason);
                        MetricsLogger.action(log);
                        MetricsLogger.action(log);
                        EventLogTags.writePowerScreenState(0, why, 0, 0, interactiveChangeLatency);
                        EventLogTags.writePowerScreenState(0, why, 0, 0, interactiveChangeLatency);
                        mPolicy.finishedGoingToSleep(why);
                        mPolicy.finishedGoingToSleep(why);