Use MIME types in OPML import intent filter

File extensions are widely unreliable - extraneous dots in a file's path will break intent filters
relying on pathPattern's wildcard character, and some applications will omit file extensions
altogether when sending intents (e.g. K-9 Mail). Using MIME types will occasionally catch non-OPML
files in the filter, but it is currently the best option available.

Fixes #1758
This commit is contained in:
mateoeh 2016-07-05 20:59:53 -06:00
parent 88516d29ca
commit 47bde42a1e
1 changed files with 9 additions and 10 deletions

View File

@ -175,16 +175,15 @@
<category android:name="android.intent.category.DEFAULT"/>
<category android:name="android.intent.category.BROWSABLE"/>
<data
android:host="*"
android:pathPattern=".*\\.opml"
android:scheme="file"
android:mimeType="*/*"/>
<data
android:host="*"
android:pathPattern=".*\\.opml"
android:scheme="content"
android:mimeType="*/*"/>
<data android:mimeType="text/xml"/>
<data android:mimeType="text/x-opml"/>
<data android:mimeType="application/xml"/>
<data android:mimeType="application/octet-stream"/>
<data android:scheme="file"/>
<data android:scheme="content"/>
<data android:host="*"/>
</intent-filter>
</activity>
<activity