Prevent widgets from entering split

Bug: 296502210
Test: Manual
Flag: ACONFIG com.android.wm.shell.enable_split_contextual DEVELOPMENT
Change-Id: I1a166f6ca0fe5fd2fa1d29b97b8856e52985e0c1
This commit is contained in:
Vinit Nayak
2023-11-10 12:17:12 -08:00
parent d66d114944
commit 1d3035e024
2 changed files with 6 additions and 2 deletions

View File

@@ -27,8 +27,10 @@ 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;
@@ -56,8 +58,9 @@ class QuickstepInteractionHandler implements RemoteViews.InteractionHandler {
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);