summaryrefslogtreecommitdiffstats
path: root/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
diff options
context:
space:
mode:
authorTony Wickham <twickham@google.com>2019-08-12 18:33:48 -0700
committerTony Wickham <twickham@google.com>2019-11-14 12:31:01 -0800
commit2785a5996cebaae4df29c1f9e9efcaf2f7b0055f (patch)
treec6cb847d580b40479aa2a042c6e61dde81b64c25 /quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
parent42a9ef0e9f87230930127f25e0ce80b5ea1f603a (diff)
downloadandroid_packages_apps_Trebuchet-2785a5996cebaae4df29c1f9e9efcaf2f7b0055f.tar.gz
android_packages_apps_Trebuchet-2785a5996cebaae4df29c1f9e9efcaf2f7b0055f.tar.bz2
android_packages_apps_Trebuchet-2785a5996cebaae4df29c1f9e9efcaf2f7b0055f.zip
Improve quick switch from home by tracking both x and y motion
- Add NoButtonQuickSwitchTouchController which uses BothAxesSwipeDetector to track horizontal and vertical motion. - Initially, we only detect swipe left to right to quick switch (like before), but then we allow swipe up to either go to overview (if you hold) or back home (if you don't hold). - xDisplacement transitions non-overview components out (e.g. shelf and workspace), and translates overview in. - yDisplacement translates overview up and scales it down Bug: 126596417 Change-Id: Id679ad84c08246e205c667a78ed5df00d7276258 Merged-In: Id679ad84c08246e205c667a78ed5df00d7276258
Diffstat (limited to 'quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java')
-rw-r--r--quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java17
1 files changed, 2 insertions, 15 deletions
diff --git a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
index c84b81899..eefde1286 100644
--- a/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
+++ b/quickstep/recents_ui_overrides/src/com/android/quickstep/LauncherActivityControllerHelper.java
@@ -24,7 +24,6 @@ import static com.android.launcher3.LauncherAppTransitionManagerImpl.INDEX_SHELF
import static com.android.launcher3.LauncherState.BACKGROUND_APP;
import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
-import static com.android.launcher3.LauncherStateManager.ANIM_ALL;
import static com.android.launcher3.anim.Interpolators.ACCEL_2;
import static com.android.launcher3.anim.Interpolators.ACCEL_DEACCEL;
import static com.android.launcher3.anim.Interpolators.INSTANT;
@@ -53,11 +52,9 @@ import com.android.launcher3.Launcher;
import com.android.launcher3.LauncherAppState;
import com.android.launcher3.LauncherInitListenerEx;
import com.android.launcher3.LauncherState;
-import com.android.launcher3.LauncherStateManager;
import com.android.launcher3.QuickstepAppTransitionManagerImpl;
import com.android.launcher3.allapps.DiscoveryBounce;
import com.android.launcher3.anim.AnimatorPlaybackController;
-import com.android.launcher3.anim.AnimatorSetBuilder;
import com.android.launcher3.userevent.nano.LauncherLogProto;
import com.android.launcher3.views.FloatingIconView;
import com.android.quickstep.SysUINavigationMode.Mode;
@@ -169,18 +166,8 @@ public final class LauncherActivityControllerHelper implements ActivityControlHe
@Override
public void playAtomicAnimation(float velocity) {
- // Setup workspace with 0 duration to prepare for our staggered animation.
- LauncherStateManager stateManager = activity.getStateManager();
- AnimatorSetBuilder builder = new AnimatorSetBuilder();
- // setRecentsAttachedToAppWindow() will animate recents out.
- builder.addFlag(AnimatorSetBuilder.FLAG_DONT_ANIMATE_OVERVIEW);
- stateManager.createAtomicAnimation(BACKGROUND_APP, NORMAL, builder, ANIM_ALL, 0);
- builder.build().start();
-
- // Stop scrolling so that it doesn't interfere with the translation offscreen.
- recentsView.getScroller().forceFinished(true);
-
- new StaggeredWorkspaceAnim(activity, workspaceView, velocity).start();
+ new StaggeredWorkspaceAnim(activity, workspaceView, velocity,
+ true /* animateOverviewScrim */).start();
}
};
}