Loading quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java +1 −4 Original line number Diff line number Diff line Loading @@ -28,10 +28,8 @@ import android.util.Log; import android.util.Pair; import android.view.View; import android.widget.RemoteViews; import android.widget.Toast; import android.window.SplashScreen; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.logging.StatsLogManager; import com.android.launcher3.model.data.ItemInfo; Loading Loading @@ -63,8 +61,7 @@ class QuickstepInteractionHandler implements RemoteViews.InteractionHandler { // Log metric StatsLogManager.StatsLogger logger = mLauncher.getStatsLogManager().logger(); logger.log(LAUNCHER_SPLIT_WIDGET_ATTEMPT); Toast.makeText(hostView.getContext(), R.string.split_widgets_not_supported, Toast.LENGTH_SHORT).show(); mLauncher.handleIncorrectSplitTargetSelection(); return true; } Pair<Intent, ActivityOptions> options = remoteResponse.getLaunchOptions(view); Loading quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +12 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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()) { Loading Loading @@ -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> { Loading src/com/android/launcher3/views/ActivityContext.java +13 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,19 @@ public interface ActivityContext { return false; } /** * Handle user tapping on unsupported target when in split selection mode. * See {@link #isSplitSelectionActive()} * * @return {@code true} if this method will handle the incorrect target selection, * {@code false} if it could not be handled or if not possible to handle based on * current split state */ default boolean handleIncorrectSplitTargetSelection() { // Overridden return false; } /** * The root view to support drag-and-drop and popup support. */ Loading Loading
quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java +1 −4 Original line number Diff line number Diff line Loading @@ -28,10 +28,8 @@ import android.util.Log; import android.util.Pair; import android.view.View; import android.widget.RemoteViews; import android.widget.Toast; import android.window.SplashScreen; import com.android.launcher3.R; import com.android.launcher3.Utilities; import com.android.launcher3.logging.StatsLogManager; import com.android.launcher3.model.data.ItemInfo; Loading Loading @@ -63,8 +61,7 @@ class QuickstepInteractionHandler implements RemoteViews.InteractionHandler { // Log metric StatsLogManager.StatsLogger logger = mLauncher.getStatsLogManager().logger(); logger.log(LAUNCHER_SPLIT_WIDGET_ATTEMPT); Toast.makeText(hostView.getContext(), R.string.split_widgets_not_supported, Toast.LENGTH_SHORT).show(); mLauncher.handleIncorrectSplitTargetSelection(); return true; } Pair<Intent, ActivityOptions> options = remoteResponse.getLaunchOptions(view); Loading
quickstep/src/com/android/launcher3/uioverrides/QuickstepLauncher.java +12 −2 Original line number Diff line number Diff line Loading @@ -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; Loading Loading @@ -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); Loading Loading @@ -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()) { Loading Loading @@ -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> { Loading
src/com/android/launcher3/views/ActivityContext.java +13 −0 Original line number Diff line number Diff line Loading @@ -154,6 +154,19 @@ public interface ActivityContext { return false; } /** * Handle user tapping on unsupported target when in split selection mode. * See {@link #isSplitSelectionActive()} * * @return {@code true} if this method will handle the incorrect target selection, * {@code false} if it could not be handled or if not possible to handle based on * current split state */ default boolean handleIncorrectSplitTargetSelection() { // Overridden return false; } /** * The root view to support drag-and-drop and popup support. */ Loading