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

Commit 80232ea2 authored by Eghosa Ewansiha-Vlachavas's avatar Eghosa Ewansiha-Vlachavas
Browse files

[2/n] Replace read-only desktop windowing flag with runtime flag

Replace use of `enable_desktop_windowing` flag with
`enable_desktop_windowing_mode` flag

Flag: NONE
Bug: 304778354
Fixes: 326060018
Test: build & `adb shell device_config put lse_desktop_experience
com.android.window.flags.enable_desktop_windowing_mode true && adb
reboot` desktop windowing mode should be enabled.

Change-Id: Idc44e2b7a8b738f15f8d3812a0c4fc1a4b4861c1
parent 8715639c
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -204,6 +204,7 @@ android_library {
        "com_android_launcher3_flags_lib",
        "com_android_wm_shell_flags_lib",
        "android.appwidget.flags-aconfig-java",
        "com.android.window.flags.window-aconfig-java",
    ],
    sdk_version: "current",
    min_sdk_version: min_launcher3_sdk_version,
+2 −4
Original line number Diff line number Diff line
@@ -52,7 +52,7 @@ import com.android.quickstep.util.RecentsOrientedState;
import com.android.systemui.shared.recents.model.Task;
import com.android.systemui.shared.recents.model.ThumbnailData;
import com.android.systemui.shared.system.QuickStepContract;
import com.android.wm.shell.Flags;
import com.android.window.flags.Flags;

import kotlin.Unit;

@@ -72,8 +72,6 @@ public class DesktopTaskView extends TaskView {
    private static final boolean DESKTOP_MODE_SUPPORTED = SystemProperties.getBoolean(
            "persist.wm.debug.desktop_mode_2", false);

    private static final boolean ENABLE_DESKTOP_WINDOWING = Flags.enableDesktopWindowing();

    private static final String TAG = DesktopTaskView.class.getSimpleName();

    private static final boolean DEBUG = false;
@@ -97,7 +95,7 @@ public class DesktopTaskView extends TaskView {
    /** Check whether desktop windowing is enabled */
    public static boolean isDesktopModeSupported() {
        // Check for aconfig flag first
        if (ENABLE_DESKTOP_WINDOWING) {
        if (Flags.enableDesktopWindowingMode()) {
            return true;
        }
        // Fall back to sysprop flag
+2 −3
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ import com.android.systemui.plugins.LauncherOverlayPlugin;
import com.android.systemui.plugins.PluginListener;
import com.android.systemui.plugins.shared.LauncherOverlayManager;
import com.android.systemui.plugins.shared.LauncherOverlayManager.LauncherOverlayTouchProxy;
import com.android.wm.shell.Flags;
import com.android.window.flags.Flags;

import java.io.FileDescriptor;
import java.io.PrintWriter;
@@ -318,7 +318,6 @@ public class Launcher extends StatefulActivity<LauncherState>
    private static final FloatProperty<Hotseat> HOTSEAT_WIDGET_SCALE =
            HOTSEAT_SCALE_PROPERTY_FACTORY.get(SCALE_INDEX_WIDGET_TRANSITION);

    private static final boolean ENABLE_DESKTOP_WINDOWING = Flags.enableDesktopWindowing();
    private static final boolean DESKTOP_MODE_SUPPORTED =
            "1".equals(Utilities.getSystemProperty("persist.wm.debug.desktop_mode_2", "0"));

@@ -2715,7 +2714,7 @@ public class Launcher extends StatefulActivity<LauncherState>

    private void updateDisallowBack() {
        // TODO(b/304778354): remove sysprop once desktop aconfig flag supports dynamic overriding
        if (ENABLE_DESKTOP_WINDOWING || DESKTOP_MODE_SUPPORTED) {
        if (Flags.enableDesktopWindowingMode() || DESKTOP_MODE_SUPPORTED) {
            // Do not disable back in launcher when prototype behavior is enabled
            return;
        }