Loading proto/src/metrics_constants/metrics_constants.proto +8 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading services/core/java/com/android/server/power/Notifier.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -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); Loading Loading @@ -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); Loading Loading
proto/src/metrics_constants/metrics_constants.proto +8 −0 Original line number Original line Diff line number Diff line Loading @@ -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 Loading
services/core/java/com/android/server/power/Notifier.java +4 −0 Original line number Original line Diff line number Diff line Loading @@ -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); Loading Loading @@ -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); Loading