Should not IntentChooser while navigation from google search result page
Reported by
huangxue...@xiaomi.com,
May 9 2018
|
||||||||
Issue descriptionExample URL: https://www.google.com/search?q=test Steps to reproduce the problem: 1. Install NewsPoint from play store:https://play.google.com/store/apps/details?id=com.til.timesnews 2. Open Chrome and navigate to https://www.google.com/search?q=test 3. Click any search result item What is the expected behavior? load search result web page in Chrome What went wrong? Intent Chooser present Does it occur on multiple sites: Yes Is it a problem with a plugin? No Did this work before? N/A Does this work in other browsers? Yes Chrome version: 68.0.3425.0 Channel: canary OS Version: 8.0 Flash Version: In the same device, Firefox 60.0 is fine. Chrome enable android app handle http/https links, if there is an android app declare intent filter with: <intent-filter> <data android:scheme="http" android:host="*"> </intent-filter> Since the app's intentFilter's authority host was wild and match all of links, then Chrome will startActivity for all of links. see: https://cs.chromium.org/chromium/src/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java?sq=package:chromium&l=287 For this issue, we can't restrict the third party developers to declare intent filter in AndroidManifest, especially android:host="*", so I recommend when check whether ExternalNavigationHandler can handle link, we should except wild host intent filter.
,
May 9 2018
,
May 10 2018
,
May 10 2018
Tested the issue in Android and able to reproduce the issue. Similar behavior is observed since Chrome #60.0.3072.0 Prerequisite - Install NewsPoint from play store: https://play.google.com/store/apps/details?id=com.til.timesnews Steps Followed: 1. Launched the Chrome Browser. 2. Search for any query or navigate to the URL: https://www.google.com/search?q=test 3. Top on any of the search result. 4. Observed that, user is not redirected to the respected site. Instead user is asked to select for the application to open with. Chrome versions tested: 60.0.3072.0, 66.0.3359.158(Stable), 68.0.3425.0(Canary) OS: Android 8.1.0 Android Devices: Pixel 2 XL This seems to be a Non-Regression issue as same behavior is seen since M-60. Untriaged for further input's on this issue. Please navigate to below link for log's and screen cast-- go/chrome-androidlogs/841133 Note: Issue is not observed on FireFox mobile version. Thanks!
,
May 31 2018
,
Jun 5 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/6d48958d7cd5f2d958a846e35d410f4ed5b85934 commit 6d48958d7cd5f2d958a846e35d410f4ed5b85934 Author: huangxueqing <huangxueqing@xiaomi.com> Date: Tue Jun 05 14:30:29 2018 Ignore Intent filters with wildcard hosts when handling links. If the Android device has a package installed that declares an Intent filter with `android:host="*"`, Chrome will launch the Intent picker UX whenever a person taps a link. This is a poor user experience. (Using `android:host="*"` arguably doesn't make much sense; normally, Intent filters would use `*` to match subdomains such as *.google.com.) Thus, skip Intent filters with such wildcard hosts when handling acceptable scheme links. R=dtrainor@chromium.org Bug: 841133 Change-Id: I3cb14309ed53e0bd623ed0da59af6635391a8718 Reviewed-on: https://chromium-review.googlesource.com/1053847 Reviewed-by: Michael Thiessen <mthiesse@chromium.org> Reviewed-by: Chris Palmer <palmer@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Commit-Queue: Michael Thiessen <mthiesse@chromium.org> Cr-Commit-Position: refs/heads/master@{#564487} [modify] https://crrev.com/6d48958d7cd5f2d958a846e35d410f4ed5b85934/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegate.java [modify] https://crrev.com/6d48958d7cd5f2d958a846e35d410f4ed5b85934/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java [modify] https://crrev.com/6d48958d7cd5f2d958a846e35d410f4ed5b85934/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java [modify] https://crrev.com/6d48958d7cd5f2d958a846e35d410f4ed5b85934/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java [modify] https://crrev.com/6d48958d7cd5f2d958a846e35d410f4ed5b85934/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImplTest.java [modify] https://crrev.com/6d48958d7cd5f2d958a846e35d410f4ed5b85934/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
,
Jun 6 2018
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/e25c08a22b83167a473dea810bbbe656ba1875b1 commit e25c08a22b83167a473dea810bbbe656ba1875b1 Author: Maria Khomenko <mariakhomenko@chromium.org> Date: Wed Jun 06 19:58:18 2018 Revert "Ignore Intent filters with wildcard hosts when handling links." This reverts commit 6d48958d7cd5f2d958a846e35d410f4ed5b85934. Reason for revert: https://bugs.chromium.org/p/chromium/issues/detail?id=850084 Original change's description: > Ignore Intent filters with wildcard hosts when handling links. > > If the Android device has a package installed that declares > an Intent filter with `android:host="*"`, Chrome will launch > the Intent picker UX whenever a person taps a link. > This is a poor user experience. (Using `android:host="*"` > arguably doesn't make much sense; normally, Intent filters > would use `*` to match subdomains such as *.google.com.) Thus, > skip Intent filters with such wildcard hosts when handling > acceptable scheme links. > > R=dtrainor@chromium.org > > Bug: 841133 > Change-Id: I3cb14309ed53e0bd623ed0da59af6635391a8718 > Reviewed-on: https://chromium-review.googlesource.com/1053847 > Reviewed-by: Michael Thiessen <mthiesse@chromium.org> > Reviewed-by: Chris Palmer <palmer@chromium.org> > Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> > Commit-Queue: Michael Thiessen <mthiesse@chromium.org> > Cr-Commit-Position: refs/heads/master@{#564487} TBR=palmer@chromium.org,mthiesse@chromium.org,dtrainor@chromium.org,mariakhomenko@chromium.org,huangxueqing@xiaomi.com # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 841133 Change-Id: I204d582d45dd27d25f47db45a6dac07d02f351b7 Reviewed-on: https://chromium-review.googlesource.com/1089470 Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Commit-Queue: Maria Khomenko <mariakhomenko@chromium.org> Cr-Commit-Position: refs/heads/master@{#565011} [modify] https://crrev.com/e25c08a22b83167a473dea810bbbe656ba1875b1/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegate.java [modify] https://crrev.com/e25c08a22b83167a473dea810bbbe656ba1875b1/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java [modify] https://crrev.com/e25c08a22b83167a473dea810bbbe656ba1875b1/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java [modify] https://crrev.com/e25c08a22b83167a473dea810bbbe656ba1875b1/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java [modify] https://crrev.com/e25c08a22b83167a473dea810bbbe656ba1875b1/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImplTest.java [modify] https://crrev.com/e25c08a22b83167a473dea810bbbe656ba1875b1/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
,
Jun 6 2018
I had to revert the CL due to the fact that we started calling a native function in ExternalNavigationDelegateImpl, but the function is being used before native has loaded. We'll need to discuss how to fix this.
,
Jun 6 2018
,
Jun 7 2018
@Maria, I will take a look
,
Jun 7 2018
@Maria, Seems intent URI was Chrome acceptable in InstantAppsHandler.handleIncomingIntent since it dispatch from Chrome intent-filter, I would like to pass a parameter such as needCheckAcceptableURI in ExternalNavigationDelegateImpl.isPackageSpecializedHandler and only call UrlUtilities.isAcceptedScheme() when needCheckAcceptableURI was true.
,
Jul 11
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/7f160bf8df7dca9946d76ecc4ac6fddf670e9d2f commit 7f160bf8df7dca9946d76ecc4ac6fddf670e9d2f Author: huangxueqing <huangxueqing@xiaomi.com> Date: Wed Jul 11 14:34:22 2018 Reland "Ignore Intent filters with wildcard hosts when handling links." This is a reland of 6d48958d7cd5f2d958a846e35d410f4ed5b85934 Don't check acceptable scheme links since UrlUtilities.isAcceptedScheme() was native function, libchrome.so had not loaded when handle intent. Original change's description: > Ignore Intent filters with wildcard hosts when handling links. > > If the Android device has a package installed that declares > an Intent filter with `android:host="*"`, Chrome will launch > the Intent picker UX whenever a person taps a link. > This is a poor user experience. (Using `android:host="*"` > arguably doesn't make much sense; normally, Intent filters > would use `*` to match subdomains such as *.google.com.) Thus, > skip Intent filters with such wildcard hosts when handling > acceptable scheme links. > > R=dtrainor@chromium.org > > Bug: 841133 > Change-Id: I3cb14309ed53e0bd623ed0da59af6635391a8718 > Reviewed-on: https://chromium-review.googlesource.com/1053847 > Reviewed-by: Michael Thiessen <mthiesse@chromium.org> > Reviewed-by: Chris Palmer <palmer@chromium.org> > Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> > Commit-Queue: Michael Thiessen <mthiesse@chromium.org> > Cr-Commit-Position: refs/heads/master@{#564487} Bug: 841133 Change-Id: Id2fd7f7364eb6c70280b29a1f71783a2ee89747b Reviewed-on: https://chromium-review.googlesource.com/1096554 Reviewed-by: Yaron Friedman <yfriedman@chromium.org> Reviewed-by: Chris Palmer <palmer@chromium.org> Reviewed-by: Maria Khomenko <mariakhomenko@chromium.org> Commit-Queue: Yaron Friedman <yfriedman@chromium.org> Cr-Commit-Position: refs/heads/master@{#574155} [modify] https://crrev.com/7f160bf8df7dca9946d76ecc4ac6fddf670e9d2f/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegate.java [modify] https://crrev.com/7f160bf8df7dca9946d76ecc4ac6fddf670e9d2f/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImpl.java [modify] https://crrev.com/7f160bf8df7dca9946d76ecc4ac6fddf670e9d2f/chrome/android/java/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandler.java [modify] https://crrev.com/7f160bf8df7dca9946d76ecc4ac6fddf670e9d2f/chrome/android/java/src/org/chromium/chrome/browser/webapps/WebappTabDelegate.java [modify] https://crrev.com/7f160bf8df7dca9946d76ecc4ac6fddf670e9d2f/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationDelegateImplTest.java [modify] https://crrev.com/7f160bf8df7dca9946d76ecc4ac6fddf670e9d2f/chrome/android/javatests/src/org/chromium/chrome/browser/externalnav/ExternalNavigationHandlerTest.java
,
Jul 11
This is fixed, right?
,
Jul 12
Yes, it's fixed. |
||||||||
►
Sign in to add a comment |
||||||||
Comment 1 by huangxue...@xiaomi.com
, May 9 2018