Add method to determine if launcher is in split selection state
* Available for both launcher and taskbar via
ActivityContext
Bug: 295981634
Change-Id: I8767deea0b2432da3047209037874c966b83c3b3
diff --git a/src/com/android/launcher3/Launcher.java b/src/com/android/launcher3/Launcher.java
index 2b433f1..b34a527 100644
--- a/src/com/android/launcher3/Launcher.java
+++ b/src/com/android/launcher3/Launcher.java
@@ -3103,7 +3103,7 @@
}
/** To be overridden by subclasses */
- protected boolean isSplitSelectionEnabled() {
+ public boolean isSplitSelectionEnabled() {
// Overridden
return false;
}
diff --git a/src/com/android/launcher3/views/ActivityContext.java b/src/com/android/launcher3/views/ActivityContext.java
index 04f2ffa..0d55f15 100644
--- a/src/com/android/launcher3/views/ActivityContext.java
+++ b/src/com/android/launcher3/views/ActivityContext.java
@@ -146,6 +146,15 @@
}
/**
+ * @return {@code true} if user has selected the first split app and is in the process of
+ * selecting the second
+ */
+ default boolean isSplitSelectionEnabled() {
+ // Overridden
+ return false;
+ }
+
+ /**
* The root view to support drag-and-drop and popup support.
*/
BaseDragLayer getDragLayer();