aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/java/de/pixart/messenger/ui/util
diff options
context:
space:
mode:
Diffstat (limited to 'src/main/java/de/pixart/messenger/ui/util')
-rw-r--r--src/main/java/de/pixart/messenger/ui/util/ShareUtil.java2
-rw-r--r--src/main/java/de/pixart/messenger/ui/util/ViewUtil.java2
2 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/de/pixart/messenger/ui/util/ShareUtil.java b/src/main/java/de/pixart/messenger/ui/util/ShareUtil.java
index 71cc5614a..6d76cf6eb 100644
--- a/src/main/java/de/pixart/messenger/ui/util/ShareUtil.java
+++ b/src/main/java/de/pixart/messenger/ui/util/ShareUtil.java
@@ -67,7 +67,7 @@ public class ShareUtil {
Toast.makeText(activity, activity.getString(R.string.no_permission_to_access_x, file.getAbsolutePath()), Toast.LENGTH_SHORT).show();
return;
}
- shareIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+ shareIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
String mime = message.getMimeType();
if (mime == null) {
mime = "*/*";
diff --git a/src/main/java/de/pixart/messenger/ui/util/ViewUtil.java b/src/main/java/de/pixart/messenger/ui/util/ViewUtil.java
index db729f0e4..931477425 100644
--- a/src/main/java/de/pixart/messenger/ui/util/ViewUtil.java
+++ b/src/main/java/de/pixart/messenger/ui/util/ViewUtil.java
@@ -69,7 +69,7 @@ public class ViewUtil {
} else {
Intent openIntent = new Intent(Intent.ACTION_VIEW);
openIntent.setDataAndType(uri, mime);
- openIntent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
+ openIntent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
PackageManager manager = context.getPackageManager();
List<ResolveInfo> info = manager.queryIntentActivities(openIntent, 0);
if (info.size() == 0) {