forked from mirror/monocles_chat
Code correction
This commit is contained in:
parent
4fef49b85f
commit
6b2e815733
2 changed files with 2 additions and 2 deletions
|
@ -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) {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue