From a4edc07ec899d5bda08964c1f807e580a365953b Mon Sep 17 00:00:00 2001 From: Tracy Zhou Date: Tue, 16 Nov 2021 21:17:19 -0800 Subject: [PATCH] Refine when to move live tile app below recents view - We will still need to figure out why, but currently the overview scrim blocks the cut out during transition. To go around this, we need to move live tile app after the overview transition animation is over - Some of the logic in RecentsView is no longer necessary since we are no longer reusing live tile params and simulator, but assign new targets each time Fixes: 205587164 Test: manual Change-Id: Icadf26182112bba544a4103b626effa37d4028b5 --- .../quickstep/fallback/FallbackRecentsView.java | 9 ++++++++- .../quickstep/views/LauncherRecentsView.java | 9 ++++++++- .../com/android/quickstep/views/RecentsView.java | 14 +------------- .../src/com/android/quickstep/views/TaskView.java | 14 -------------- 4 files changed, 17 insertions(+), 29 deletions(-) diff --git a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java index eff59e24bc..95095fa8eb 100644 --- a/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java +++ b/quickstep/src/com/android/quickstep/fallback/FallbackRecentsView.java @@ -16,6 +16,7 @@ package com.android.quickstep.fallback; import static com.android.quickstep.GestureState.GestureEndTarget.RECENTS; +import static com.android.quickstep.ViewUtils.postFrameDrawn; import static com.android.quickstep.fallback.RecentsState.DEFAULT; import static com.android.quickstep.fallback.RecentsState.HOME; import static com.android.quickstep.fallback.RecentsState.MODAL_TASK; @@ -218,8 +219,14 @@ public class FallbackRecentsView extends RecentsView runActionOnRemoteHandles(remoteTargetHandle -> + remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(true))); + } } @Override diff --git a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java index 5d6b6563f7..3cba3921b2 100644 --- a/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java +++ b/quickstep/src/com/android/quickstep/views/LauncherRecentsView.java @@ -21,6 +21,7 @@ import static com.android.launcher3.LauncherState.OVERVIEW; import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK; import static com.android.launcher3.LauncherState.OVERVIEW_SPLIT_SELECT; import static com.android.launcher3.LauncherState.SPRING_LOADED; +import static com.android.quickstep.ViewUtils.postFrameDrawn; import android.annotation.TargetApi; import android.content.Context; @@ -104,8 +105,14 @@ public class LauncherRecentsView extends RecentsView runActionOnRemoteHandles(remoteTargetHandle -> + remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(true))); + } } @Override diff --git a/quickstep/src/com/android/quickstep/views/RecentsView.java b/quickstep/src/com/android/quickstep/views/RecentsView.java index 0188962da9..f15a9a25cf 100644 --- a/quickstep/src/com/android/quickstep/views/RecentsView.java +++ b/quickstep/src/com/android/quickstep/views/RecentsView.java @@ -1506,17 +1506,6 @@ public abstract class RecentsView { - TaskViewSimulator simulator = remoteTargetHandle.getTaskViewSimulator(); - simulator.taskPrimaryTranslation.value = 0; - simulator.taskSecondaryTranslation.value = 0; - simulator.fullScreenProgress.value = 0; - simulator.recentsViewScale.value = 1; - }); - // Similar to setRunningTaskHidden below, reapply the state before runningTaskView is // null. if (!mRunningTaskShowScreenshot) { @@ -1904,7 +1893,7 @@ public abstract class RecentsView { remoteTargetHandle.getTransformParams().setTargetSet(null); - remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(true); + remoteTargetHandle.getTaskViewSimulator().setDrawsBelowRecents(false); }); mSplitSelectStateController.resetState(); @@ -4387,7 +4376,6 @@ public abstract class RecentsView) remoteTargetHandle -> - remoteTargetHandle - .getTaskViewSimulator() - .setDrawsBelowRecents(false)); - } - @Override public void onAnimationEnd(Animator animator) { - recentsView.runActionOnRemoteHandles( - (Consumer) remoteTargetHandle -> - remoteTargetHandle - .getTaskViewSimulator() - .setDrawsBelowRecents(true)); mIsClickableAsLiveTile = true; } });