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

Commit 7c49cb3a authored by Tracy Zhou's avatar Tracy Zhou Committed by Android (Google) Code Review
Browse files

Merge "Support 3-finger swipe to pull down notifications from app" into udc-dev

parents 7da60438 75b534e9
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -21,7 +21,6 @@ import static android.view.MotionEvent.ACTION_MOVE;
import static android.view.MotionEvent.ACTION_UP;
import static android.view.WindowManager.LayoutParams.FLAG_SLIPPERY;

import static com.android.launcher3.MotionEventsUtils.isTrackpadMotionEvent;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_SWIPE_DOWN_WORKSPACE_NOTISHADE_OPEN;

import android.graphics.PointF;
@@ -106,8 +105,7 @@ public class StatusBarTouchController implements TouchController {
            // Currently input dispatcher will not do touch transfer if there are more than
            // one touch pointer. Hence, even if slope passed, only set the slippery flag
            // when there is single touch event. (context: InputDispatcher.cpp line 1445)
            if (dy > mTouchSlop && dy > Math.abs(dx) && (isTrackpadMotionEvent(ev)
                    || ev.getPointerCount() == 1)) {
            if (dy > mTouchSlop && dy > Math.abs(dx) && ev.getPointerCount() == 1) {
                ev.setAction(ACTION_DOWN);
                dispatchTouchEvent(ev);
                setWindowSlippery(true);
@@ -161,8 +159,7 @@ public class StatusBarTouchController implements TouchController {
        } else {
            // For NORMAL state, only listen if the event originated above the navbar height
            DeviceProfile dp = mLauncher.getDeviceProfile();
            if (!isTrackpadMotionEvent(ev) && ev.getY() > (mLauncher.getDragLayer().getHeight()
                    - dp.getInsets().bottom)) {
            if (ev.getY() > (mLauncher.getDragLayer().getHeight() - dp.getInsets().bottom)) {
                return false;
            }
        }
+0 −1
Original line number Diff line number Diff line
@@ -871,7 +871,6 @@ public class TouchInteractionService extends Service
            }

            if (ENABLE_TRACKPAD_GESTURE.get() && mGestureState.isTrackpadGesture()
                    && mGestureState.getActivityInterface().isResumed()
                    && !previousGestureState.isRecentsAnimationRunning()) {
                reasonString = newCompoundString(reasonPrefix)
                        .append(SUBSTRING_PREFIX)
+8 −2
Original line number Diff line number Diff line
@@ -294,8 +294,14 @@ public class OtherActivityInputConsumer extends ContextWrapper implements InputC
                boolean haveNotPassedSlopOnContinuedGesture =
                        !mPassedSlopOnThisGesture && mPassedPilferInputSlop;
                double degrees = Math.toDegrees(Math.atan(upDist / horizontalDist));
                boolean isLikelyToStartNewTask = haveNotPassedSlopOnContinuedGesture
                        || degrees <= OVERVIEW_MIN_DEGREES;

                // Regarding degrees >= -OVERVIEW_MIN_DEGREES - Trackpad gestures can start anywhere
                // on the screen, allowing downward swipes. We want to impose the same angle in that
                // scenario.
                boolean swipeWithinQuickSwitchRange = degrees <= OVERVIEW_MIN_DEGREES
                        && (!mGestureState.isTrackpadGesture() || degrees >= -OVERVIEW_MIN_DEGREES);
                boolean isLikelyToStartNewTask =
                        haveNotPassedSlopOnContinuedGesture || swipeWithinQuickSwitchRange;

                if (!mPassedPilferInputSlop) {
                    if (passedSlop) {