mirror of
https://github.com/nextcloud/talk-android
synced 2025-06-20 03:59:35 +01:00
allow app to query for apps that can resolve VIEW or SEND intents
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
This commit is contained in:
parent
6f206aa5b8
commit
40506eaeaf
@ -192,4 +192,16 @@
|
||||
</provider>
|
||||
|
||||
</application>
|
||||
|
||||
<queries>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.VIEW" />
|
||||
<data android:mimeType="*/*" />
|
||||
</intent>
|
||||
<intent>
|
||||
<action android:name="android.intent.action.SEND" />
|
||||
<data android:mimeType="*/*" />
|
||||
</intent>
|
||||
</queries>
|
||||
|
||||
</manifest>
|
||||
|
@ -371,9 +371,6 @@ public abstract class MagicPreviewMessageViewHolder extends MessageHolders.Incom
|
||||
File file = new File(path);
|
||||
Intent intent = new Intent(Intent.ACTION_VIEW);
|
||||
intent.setDataAndType(Uri.fromFile(file), mimetype);
|
||||
|
||||
// TODO resolveActivity might need more permissions starting with android 11 (api 30)
|
||||
// https://developer.android.com/about/versions/11/privacy/package-visibility
|
||||
return intent.resolveActivity(context.getPackageManager()) != null;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user