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
diff --git a/quickstep/libs/sysui_shared.jar b/quickstep/libs/sysui_shared.jar
index 74d3cba..f508eab 100644
--- a/quickstep/libs/sysui_shared.jar
+++ b/quickstep/libs/sysui_shared.jar
Binary files differ
diff --git a/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java b/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java
index d8f7aaf..80584c8 100644
--- a/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java
+++ b/quickstep/src/com/android/quickstep/OtherActivityTouchConsumer.java
@@ -331,6 +331,10 @@
// 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;
diff --git a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
index 5d0a6d1..9bcbf34 100644
--- a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
+++ b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -62,6 +62,7 @@
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 @@
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 @@
setStateOnUiThread(STATE_GESTURE_STARTED);
mGestureStarted = true;
+ mRecentsAnimationWrapper.enableInputConsumer();
}
/**
@@ -600,6 +606,7 @@
}
clearReference();
+ mInputConsumer.unregisterInputConsumer();
}
private void invalidateHandlerWithLauncher() {