Add NavigationModeFeatureFlag

3 Button mode doesn't use recents animation so live tile would not work on 3 button mode before migration to recents animation happens.

Bug: 169694902
Test: manual
Change-Id: I9574c624f3d220834fa18e910637cd64460adb0c
This commit is contained in:
Tracy Zhou
2021-02-26 23:51:30 -08:00
parent 4092352a99
commit 162ed05ac9
14 changed files with 107 additions and 47 deletions

View File

@@ -24,8 +24,8 @@ import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.allapps.AllAppsTransitionController.ALL_APPS_PROGRESS;
import static com.android.launcher3.anim.Interpolators.DEACCEL_3;
import static com.android.launcher3.config.FeatureFlags.ENABLE_ALL_APPS_EDU;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_LIVE_TILE;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_HOME_GESTURE;
import static com.android.quickstep.util.NavigationModeFeatureFlag.LIVE_TILE;
import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SYSTEM_WINDOWS_REASON_RECENTS;
import android.animation.ValueAnimator;
@@ -145,7 +145,7 @@ public class NavBarToHomeTouchController implements TouchController,
OverviewScrim.SCRIM_MULTIPLIER, OVERVIEW_TO_HOME_SCRIM_MULTIPLIER,
PULLBACK_INTERPOLATOR);
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
if (LIVE_TILE.get()) {
builder.addOnFrameCallback(recentsView::redrawLiveTile);
}
@@ -194,7 +194,7 @@ public class NavBarToHomeTouchController implements TouchController,
boolean success = interpolatedProgress >= SUCCESS_TRANSITION_PROGRESS
|| (velocity < 0 && fling);
if (success) {
if (ENABLE_QUICKSTEP_LIVE_TILE.get()) {
if (LIVE_TILE.get()) {
RecentsView recentsView = mLauncher.getOverviewPanel();
recentsView.switchToScreenshot(null,
() -> recentsView.finishRecentsAnimation(true /* toRecents */, null));