diff options
author | Jorim Jaggi <jjaggi@google.com> | 2015-09-11 17:45:22 -0700 |
---|---|---|
committer | Jorim Jaggi <jjaggi@google.com> | 2015-09-12 01:26:17 +0000 |
commit | 84dc08a208eea7a4ddf043cadbb28987cf90ae22 (patch) | |
tree | 3560aacff883b5a77a70b84c622c736ec96b4c74 /services | |
parent | 62b94c353a8748ef10691da4844bf894e1155870 (diff) | |
download | frameworks_base-84dc08a208eea7a4ddf043cadbb28987cf90ae22.zip frameworks_base-84dc08a208eea7a4ddf043cadbb28987cf90ae22.tar.gz frameworks_base-84dc08a208eea7a4ddf043cadbb28987cf90ae22.tar.bz2 |
Dump Keyguard state in SystemUI and PhoneWindowManager
Bug: 23970549
Change-Id: Iec1e8ac507268086e0e2935847eda606ea1fb700
Diffstat (limited to 'services')
4 files changed, 44 insertions, 0 deletions
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index d7e3c54..bb0731a 100644 --- a/services/core/java/com/android/server/policy/PhoneWindowManager.java +++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java @@ -7017,5 +7017,8 @@ public class PhoneWindowManager implements WindowManagerPolicy { if (mBurnInProtectionHelper != null) { mBurnInProtectionHelper.dump(prefix, pw); } + if (mKeyguardDelegate != null) { + mKeyguardDelegate.dump(prefix, pw); + } } } diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java index 6b45941..7ae3c79 100644 --- a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java +++ b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceDelegate.java @@ -23,6 +23,8 @@ import com.android.internal.policy.IKeyguardDrawnCallback; import com.android.internal.policy.IKeyguardExitCallback; import com.android.internal.policy.IKeyguardService; +import java.io.PrintWriter; + /** * A local class that keeps a cache of keyguard state that can be restored in the event * keyguard crashes. It currently also allows runtime-selectable @@ -393,4 +395,26 @@ public class KeyguardServiceDelegate { mKeyguardService.onActivityDrawn(); } } + + public void dump(String prefix, PrintWriter pw) { + pw.println(prefix + TAG); + prefix += " "; + pw.println(prefix + "showing=" + mKeyguardState.showing); + pw.println(prefix + "showingAndNotOccluded=" + mKeyguardState.showingAndNotOccluded); + pw.println(prefix + "inputRestricted=" + mKeyguardState.inputRestricted); + pw.println(prefix + "occluded=" + mKeyguardState.occluded); + pw.println(prefix + "secure=" + mKeyguardState.secure); + pw.println(prefix + "dreaming=" + mKeyguardState.dreaming); + pw.println(prefix + "systemIsReady=" + mKeyguardState.systemIsReady); + pw.println(prefix + "deviceHasKeyguard=" + mKeyguardState.deviceHasKeyguard); + pw.println(prefix + "enabled=" + mKeyguardState.enabled); + pw.println(prefix + "offReason=" + mKeyguardState.offReason); + pw.println(prefix + "currentUser=" + mKeyguardState.currentUser); + pw.println(prefix + "bootCompleted=" + mKeyguardState.bootCompleted); + pw.println(prefix + "screenState=" + mKeyguardState.screenState); + pw.println(prefix + "interactiveState=" + mKeyguardState.interactiveState); + if (mKeyguardService != null) { + mKeyguardService.dump(prefix, pw); + } + } } diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java index cd88b66..429b188 100644 --- a/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java +++ b/services/core/java/com/android/server/policy/keyguard/KeyguardServiceWrapper.java @@ -27,6 +27,8 @@ import com.android.internal.policy.IKeyguardExitCallback; import com.android.internal.policy.IKeyguardService; import com.android.internal.policy.IKeyguardStateCallback; +import java.io.PrintWriter; + /** * A wrapper class for KeyguardService. It implements IKeyguardService to ensure the interface * remains consistent. @@ -239,4 +241,8 @@ public class KeyguardServiceWrapper implements IKeyguardService { public boolean isInputRestricted() { return mKeyguardStateMonitor.isInputRestricted(); } + + public void dump(String prefix, PrintWriter pw) { + mKeyguardStateMonitor.dump(prefix, pw); + } }
\ No newline at end of file diff --git a/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java b/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java index f1f9c50..30cff03 100644 --- a/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java +++ b/services/core/java/com/android/server/policy/keyguard/KeyguardStateMonitor.java @@ -25,6 +25,8 @@ import com.android.internal.policy.IKeyguardService; import com.android.internal.policy.IKeyguardStateCallback; import com.android.internal.widget.LockPatternUtils; +import java.io.PrintWriter; + /** * Maintains a cached copy of Keyguard's state. * @hide @@ -90,4 +92,13 @@ public class KeyguardStateMonitor extends IKeyguardStateCallback.Stub { public void onInputRestrictedStateChanged(boolean inputRestricted) { mInputRestricted = inputRestricted; } + + public void dump(String prefix, PrintWriter pw) { + pw.println(prefix + TAG); + prefix += " "; + pw.println(prefix + "mIsShowing=" + mIsShowing); + pw.println(prefix + "mSimSecure=" + mSimSecure); + pw.println(prefix + "mInputRestricted=" + mInputRestricted); + pw.println(prefix + "mCurrentUserId=" + mCurrentUserId); + } }
\ No newline at end of file |