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

Commit 450d821f authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge changes I2130e01c,I3f864ff4 into ub-launcher3-master

* changes:
  Re-enable input consumer to catch touches over window
  Cancel the animation when cleaning up the touch tracking
parents 84e71bf9 cc394cdc
Loading
Loading
Loading
Loading
+1.96 KiB (111 KiB)

File changed.

No diff preview for this file type.

+4 −0
Original line number Diff line number Diff line
@@ -331,6 +331,10 @@ public class OtherActivityTouchConsumer extends ContextWrapper implements TouchC
            // Since we start touch tracking on DOWN, we may reach this state without actually
            // starting the gesture. In that case, just cleanup immediately.
            reset();

            // Also clean up in case the system has handled the UP and canceled the animation before
            // we had a chance to start the recents animation. In such a case, we will not receive
            ActivityManagerWrapper.getInstance().cancelRecentsAnimation();
        }
        mVelocityTracker.recycle();
        mVelocityTracker = null;
+7 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ import com.android.launcher3.util.Preconditions;
import com.android.launcher3.util.TraceHelper;
import com.android.quickstep.TouchConsumer.InteractionType;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.InputConsumerController;
import com.android.systemui.shared.system.RecentsAnimationControllerCompat;
import com.android.systemui.shared.system.RemoteAnimationTargetCompat;
import com.android.systemui.shared.system.TransactionCompat;
@@ -162,12 +163,16 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler {
    private @InteractionType int mInteractionType = INTERACTION_NORMAL;
    private boolean mDeferredQuickScrubEnd;

    private InputConsumerController mInputConsumer =
            InputConsumerController.getRecentsAnimationInputConsumer();

    private final RecentsAnimationWrapper mRecentsAnimationWrapper = new RecentsAnimationWrapper();
    private Matrix mTmpMatrix = new Matrix();

    WindowTransformSwipeHandler(RunningTaskInfo runningTaskInfo, Context context) {
        mContext = context;
        mRunningTaskId = runningTaskInfo.id;
        mInputConsumer.registerInputConsumer();
        initStateCallbacks();
    }

@@ -529,6 +534,7 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler {

        setStateOnUiThread(STATE_GESTURE_STARTED);
        mGestureStarted = true;
        mRecentsAnimationWrapper.enableInputConsumer();
    }

    /**
@@ -600,6 +606,7 @@ public class WindowTransformSwipeHandler extends BaseSwipeInteractionHandler {
        }

        clearReference();
        mInputConsumer.unregisterInputConsumer();
    }

    private void invalidateHandlerWithLauncher() {