diff options
| author | 2015-08-06 14:14:15 +0000 | |
|---|---|---|
| committer | 2015-08-06 14:14:15 +0000 | |
| commit | 0126d457d6eb0d9503a96856a4c95c64014cb877 (patch) | |
| tree | 9c0c27c4586b07035c3cae12555079b79873329d | |
| parent | 4b74d6693e2ea7248de79332a020672ece19b100 (diff) | |
| parent | 43a95cf1cdf5cd62b81af3222d194a0873ad6933 (diff) | |
am 43a95cf1: am 44a14ef7: am eb7e3d7e: Merge "Don\'t dispatch when non-interactive and the display is off." into mnc-dev
* commit '43a95cf1cdf5cd62b81af3222d194a0873ad6933':
Don't dispatch when non-interactive and the display is off.
| -rw-r--r-- | services/core/java/com/android/server/policy/PhoneWindowManager.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/services/core/java/com/android/server/policy/PhoneWindowManager.java b/services/core/java/com/android/server/policy/PhoneWindowManager.java index da8fb702a56e..c4ff277945a2 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 @@ public class PhoneWindowManager implements WindowManagerPolicy { } 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; } |