Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 03a9ea8f authored by Lyn Han's avatar Lyn Han Committed by Automerger Merge Worker
Browse files

Merge "Fix shade flicker & touch absorption" into sc-qpr1-dev am: dbdc35d2...

Merge "Fix shade flicker & touch absorption" into sc-qpr1-dev am: dbdc35d2 am: d15f6024 am: e000c03e

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/15546043

Change-Id: I82660e5e790ca7923f5a35d47a5d42551a9bd829
parents a266f9af e000c03e
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -1213,10 +1213,14 @@ public abstract class PanelViewController {
                case MotionEvent.ACTION_MOVE:
                    final float h = y - mInitialTouchY;
                    addMovement(event);
                    if (canCollapsePanel || mTouchStartedInEmptyArea || mAnimatingOnDown) {
                    final boolean openShadeWithoutHun =
                            mPanelClosedOnDown && !mCollapsedAndHeadsUpOnDown;
                    if (canCollapsePanel || mTouchStartedInEmptyArea || mAnimatingOnDown
                            || openShadeWithoutHun) {
                        float hAbs = Math.abs(h);
                        float touchSlop = getTouchSlop(event);
                        if ((h < -touchSlop || (mAnimatingOnDown && hAbs > touchSlop))
                        if ((h < -touchSlop
                                || ((openShadeWithoutHun || mAnimatingOnDown) && hAbs > touchSlop))
                                && hAbs > Math.abs(x - mInitialTouchX)) {
                            cancelHeightAnimator();
                            startExpandMotion(x, y, true /* startTracking */, mExpandedHeight);
@@ -1229,10 +1233,7 @@ public abstract class PanelViewController {
                    mVelocityTracker.clear();
                    break;
            }

            // Finally, if none of the above cases applies, ensure that touches do not get handled
            // by the contents of a panel that is not showing (a bit of a hack to avoid b/178277858)
            return (mView.getVisibility() != View.VISIBLE);
            return false;
        }

        @Override