jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/404168 )

Change subject: Fix deep links for non /wiki/ links
......................................................................


Fix deep links for non /wiki/ links

In df4fb8073c0e88875d93d452bb3859b3f396a26d an intent-filter was modified to
handle URLs with a path prefix of the form `/zh-.*/`. However, this filter
matches more than it is supposed to.  The `path-prefix` and `path-pattern` are
not "prefix + pattern" but the filter matches if any of the two matches, so it
would actually match paths of the form `/zh.*` and `-.*/`. The latter is
impossible as it does not start with a slash.  The former includes paths such
as `/zhfoo` which should probably not be matched. Putting everything into a
`path-pattern` fixes this. Note that the two `<data>` entries are merged, as
explained at
https://developer.android.com/training/app-links/deep-linking.html, so
`http://` and `https://` applies to both.

Change-Id: I8a5b4e01bd1886fc392d307fa87f04dab3fa3f26
---
M app/src/main/AndroidManifest.xml
1 file changed, 4 insertions(+), 3 deletions(-)

Approvals:
  Dbrant: Looks good to me, approved
  jenkins-bot: Verified
  Cooltey: Looks good to me, but someone else must approve



diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index bdb2173..b05690a 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -104,10 +104,11 @@
                 <action android:name="android.intent.action.VIEW" />
                 <category android:name="android.intent.category.DEFAULT" />
                 <category android:name="android.intent.category.BROWSABLE" />
+                <!-- the following lines are merged
+                     
https://developer.android.com/training/app-links/deep-linking.html
+                     so http and https apply to all prefixes-->
                 <data android:host="*.wikipedia.org" 
android:pathPrefix="/wiki/" android:scheme="http" />
-                <data android:host="*.wikipedia.org" 
android:pathPrefix="/wiki/" android:scheme="https" />
-                <data android:host="*.wikipedia.org" android:pathPrefix="/zh" 
android:pathPattern="-.*/" android:scheme="http" />
-                <data android:host="*.wikipedia.org" android:pathPrefix="/zh" 
android:pathPattern="-.*/" android:scheme="https" />
+                <data android:host="*.wikipedia.org" 
android:pathPattern="/zh-.*" android:scheme="https" />
             </intent-filter>
             <intent-filter>
                 <action android:name="org.wikipedia.app_shortcut" />

-- 
To view, visit https://gerrit.wikimedia.org/r/404168
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I8a5b4e01bd1886fc392d307fa87f04dab3fa3f26
Gerrit-PatchSet: 1
Gerrit-Project: apps/android/wikipedia
Gerrit-Branch: master
Gerrit-Owner: Saraedum <julian.ru...@fsfe.org>
Gerrit-Reviewer: Brion VIBBER <br...@wikimedia.org>
Gerrit-Reviewer: Cooltey <cf...@wikimedia.org>
Gerrit-Reviewer: Dbrant <dbr...@wikimedia.org>
Gerrit-Reviewer: Sharvaniharan <sha...@wikimedia.org>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to