OSDN Git Service

Revert "Don't dispatch when non-interactive and the display is off."
authorJoe LaPenna <jlapenna@google.com>
Tue, 17 Nov 2015 22:22:37 +0000 (22:22 +0000)
committerJoe LaPenna <jlapenna@google.com>
Tue, 17 Nov 2015 22:26:41 +0000 (22:26 +0000)
This reverts commit 2ccf0c8e636fd3be75c3a07f4cf60d72a4cfaa28.

BUG: 22422588
BUG: 25067918

Change-Id: I916c8bb19cd6a73c0be4bd3a0e3112938651e775

services/core/java/com/android/server/policy/PhoneWindowManager.java

index ace2505..0cbf614 100644 (file)
@@ -5265,11 +5265,9 @@ public class PhoneWindowManager implements WindowManagerPolicy {
     }
 
     private boolean shouldDispatchInputWhenNonInteractive() {
-        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()) {
+        // Send events to keyguard while the screen is on.
+        if (isKeyguardShowingAndNotOccluded() && mDisplay != null
+                && mDisplay.getState() != Display.STATE_OFF) {
             return true;
         }