Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d3035e0 authored by Vinit Nayak's avatar Vinit Nayak
Browse files

Prevent widgets from entering split

Bug: 296502210
Test: Manual
Flag: ACONFIG com.android.wm.shell.enable_split_contextual DEVELOPMENT
Change-Id: I1a166f6ca0fe5fd2fa1d29b97b8856e52985e0c1
parent d66d1149
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -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] -->
+5 −2
Original line number Diff line number Diff line
@@ -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);