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:
Vinit Nayak
2024-01-23 15:58:02 -08:00
parent d4b2c8a858
commit ec52ed9f99
3 changed files with 26 additions and 6 deletions
@@ -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;
@@ -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);