Commit ee529947 authored by Peter E Conn's avatar Peter E Conn Committed by Commit Bot

🤝 Remove New Document flag from TWA launch intents.

Launch Intents from TWA notifications were launched with the
FLAG_ACTIVITY_NEW_DOCUMENT flag. This resulted in a new Android Task
being created if the Uri being launched did not match the Uri used
to launch any of the existing Tasks. Since launching a TWA from the
Android Launcher wouldn't include a Uri, this practically meant that
opening a page from the notification would launch a new instance of
the TWA.

Bug: 965435
Change-Id: I0921e147d777a4c6320e17284be432bf9dab868e
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1621168Reviewed-by: default avatarPavel Shmakov <pshmakov@chromium.org>
Commit-Queue: Peter Conn <peconn@chromium.org>
Cr-Commit-Position: refs/heads/master@{#662097}
parent 36a8968a
......@@ -21,7 +21,6 @@ import android.support.customtabs.trusted.TrustedWebActivityService;
import android.support.customtabs.trusted.TrustedWebActivityServiceConnectionManager;
import android.support.customtabs.trusted.TrustedWebActivityServiceWrapper;
import org.chromium.base.ApiCompatibilityUtils;
import org.chromium.base.ContextUtils;
import org.chromium.chrome.R;
import org.chromium.chrome.browser.ChromeFeatureList;
......@@ -219,7 +218,6 @@ public class TrustedWebActivityClient {
intent.setData(Uri.parse(url));
intent.setAction(Intent.ACTION_VIEW);
intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK
| ApiCompatibilityUtils.getActivityNewDocumentFlag()
| Intent.FLAG_ACTIVITY_CLEAR_TOP);
intent.setComponent(new ComponentName(twaPackageName, twaActivityName));
return intent;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment