From 44f9e5a5971aeeb81a9bf67cf48be6a1e1e6ee98 Mon Sep 17 00:00:00 2001 From: lumark Date: Mon, 7 May 2018 21:49:35 +0800 Subject: [PATCH] Fix Panel position may not update when device screen off / on quickly. Due to framework side will not callback onScreenTurningOn() when device screen off / on quickly, So NotificationPanel will not called onScreenTurningOn to update panel position. There is also a potential issue for cancel touch will be ignored when touch disable in onFinishedGoingToSleep(). Let ACTION_CANCEL can pass even touch disable to recover Panel position by fling back. Bug: 79336031 Test: Manual Change-Id: I45f2fbd8bfef99d86c3d023f07d2fd051d98f083 --- .../src/com/android/systemui/statusbar/phone/PanelView.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java index 347a4b04554b7..bef6944c9dbeb 100644 --- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java +++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/PanelView.java @@ -252,7 +252,8 @@ public abstract class PanelView extends FrameLayout { @Override public boolean onTouchEvent(MotionEvent event) { - if (mInstantExpanding || mTouchDisabled + if (mInstantExpanding + || (mTouchDisabled && event.getActionMasked() != MotionEvent.ACTION_CANCEL) || (mMotionAborted && event.getActionMasked() != MotionEvent.ACTION_DOWN)) { return false; }