Trusted Web Activities not started with flags
Reported by
markst3v...@gmail.com,
Jan 9 2018
|
||||
Issue description
Steps to reproduce the problem:
1. Using Android support lib 27.0.2 setup a Chrome CustomTabsIntent with flags Intent.FLAG_ACTIVITY_NO_HISTORY | Intent.FLAG_ACTIVITY_EXCLUDE_FROM_RECENTS
2. Launch it as a Trusted Web Activity: TrustedWebUtils.launchAsTrustedWebActivity(activity, customTabsIntent, Uri.parse(url));
3. The flags are passed onto IntentDispatcher but not onto WebappActivity. This means the WebappActivity hangs around in the activity stack and recent apps view. Normal custom tabs don't do this as they get the flags passed onto them.
What is the expected behavior?
Flags passed onto WebappActivity
What went wrong?
Flags were not passed onto WebappActivity
Did this work before? N/A
Does this work in other browsers? N/A
Chrome version: 65.0.3315.0 Channel: canary
OS Version: 8.1.0
Flash Version: N/A
The above code results in the following logcat:
ActivityManager: START u0 {act=android.intent.action.VIEW dat=<redacted> flg=0x40800000 pkg=com.chrome.canary cmp=com.chrome.canary/com.google.android.apps.chrome.IntentDispatcher (edited)
ActivityManager: START u0 {act=android.intent.action.VIEW dat=<redacted> flg=0x14080000 cmp=com.chrome.canary/org.chromium.chrome.browser.webapps.WebappActivity (has extras)} from uid 10247
The IntentDispatcher is launched with the flags as in the above code (0x40800000) but the WebappActivity is launched with the flags 0x14080000:
FLAG_RECEIVER_FOREGROUND | FLAG_RECEIVER_REGISTERED_ONLY_BEFORE_BOOT | FLAG_ACTIVITY_CLEAR_WHEN_TASK_RESET
,
Jan 10 2018
Adding appropriate component and TE-NeedsTriageHelp as this issue seems to be out of TE scope. Thanks!!
,
Jun 19 2018
This looks like a decent bug for amalova.
,
Jun 26 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4a8f9e5f475a5e09b13813d56372732aaa3cad4d commit 4a8f9e5f475a5e09b13813d56372732aaa3cad4d Author: Anna Malova <amalova@chromium.org> Date: Tue Jun 26 19:57:27 2018 pass flags onto TWA from the intent Bug: 800316 Change-Id: Ibc4c89a8032f0ef343aee4477d96c92203de0a2a Reviewed-on: https://chromium-review.googlesource.com/1113929 Reviewed-by: Bernhard Bauer <bauerb@chromium.org> Reviewed-by: Peter Conn <peconn@chromium.org> Commit-Queue: Anna Malova <amalova@chromium.org> Cr-Commit-Position: refs/heads/master@{#570503} [modify] https://crrev.com/4a8f9e5f475a5e09b13813d56372732aaa3cad4d/chrome/android/java/src/org/chromium/chrome/browser/LaunchIntentDispatcher.java
,
Jul 3
|
||||
►
Sign in to add a comment |
||||
Comment 1 by pnangunoori@chromium.org
, Jan 10 2018