Add intent filter for handling WKD link in Firefox
Firefox for Android requires `mimeType` condition on the intent filter. Built-in browsers (e.g. Chrome) need an intent filter that will *not* have `mimeType` conditions. Using two common MIME types: `application/octet-stream` is mentioned in the I-D and `application/pgp-keys` is a common type for keys used in the wild.
This commit is contained in:
parent
92e7995b83
commit
7e3c985c54
|
@ -719,7 +719,7 @@
|
|||
<data android:pathPattern="/..*/publickey/download" />
|
||||
</intent-filter>
|
||||
|
||||
<!-- VIEW from Web Key Directory urls opened in a browser -->
|
||||
<!-- VIEW from Web Key Directory urls opened in a browser/Chrome -->
|
||||
<intent-filter android:label="@string/intent_import_key">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
|
@ -732,6 +732,27 @@
|
|||
<data android:host="*" />
|
||||
|
||||
<data android:pathPattern="/.well-known/openpgpkey/hu/.*" />
|
||||
|
||||
<!-- Chrome/Built-in browser will not be triggered if there is mimeType -->
|
||||
</intent-filter>
|
||||
|
||||
<!-- VIEW from Web Key Directory urls opened in Firefox for Android -->
|
||||
<intent-filter android:label="@string/intent_import_key">
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
|
||||
<category android:name="android.intent.category.BROWSABLE" />
|
||||
<category android:name="android.intent.category.DEFAULT" />
|
||||
|
||||
<data android:scheme="https" />
|
||||
|
||||
<!-- if we don't specify a host, pathPattern will be ignored-->
|
||||
<data android:host="*" />
|
||||
|
||||
<data android:pathPattern="/.well-known/openpgpkey/hu/.*" />
|
||||
|
||||
<!-- Firefox for Android requires mimeType -->
|
||||
<data android:mimeType="application/octet-stream" />
|
||||
<data android:mimeType="application/pgp-keys" />
|
||||
</intent-filter>
|
||||
|
||||
<!-- IMPORT_KEY with files TODO: does this work? -->
|
||||
|
|
Loading…
Reference in a new issue