Fix app open animation when in overview mode.
* Avoids scrim hard line by animating the RecentsViewContainer and
AllAppsTransitionController progress.
Bug: 79689563
Change-Id: If467e07667ae4d6eeac663608f77bec0eb7ef82f
diff --git a/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java b/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java
index cf62e2e..80ee577 100644
--- a/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java
+++ b/quickstep/src/com/android/launcher3/LauncherAppTransitionManagerImpl.java
@@ -21,7 +21,9 @@
import static com.android.launcher3.LauncherAnimUtils.SCALE_PROPERTY;
import static com.android.launcher3.LauncherState.ALL_APPS;
import static com.android.launcher3.LauncherState.NORMAL;
+import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.Utilities.postAsyncCallback;
+import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS_PROGRESS;
import static com.android.launcher3.anim.Interpolators.AGGRESSIVE_EASE;
import static com.android.launcher3.anim.Interpolators.DEACCEL_1_7;
import static com.android.launcher3.anim.Interpolators.LINEAR;
@@ -58,6 +60,7 @@
import com.android.launcher3.DeviceProfile.OnDeviceProfileChangeListener;
import com.android.launcher3.InsettableFrameLayout.LayoutParams;
+import com.android.launcher3.allapps.AllAppsTransitionController;
import com.android.launcher3.anim.AnimatorPlaybackController;
import com.android.launcher3.anim.Interpolators;
import com.android.launcher3.dragndrop.DragLayer;
@@ -329,6 +332,30 @@
appsView.setTranslationY(startY);
appsView.setLayerType(View.LAYER_TYPE_NONE, null);
};
+ } else if (mLauncher.isInState(OVERVIEW)) {
+ AllAppsTransitionController allAppsController = mLauncher.getAllAppsController();
+ launcherAnimator.play(ObjectAnimator.ofFloat(allAppsController, ALL_APPS_PROGRESS,
+ allAppsController.getProgress(), ALL_APPS_PROGRESS_OFF_SCREEN));
+
+ View overview = mLauncher.getOverviewPanelContainer();
+ ObjectAnimator alpha = ObjectAnimator.ofFloat(overview, View.ALPHA, alphas);
+ alpha.setDuration(217);
+ alpha.setInterpolator(LINEAR);
+ launcherAnimator.play(alpha);
+
+ ObjectAnimator transY = ObjectAnimator.ofFloat(overview, View.TRANSLATION_Y, trans);
+ transY.setInterpolator(AGGRESSIVE_EASE);
+ transY.setDuration(350);
+ launcherAnimator.play(transY);
+
+ overview.setLayerType(View.LAYER_TYPE_HARDWARE, null);
+
+ endListener = () -> {
+ overview.setLayerType(View.LAYER_TYPE_NONE, null);
+ overview.setAlpha(1f);
+ overview.setTranslationY(0f);
+ mLauncher.getStateManager().reapplyState();
+ };
} else {
mDragLayerAlpha.setValue(alphas[0]);
ObjectAnimator alpha =