-
-
Notifications
You must be signed in to change notification settings - Fork 41
Default to strict file-type registration (fixes #477) #479
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -77,6 +77,7 @@ | |
|
|
||
| <activity-alias | ||
| android:name="at.tomtasche.reader.ui.activity.MainActivity.CATCH_ALL" | ||
| android:enabled="false" | ||
| android:exported="true" | ||
| android:label="@string/app_title" | ||
| android:targetActivity="at.tomtasche.reader.ui.activity.MainActivity" | ||
|
|
@@ -208,6 +209,7 @@ | |
| </activity-alias> | ||
| <activity-alias | ||
| android:name="at.tomtasche.reader.ui.activity.MainActivity.STRICT_CATCH" | ||
| android:enabled="true" | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Enabling Useful? React with 👍 / 👎. |
||
| android:exported="true" | ||
| android:label="@string/app_title" | ||
| android:targetActivity="at.tomtasche.reader.ui.activity.MainActivity" | ||
|
|
@@ -225,10 +227,18 @@ | |
| <data android:mimeType="application/vnd.oasis.opendocument.spreadsheet-template" /> | ||
| <data android:mimeType="application/vnd.oasis.opendocument.presentation" /> | ||
| <data android:mimeType="application/vnd.oasis.opendocument.presentation-template" /> | ||
| <data android:mimeType="application/vnd.oasis.opendocument.graphics" /> | ||
| <data android:mimeType="application/vnd.oasis.opendocument.graphics-template" /> | ||
| <data android:mimeType="application/octet-stream" /> | ||
| <data android:mimeType="application/pdf" /> | ||
| <data android:mimeType="application/vnd.openxmlformats-officedocument.wordprocessingml.document" /> | ||
| <data android:mimeType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" /> | ||
| <data android:mimeType="application/msword" /> | ||
| <!-- raw types handled by RawLoader; text/plain (not text/*) avoids re-matching text/vcard contacts (#477) --> | ||
| <data android:mimeType="text/plain" /> | ||
| <data android:mimeType="text/csv" /> | ||
| <data android:mimeType="image/*" /> | ||
| <data android:mimeType="application/zip" /> | ||
| </intent-filter> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
|
|
@@ -288,6 +298,34 @@ | |
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.doc" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.doc" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.doc" /> | ||
| <data android:pathPattern=".*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.zip" /> | ||
| </intent-filter> | ||
| <intent-filter> | ||
| <action android:name="android.intent.action.VIEW" /> | ||
|
|
@@ -348,6 +386,34 @@ | |
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.doc" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.doc" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.doc" /> | ||
| <data android:pathPattern=".*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.xlsx" /> | ||
| <data android:pathPattern=".*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.txt" /> | ||
| <data android:pathPattern=".*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.csv" /> | ||
| <data android:pathPattern=".*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\.zip" /> | ||
| <data android:pathPattern=".*\\..*\\..*\\..*\\..*\\..*\\..*\\.zip" /> | ||
| </intent-filter> | ||
| </activity-alias> | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Disabling
CATCH_ALLremoves the only default filter that matches anACTION_VIEWintent carrying a barefile:///.../name.odtURI with no MIME type: the strict extension filters below all require an authority viaandroid:host="*", while normalfile:///URIs have no host. Legacy file managers that send supported documents this way will stop showing the app unless users opt into all-file-types, even though strict mode is supposed to cover document extensions.Useful? React with 👍 / 👎.