Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 197c9094 authored by Cyrus Boadway's avatar Cyrus Boadway
Browse files

Change flag type to control Quickstep widget app launch

Previously we'd relied on a SystemProperties to control which
InteractionHandler was used by Quickstep for widget app launches.

This switches to a more conventional FeatureFlag.

Bug: 169042867
Test: manual
Change-Id: I7abf815c6e204daf996ac0a81b1a354c4e3d5cda
parent 5f35ff02
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ import static com.android.launcher3.LauncherState.NORMAL;
import static com.android.launcher3.LauncherState.OVERVIEW;
import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK;
import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent;
import static com.android.launcher3.config.FeatureFlags.ENABLE_QUICKSTEP_WIDGET_APP_START;
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_TAP;
import static com.android.launcher3.testing.TestProtocol.HINT_STATE_ORDINAL;
import static com.android.launcher3.testing.TestProtocol.HINT_STATE_TWO_BUTTON_ORDINAL;
@@ -36,7 +37,6 @@ import static com.android.systemui.shared.system.ActivityManagerWrapper.CLOSE_SY
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Configuration;
import android.os.SystemProperties;
import android.view.HapticFeedbackConstants;
import android.view.View;

@@ -90,9 +90,6 @@ import java.util.stream.Stream;

public class QuickstepLauncher extends BaseQuickstepLauncher {

    private static final boolean ENABLE_APP_WIDGET_LAUNCH_ANIMATION =
            SystemProperties.getBoolean("persist.debug.quickstep_app_widget_launch", false);

    public static final boolean GO_LOW_RAM_RECENTS_ENABLED = false;
    /**
     * Reusable command for applying the shelf height on the background thread.
@@ -327,7 +324,7 @@ public class QuickstepLauncher extends BaseQuickstepLauncher {

    protected LauncherAppWidgetHost createAppWidgetHost() {
        LauncherAppWidgetHost appWidgetHost = super.createAppWidgetHost();
        if (ENABLE_APP_WIDGET_LAUNCH_ANIMATION) {
        if (ENABLE_QUICKSTEP_WIDGET_APP_START.get()) {
            appWidgetHost.setInteractionHandler(new QuickstepInteractionHandler(this));
        }
        return appWidgetHost;
+4 −0
Original line number Diff line number Diff line
@@ -87,6 +87,10 @@ public final class FeatureFlags {
    public static final BooleanFlag ENABLE_QUICKSTEP_LIVE_TILE = getDebugFlag(
            "ENABLE_QUICKSTEP_LIVE_TILE", true, "Enable live tile in Quickstep overview");

    public static final BooleanFlag ENABLE_QUICKSTEP_WIDGET_APP_START = getDebugFlag(
            "ENABLE_QUICKSTEP_WIDGET_APP_START", false,
            "Enable Quickstep animation when launching activities from an app widget");

    // Keep as DeviceFlag to allow remote disable in emergency.
    public static final BooleanFlag ENABLE_SUGGESTED_ACTIONS_OVERVIEW = new DeviceFlag(
            "ENABLE_SUGGESTED_ACTIONS_OVERVIEW", true, "Show chip hints on the overview screen");