From 04b8ac607ebbc4d9d6dee23179001f03a1162833 Mon Sep 17 00:00:00 2001 From: Cyrus Boadway Date: Tue, 4 May 2021 18:32:05 +0000 Subject: [PATCH] Add NEW_TASK flag to Quickstep App Widget activity start Include the NEW_TASK flag to activity starts launched from Quickstep hosted App Widgets. This is consistent with the default non-Quickstep generated ActivityOptions from RemoteViews::getLaunchOptions. Bug: 169042867 Test: manual Change-Id: Iba370731f4126d92a11a4e348e74888b533d4d8b --- .../launcher3/uioverrides/QuickstepInteractionHandler.java | 1 + 1 file changed, 1 insertion(+) diff --git a/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java b/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java index 5c19ab8bf4..a54f963100 100644 --- a/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java +++ b/quickstep/src/com/android/launcher3/uioverrides/QuickstepInteractionHandler.java @@ -50,6 +50,7 @@ class QuickstepInteractionHandler implements RemoteViews.InteractionHandler { Pair options = remoteResponse.getLaunchOptions(hostView); ActivityOptionsWrapper activityOptions = mLauncher.getAppTransitionManager() .getActivityLaunchOptions(mLauncher, hostView); + activityOptions.options.setPendingIntentLaunchFlags(Intent.FLAG_ACTIVITY_NEW_TASK); Object itemInfo = hostView.getTag(); if (itemInfo instanceof ItemInfo) { mLauncher.addLaunchCookie((ItemInfo) itemInfo, activityOptions.options);