Merge "Don't dispatch when non-interactive and the display is off." into mnc-dev

This commit is contained in:
Michael Wright
2015-08-06 13:50:37 +00:00
committed by Android (Google) Code Review

View File

@@ -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;
}