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
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 5cce407..1a6c68d 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -313,6 +313,12 @@
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 @@
}
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