Prevent widgets from entering split

Bug: 296502210
Test: Manual
Flag: ACONFIG com.android.wm.shell.enable_split_contextual DEVELOPMENT
Change-Id: I1a166f6ca0fe5fd2fa1d29b97b8856e52985e0c1
diff --git a/quickstep/res/values/strings.xml b/quickstep/res/values/strings.xml
index dd9fc63..3dade66 100644
--- a/quickstep/res/values/strings.xml
+++ b/quickstep/res/values/strings.xml
@@ -235,6 +235,7 @@
     <string name="toast_split_app_unsupported">Choose another app to use split screen</string>
     <!-- Message shown when an action is blocked by a policy enforced by the app or the organization managing the device. [CHAR_LIMIT=NONE] -->
     <string name="blocked_by_policy">This action isn\'t allowed by the app or your organization</string>
+    <string name="split_widgets_not_supported">Widgets not currently supported, please select another app</string>
 
     <!-- ******* Skip tutorial dialog ******* -->
     <!-- Title for the dialog that allows the user to skip the gesture navigation tutorial. [CHAR_LIMIT=40] -->
diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java
index f5ba8f9..8092582 100644
--- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java
+++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java
@@ -27,8 +27,10 @@
 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;
@@ -56,8 +58,9 @@
             return RemoteViews.startPendingIntent(hostView, pendingIntent,
                     remoteResponse.getLaunchOptions(view));
         }
-        if (mLauncher.getSplitToWorkspaceController().handleSecondWidgetSelectionForSplit(view,
-                pendingIntent)) {
+        if (mLauncher.isSplitSelectionEnabled()) {
+            Toast.makeText(hostView.getContext(), R.string.split_widgets_not_supported,
+                    Toast.LENGTH_SHORT).show();
             return true;
         }
         Pair<Intent, ActivityOptions> options = remoteResponse.getLaunchOptions(view);