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

Commit 8121e0d8 authored by Ats Jenk's avatar Ats Jenk
Browse files

Add a flag to not disable back gesture in launcher

Desktop mode prototypes enable freeform tasks on top of launcher.
Launcher is still partially visible in the back which means that
launcher will disable back gesture for the freeform tasks.

When desktop mode prototype 1 or 2 is enabled, skip disabling the back
gesture on launcher.

Bug: 259280363
Test: manual, enable desktop mode and launch an app, try back gesture
  from edge

Change-Id: I1d5eb81c7b28fb452c9566e358d77a5b2c19d450
parent 12053e95
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -313,6 +313,12 @@ 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 DESKTOP_MODE_1_SUPPORTED =
            "1".equals(Utilities.getSystemProperty("persist.wm.debug.desktop_mode", "0"));

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

    @Thunk
    Workspace<?> mWorkspace;
    @Thunk
@@ -3154,6 +3160,10 @@ public class Launcher extends StatefulActivity<LauncherState>
    }

    private void updateDisallowBack() {
        if (DESKTOP_MODE_1_SUPPORTED || DESKTOP_MODE_2_SUPPORTED) {
            // Do not disable back in launcher when prototype behavior is enabled
            return;
        }
        LauncherRootView rv = getRootView();
        if (rv != null) {
            boolean disableBack = getStateManager().getState() == NORMAL