Merge changes from topic "am-097d6789-c880-4ec5-bad4-39f2d31eb938" into ub-launcher3-master
* changes:
[automerger] Fixing crash when cancelAnimaiton happens while we are aboutto enter long-swipe am: 1d82dd4d12
Fixing crash when cancelAnimaiton happens while we are aboutto enter long-swipe
diff --git a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
index 2eae2ae..57993a4 100644
--- a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
+++ b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -880,6 +880,13 @@
return;
}
+ RemoteAnimationTargetSet targetSet = mRecentsAnimationWrapper.targetSet;
+ if (targetSet == null) {
+ // This can happen when cancelAnimation comes on the background thread, while we are
+ // processing the long swipe on the UI thread.
+ return;
+ }
+
mLongSwipeController = mActivityControlHelper.getLongSwipeController(
mActivity, mRecentsAnimationWrapper.targetSet);
onLongSwipeDisplacementUpdated();