summaryrefslogtreecommitdiffstats
path: root/quickstep/src/com/android/quickstep
diff options
context:
space:
mode:
Diffstat (limited to 'quickstep/src/com/android/quickstep')
-rw-r--r--quickstep/src/com/android/quickstep/ActivityControlHelper.java13
-rw-r--r--quickstep/src/com/android/quickstep/OverviewCommandHelper.java6
-rw-r--r--quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java2
3 files changed, 11 insertions, 10 deletions
diff --git a/quickstep/src/com/android/quickstep/ActivityControlHelper.java b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
index 63fc6cdb3..4b918102c 100644
--- a/quickstep/src/com/android/quickstep/ActivityControlHelper.java
+++ b/quickstep/src/com/android/quickstep/ActivityControlHelper.java
@@ -106,7 +106,7 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
void onSwipeUpComplete(T activity);
AnimationFactory prepareRecentsUI(T activity, boolean activityVisible,
- Consumer<AnimatorPlaybackController> callback);
+ boolean animateActivity, Consumer<AnimatorPlaybackController> callback);
ActivityInitListener createActivityInitListener(BiPredicate<T, Boolean> onInitListener);
@@ -214,7 +214,7 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
@Override
public AnimationFactory prepareRecentsUI(Launcher activity, boolean activityVisible,
- Consumer<AnimatorPlaybackController> callback) {
+ boolean animateActivity, Consumer<AnimatorPlaybackController> callback) {
final LauncherState startState = activity.getStateManager().getState();
LauncherState resetState = startState;
@@ -228,8 +228,8 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
// Since the launcher is not visible, we can safely reset the scroll position.
// This ensures then the next swipe up to all-apps starts from scroll 0.
activity.getAppsView().reset(false /* animate */);
- fromState = BACKGROUND_APP;
- activity.getStateManager().goToState(BACKGROUND_APP, false);
+ fromState = animateActivity ? BACKGROUND_APP : OVERVIEW;
+ activity.getStateManager().goToState(fromState, false);
// Optimization, hide the all apps view to prevent layout while initializing
activity.getAppsView().getContentView().setVisibility(View.GONE);
@@ -268,6 +268,9 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
.createAnimationToNewWorkspace(fromState, endState, accuracy));
return;
}
+ if (fromState == endState) {
+ return;
+ }
AnimatorSet anim = new AnimatorSet();
if (!activity.getDeviceProfile().isVerticalBarLayout()) {
@@ -470,7 +473,7 @@ public interface ActivityControlHelper<T extends BaseDraggingActivity> {
@Override
public AnimationFactory prepareRecentsUI(RecentsActivity activity, boolean activityVisible,
- Consumer<AnimatorPlaybackController> callback) {
+ boolean animateActivity, Consumer<AnimatorPlaybackController> callback) {
if (activityVisible) {
return (transitionLength, interactionType) -> { };
}
diff --git a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
index 3d54b82d1..1a9915c41 100644
--- a/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
+++ b/quickstep/src/com/android/quickstep/OverviewCommandHelper.java
@@ -269,7 +269,7 @@ public class OverviewCommandHelper {
activity.<RecentsView>getOverviewPanel().setCurrentTask(mRunningTaskId);
AbstractFloatingView.closeAllOpenViews(activity, wasVisible);
AnimationFactory factory = mHelper.prepareRecentsUI(activity, wasVisible,
- (controller) -> {
+ false /* animate activity */, (controller) -> {
controller.dispatchOnStart();
ValueAnimator anim = controller.getAnimationPlayer()
.setDuration(RECENTS_LAUNCH_DURATION);
@@ -277,9 +277,7 @@ public class OverviewCommandHelper {
anim.start();
});
factory.onRemoteAnimationReceived(null);
- if (wasVisible) {
- factory.createActivityController(RECENTS_LAUNCH_DURATION, INTERACTION_NORMAL);
- }
+ factory.createActivityController(RECENTS_LAUNCH_DURATION, INTERACTION_NORMAL);
mActivity = activity;
mRecentsView = mActivity.getOverviewPanel();
mRecentsView.setRunningTaskIconScaledDown(true);
diff --git a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
index fa36f6b7b..a2e9af841 100644
--- a/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
+++ b/quickstep/src/com/android/quickstep/WindowTransformSwipeHandler.java
@@ -418,7 +418,7 @@ public class WindowTransformSwipeHandler<T extends BaseDraggingActivity> {
}
mAnimationFactory = mActivityControlHelper.prepareRecentsUI(mActivity,
- mWasLauncherAlreadyVisible, this::onAnimatorPlaybackControllerCreated);
+ mWasLauncherAlreadyVisible, true, this::onAnimatorPlaybackControllerCreated);
AbstractFloatingView.closeAllOpenViews(activity, mWasLauncherAlreadyVisible);
if (mWasLauncherAlreadyVisible) {