diff options
author | John Spurlock <jspurlock@google.com> | 2014-09-29 16:28:51 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2014-09-29 16:28:52 +0000 |
commit | e5238f7a8db90ebc0e8875adaff84efc198f0800 (patch) | |
tree | ebd216a4eb0750d77ae70c12fe119bb5d6bad3e4 /packages | |
parent | f7c4509ffbbe6b1849c3ea61edac8d1d23906eaa (diff) | |
parent | bee3b0a023eac88922b51d4940537c5d0332f6fc (diff) | |
download | frameworks_base-e5238f7a8db90ebc0e8875adaff84efc198f0800.zip frameworks_base-e5238f7a8db90ebc0e8875adaff84efc198f0800.tar.gz frameworks_base-e5238f7a8db90ebc0e8875adaff84efc198f0800.tar.bz2 |
Merge "DozeLog: Keep keyguard monitor alive, keep emer call stats." into lmp-dev
Diffstat (limited to 'packages')
-rw-r--r-- | packages/SystemUI/src/com/android/systemui/doze/DozeLog.java | 53 |
1 files changed, 30 insertions, 23 deletions
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 @@ public class DozeLog { 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 class DozeLog { public static void traceEmergencyCall() { if (!ENABLED) return; log("emergencyCall"); + sEmergencyCallStats.append(); } public static void traceKeyguardBouncerChanged(boolean showing) { @@ -208,4 +187,32 @@ public class DozeLog { 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); + } + }; } |