Separate 2-button mode check from ENABLE_OVERVIEW_ACTIONS

This will allow us to cleanly remove ENABLE_OVERVIEW_ACTIONS while still
keeping the shelf instead of actions in 2-button mode.

Bug: 143361609
Change-Id: I5cd43b6d3daeb527c7787b1cb81fae9179d8911c
This commit is contained in:
Tony Wickham
2020-02-05 15:06:52 -08:00
parent 61d639d756
commit 04fca1642c
10 changed files with 55 additions and 49 deletions

View File

@@ -25,6 +25,7 @@ import static com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_COUNT;
import static com.android.launcher3.allapps.DiscoveryBounce.HOME_BOUNCE_SEEN;
import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_COUNT;
import static com.android.launcher3.allapps.DiscoveryBounce.SHELF_BOUNCE_SEEN;
import static com.android.quickstep.SysUINavigationMode.removeShelfFromOverview;
import android.animation.AnimatorSet;
import android.animation.ValueAnimator;
@@ -35,6 +36,7 @@ import android.os.CancellationSignal;
import com.android.launcher3.LauncherState.ScaleAndTranslation;
import com.android.launcher3.LauncherStateManager.StateHandler;
import com.android.launcher3.config.FeatureFlags;
import com.android.launcher3.model.WellbeingModel;
import com.android.launcher3.popup.SystemShortcut;
import com.android.launcher3.proxy.ProxyActivityStarter;
@@ -186,6 +188,16 @@ public abstract class BaseQuickstepLauncher extends Launcher
}
}
@Override
protected void setupViews() {
super.setupViews();
if (FeatureFlags.ENABLE_OVERVIEW_ACTIONS.get() && removeShelfFromOverview(this)) {
// Overview is above all other launcher elements, including qsb, so move it to the top.
getOverviewPanel().bringToFront();
}
}
@Override
protected StateHandler[] createStateHandlers() {
return new StateHandler[] {