Intercept clicks for non-supported split targets on workspace
* If we're in split selection state we disable the following - G icon on PSB - Lens icon on PSB - Smartspace - Widgets Bug: 295467097 Test: Enter split contextual and observe split instructions view going boing when tapping on unsupported target Flag: com.android.wm.shell.enable_split_contextual Change-Id: Ia7783472f3de9359c2784788be5f35596cbc8deb
This commit is contained in:
@@ -36,6 +36,7 @@ import static com.android.launcher3.LauncherState.OVERVIEW;
|
||||
import static com.android.launcher3.LauncherState.OVERVIEW_MODAL_TASK;
|
||||
import static com.android.launcher3.LauncherState.OVERVIEW_SPLIT_SELECT;
|
||||
import static com.android.launcher3.compat.AccessibilityManagerCompat.sendCustomAccessibilityEvent;
|
||||
import static com.android.launcher3.config.FeatureFlags.enableSplitContextually;
|
||||
import static com.android.launcher3.logging.StatsLogManager.LauncherEvent.LAUNCHER_APP_LAUNCH_TAP;
|
||||
import static com.android.launcher3.model.data.ItemInfo.NO_MATCHING_ID;
|
||||
import static com.android.launcher3.popup.QuickstepSystemShortcut.getSplitSelectShortcutByPosition;
|
||||
@@ -676,7 +677,7 @@ public class QuickstepLauncher extends Launcher {
|
||||
splitSelectSource.alreadyRunningTaskId = taskWasFound
|
||||
? foundTask.key.id
|
||||
: INVALID_TASK_ID;
|
||||
if (FeatureFlags.enableSplitContextually()) {
|
||||
if (enableSplitContextually()) {
|
||||
startSplitToHome(splitSelectSource);
|
||||
} else {
|
||||
recentsView.initiateSplitSelect(splitSelectSource);
|
||||
@@ -761,7 +762,7 @@ public class QuickstepLauncher extends Launcher {
|
||||
|
||||
super.onPause();
|
||||
|
||||
if (FeatureFlags.enableSplitContextually()) {
|
||||
if (enableSplitContextually()) {
|
||||
// If Launcher pauses before both split apps are selected, exit split screen.
|
||||
if (!mSplitSelectStateController.isBothSplitAppsConfirmed() &&
|
||||
!mSplitSelectStateController.isLaunchingFirstAppFullscreen()) {
|
||||
@@ -1352,6 +1353,15 @@ public class QuickstepLauncher extends Launcher {
|
||||
return (mTaskbarUIController != null && mTaskbarUIController.hasBubbles());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean handleIncorrectSplitTargetSelection() {
|
||||
if (enableSplitContextually() && !mSplitSelectStateController.isSplitSelectActive()) {
|
||||
return false;
|
||||
}
|
||||
mSplitSelectStateController.getSplitInstructionsView().goBoing();
|
||||
return true;
|
||||
}
|
||||
|
||||
private static final class LauncherTaskViewController extends
|
||||
TaskViewTouchController<Launcher> {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user