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

Commit b4de9140 authored by Winson Chung's avatar Winson Chung Committed by Android (Google) Code Review
Browse files

Merge "Ensure prediction bar is visible when intercepting touch events. " into ub-launcher3-burnaby

parents 2f08aa3e 6339911b
Loading
Loading
Loading
Loading
+11 −6
Original line number Diff line number Diff line
@@ -659,6 +659,7 @@ public class AppsContainerView extends BaseContainerView implements DragSource,
                // We workaround the fact that the recycler view needs the touches for the scroll
                // and we want to intercept it for clicks in the prediction bar by handling clicks
                // and long clicks in the prediction bar ourselves.
                if (mPredictionBarView != null && mPredictionBarView.getVisibility() == View.VISIBLE) {
                    mPredictionIconTouchDownPos.set(x, y);
                    mPredictionIconUnderTouch = findPredictedAppAtCoordinate(x, y);
                    if (mPredictionIconUnderTouch != null) {
@@ -666,6 +667,7 @@ public class AppsContainerView extends BaseContainerView implements DragSource,
                                new CheckLongPressHelper(mPredictionIconUnderTouch, this);
                        mPredictionIconCheckForLongPress.postCheckForLongPress();
                    }
                }

                if (!mFixedBounds.isEmpty()) {
                    // Outset the fixed bounds and check if the touch is outside all apps
@@ -731,6 +733,9 @@ public class AppsContainerView extends BaseContainerView implements DragSource,
        Utilities.mapCoordInSelfToDescendent(mPredictionBarView, this, coord);
        for (int i = 0; i < mPredictionBarView.getChildCount(); i++) {
            View child = mPredictionBarView.getChildAt(i);
            if (child.getVisibility() != View.VISIBLE) {
                continue;
            }
            child.getHitRect(hitRect);
            if (hitRect.contains(coord[0], coord[1])) {
                return child;