diff options
| -rw-r--r-- | packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java index 768567b8b474..c23577c523e3 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelViewController.java @@ -385,11 +385,16 @@ public abstract class PanelViewController { final boolean expand; if (event.getActionMasked() == MotionEvent.ACTION_CANCEL || forceCancel) { - // If we get a cancel, put the shade back to the state it was in when the gesture - // started - if (onKeyguard) { + // If the keyguard is fading away, don't expand it again. This can happen if you're + // swiping to unlock, the app below the keyguard is in landscape, and the screen + // rotates while your finger is still down after the swipe to unlock. + if (mKeyguardStateController.isKeyguardFadingAway()) { + expand = false; + } else if (onKeyguard) { expand = true; } else { + // If we get a cancel, put the shade back to the state it was in when the + // gesture started expand = !mPanelClosedOnDown; } } else { |