summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher3/touch
diff options
context:
space:
mode:
authorSunny Goyal <sunnygoyal@google.com>2019-01-28 15:11:36 -0800
committerSunny Goyal <sunnygoyal@google.com>2019-01-28 15:51:19 -0800
commit8b2b4e24ee784207ad9857fd9cc846f6ba92f703 (patch)
tree409fc84a932eec0190b0cbddecb830fd5b143b93 /src/com/android/launcher3/touch
parent989732be57af1cecea2c830b2b97dead3d7e474a (diff)
downloadandroid_packages_apps_Trebuchet-8b2b4e24ee784207ad9857fd9cc846f6ba92f703.tar.gz
android_packages_apps_Trebuchet-8b2b4e24ee784207ad9857fd9cc846f6ba92f703.tar.bz2
android_packages_apps_Trebuchet-8b2b4e24ee784207ad9857fd9cc846f6ba92f703.zip
Adding support for swipe and hold to overview from home screen to all-apps
- After the atomic animation ends, overview jumps slightly because the normal -> all apps transition puts it at a different position than normal -> overview Bug: 111926330 Change-Id: I6ca359b3ef2fc4d0b6b96229d8bf118bd0db9649
Diffstat (limited to 'src/com/android/launcher3/touch')
-rw-r--r--src/com/android/launcher3/touch/AbstractStateChangeTouchController.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
index bb143288c..0e2ed6cc2 100644
--- a/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
+++ b/src/com/android/launcher3/touch/AbstractStateChangeTouchController.java
@@ -46,7 +46,6 @@ import com.android.launcher3.anim.AnimationSuccessListener;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.AnimatorSetBuilder;
import com.android.launcher3.compat.AccessibilityManagerCompat;
-import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Direction;
import com.android.launcher3.userevent.nano.LauncherLogProto.Action.Touch;
@@ -298,7 +297,7 @@ public abstract class AbstractStateChangeTouchController
* When going between normal and overview states, see if we passed the overview threshold and
* play the appropriate atomic animation if so.
*/
- private void maybeUpdateAtomicAnim(LauncherState fromState, LauncherState toState,
+ protected void maybeUpdateAtomicAnim(LauncherState fromState, LauncherState toState,
float progress) {
if (!goingBetweenNormalAndOverview(fromState, toState)) {
return;
@@ -435,7 +434,11 @@ public abstract class AbstractStateChangeTouchController
mLauncher.getAppsView().addSpringFromFlingUpdateListener(anim, velocity);
}
anim.start();
- mAtomicAnimAutoPlayInfo = new AutoPlayAtomicAnimationInfo(endProgress, anim.getDuration());
+ settleAtomicAnimation(endProgress, anim.getDuration());
+ }
+
+ protected void settleAtomicAnimation(float endProgress, long duration) {
+ mAtomicAnimAutoPlayInfo = new AutoPlayAtomicAnimationInfo(endProgress, duration);
maybeAutoPlayAtomicComponentsAnim();
}