diff options
author | Android Build Merger (Role) <noreply-android-build-merger@google.com> | 2018-06-08 03:50:01 +0000 |
---|---|---|
committer | Android Build Merger (Role) <noreply-android-build-merger@google.com> | 2018-06-08 03:50:01 +0000 |
commit | 9d3055dc472958d660d59257abe16bae2f4e9afd (patch) | |
tree | d38b97776da30fe4ed0ab85e669d4eb0a8a87b65 /quickstep | |
parent | a48273b4cb9f8cad0bbd347c523ed10031b2ae4c (diff) | |
parent | 89126653cd38b6b461e893edbd3163d27a943c83 (diff) | |
download | android_packages_apps_Trebuchet-9d3055dc472958d660d59257abe16bae2f4e9afd.tar.gz android_packages_apps_Trebuchet-9d3055dc472958d660d59257abe16bae2f4e9afd.tar.bz2 android_packages_apps_Trebuchet-9d3055dc472958d660d59257abe16bae2f4e9afd.zip |
[automerger] Don't intercept above shelf progress if still animating am: 89126653cd
Change-Id: Ida5b5548edb8495e2b4cb15291dc6778cf80b746
Diffstat (limited to 'quickstep')
-rw-r--r-- | quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java b/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java index 717179dfe..f7554fc04 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java +++ b/quickstep/src/com/android/launcher3/uioverrides/PortraitStatesTouchController.java @@ -31,6 +31,7 @@ import com.android.launcher3.DeviceProfile; import com.android.launcher3.Launcher; import com.android.launcher3.LauncherState; import com.android.launcher3.LauncherStateManager.AnimationComponents; +import com.android.launcher3.allapps.AllAppsTransitionController; import com.android.launcher3.anim.AnimatorPlaybackController; import com.android.launcher3.anim.AnimatorSetBuilder; import com.android.launcher3.anim.Interpolators; @@ -68,8 +69,18 @@ public class PortraitStatesTouchController extends AbstractStateChangeTouchContr mCurrentAnimation.getAnimationPlayer().end(); } - // If we are already animating from a previous state, we can intercept. - return true; + AllAppsTransitionController allAppsController = mLauncher.getAllAppsController(); + if (ev.getY() >= allAppsController.getShiftRange() * allAppsController.getProgress()) { + // If we are already animating from a previous state, we can intercept as long as + // the touch is below the current all apps progress (to allow for double swipe). + return true; + } + // Otherwise, make sure everything is settled and don't intercept so they can scroll + // recents, dismiss a task, etc. + if (mAtomicAnim != null) { + mAtomicAnim.end(); + } + return false; } if (mLauncher.isInState(ALL_APPS)) { // In all-apps only listen if the container cannot scroll itself |