am eb7e3d7e: Merge "Don\'t dispatch when non-interactive and the display is off." into mnc-dev
* commit 'eb7e3d7e456177f7848834759b9a7f6f78a05f7a':
Don't dispatch when non-interactive and the display is off.
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java
index da8fb70..c4ff277 100644
--- a/services/core/java/com/android/server/policy/PhoneWindowManager.java
+++ b/services/core/java/com/android/server/policy/PhoneWindowManager.java
@@ -5229,9 +5229,11 @@
}
private boolean shouldDispatchInputWhenNonInteractive() {
- // Send events to keyguard while the screen is on.
- if (isKeyguardShowingAndNotOccluded() && mDisplay != null
- && mDisplay.getState() != Display.STATE_OFF) {
+ if (mDisplay == null || mDisplay.getState() == Display.STATE_OFF) {
+ return false;
+ }
+ // Send events to keyguard while the screen is on and it's showing.
+ if (isKeyguardShowingAndNotOccluded()) {
return true;
}