Merge "Revert "Not using reflection for all limit API"" into ub-launcher3-master
diff --git a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
index f9495a4..6564950 100644
--- a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
+++ b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -1001,8 +1001,9 @@
             if (SWIPE_HOME.get()) {
                 setShelfState(ShelfAnimState.OVERVIEW, interpolator, duration);
             }
-        } else if (endTarget == NEW_TASK) {
-            // Let RecentsView handle the scrolling to the task, which we launch in startNewTask().
+        } else if (endTarget == NEW_TASK || endTarget == LAST_TASK) {
+            // Let RecentsView handle the scrolling to the task, which we launch in startNewTask()
+            // or resumeLastTaskForQuickstep().
             if (mRecentsView != null) {
                 duration = Math.max(duration, mRecentsView.getScroller().getDuration());
             }
diff --git a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java
index 57400bd..720c1c4 100644
--- a/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java
+++ b/quickstep/src/com/android/quickstep/util/ClipAnimationHelper.java
@@ -390,7 +390,6 @@
         public TransformParams setCurrentRectAndTargetAlpha(RectF currentRect, float targetAlpha) {
             this.currentRect = currentRect;
             this.targetAlpha = targetAlpha;
-            this.progress = 1;
             return this;
         }
 
diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
index ff85003..5c8f53c 100644
--- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
+++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java
@@ -222,7 +222,8 @@
                 mTempRect.top -= offsetY;
             }
             mTempRectF.set(mTempRect);
-            mTransformParams.setCurrentRectAndTargetAlpha(mTempRectF, taskView.getAlpha())
+            mTransformParams.setProgress(1f)
+                    .setCurrentRectAndTargetAlpha(mTempRectF, taskView.getAlpha())
                     .setSyncTransactionApplier(mSyncTransactionApplier);
             if (mRecentsAnimationWrapper.targetSet != null) {
                 mClipAnimationHelper.applyTransform(mRecentsAnimationWrapper.targetSet,
diff --git a/src/com/android/launcher3/DeleteDropTarget.java b/src/com/android/launcher3/DeleteDropTarget.java
index d60dc87..70c8aaa 100644
--- a/src/com/android/launcher3/DeleteDropTarget.java
+++ b/src/com/android/launcher3/DeleteDropTarget.java
@@ -16,6 +16,8 @@
 
 package com.android.launcher3;
 
+import static com.android.launcher3.LauncherSettings.Favorites.ITEM_TYPE_DEEP_SHORTCUT;
+
 import android.content.Context;
 import android.text.TextUtils;
 import android.util.AttributeSet;
@@ -62,8 +64,12 @@
      */
     @Override
     public boolean supportsAccessibilityDrop(ItemInfo info, View view) {
-        return (info instanceof ShortcutInfo)
-                || (info instanceof LauncherAppWidgetInfo)
+        if (info instanceof ShortcutInfo) {
+            // Support the action unless the item is in a context menu.
+            return info.screenId >= 0;
+        }
+
+        return (info instanceof LauncherAppWidgetInfo)
                 || (info instanceof FolderInfo);
     }