Code correction

This commit is contained in:
Arne 2024-09-13 10:34:55 +02:00
parent 4fef49b85f
commit 6b2e815733
2 changed files with 2 additions and 2 deletions

View file

@ -73,7 +73,7 @@ public class ViewUtil {
} else {
final Intent openIntent = new Intent(Intent.ACTION_VIEW);
openIntent.setDataAndType(uri, mime);
openIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
openIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
try {
context.startActivity(openIntent);
} catch (final ActivityNotFoundException e) {

View file

@ -157,7 +157,7 @@ public class MediaViewerActivity extends XmppActivity implements AudioManager.On
String mime = MimeUtils.guessMimeTypeFromUri(this, uri);
Intent openIntent = new Intent(Intent.ACTION_VIEW);
openIntent.setDataAndType(uri, mime);
openIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
openIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
PackageManager manager = this.getPackageManager();
List<ResolveInfo> info = manager.queryIntentActivities(openIntent, 0);
if (info.size() == 0) {