am e5238f7a: Merge "DozeLog: Keep keyguard monitor alive, keep emer call stats." into lmp-dev
* commit 'e5238f7a8db90ebc0e8875adaff84efc198f0800':
DozeLog: Keep keyguard monitor alive, keep emer call stats.
diff --git a/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java b/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java
index 3bf86a0..34bbc2e 100644
--- a/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java
+++ b/packages/SystemUI/src/com/android/systemui/doze/DozeLog.java
@@ -89,29 +89,7 @@
sScreenOnNotPulsingStats = new SummaryStats();
sEmergencyCallStats = new SummaryStats();
log("init");
- KeyguardUpdateMonitor.getInstance(context)
- .registerCallback(new KeyguardUpdateMonitorCallback() {
- @Override
- public void onEmergencyCallAction() {
- traceEmergencyCall();
- }
- @Override
- public void onKeyguardBouncerChanged(boolean bouncer) {
- traceKeyguardBouncerChanged(bouncer);
- }
- @Override
- public void onScreenTurnedOn() {
- traceScreenOn();
- }
- @Override
- public void onScreenTurnedOff(int why) {
- traceScreenOff(why);
- }
- @Override
- public void onKeyguardVisibilityChanged(boolean showing) {
- traceKeyguard(showing);
- }
- });
+ KeyguardUpdateMonitor.getInstance(context).registerCallback(sKeyguardCallback);
}
}
log("dozing " + dozing);
@@ -126,6 +104,7 @@
public static void traceEmergencyCall() {
if (!ENABLED) return;
log("emergencyCall");
+ sEmergencyCallStats.append();
}
public static void traceKeyguardBouncerChanged(boolean showing) {
@@ -208,4 +187,32 @@
pw.println();
}
}
+
+ private static final KeyguardUpdateMonitorCallback sKeyguardCallback =
+ new KeyguardUpdateMonitorCallback() {
+ @Override
+ public void onEmergencyCallAction() {
+ traceEmergencyCall();
+ }
+
+ @Override
+ public void onKeyguardBouncerChanged(boolean bouncer) {
+ traceKeyguardBouncerChanged(bouncer);
+ }
+
+ @Override
+ public void onScreenTurnedOn() {
+ traceScreenOn();
+ }
+
+ @Override
+ public void onScreenTurnedOff(int why) {
+ traceScreenOff(why);
+ }
+
+ @Override
+ public void onKeyguardVisibilityChanged(boolean showing) {
+ traceKeyguard(showing);
+ }
+ };
}