Skip to content

Commit

Permalink
Setting together
Browse files Browse the repository at this point in the history
  • Loading branch information
harshad1 committed Oct 25, 2023
1 parent a77288d commit cbd54be
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions app/src/main/java/net/gsantner/opoc/util/GsContextUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -1913,8 +1913,7 @@ public void onReceive(Context context, Intent intent) {
public void requestFileEdit(final Context context, final File file) {
final Uri uri = FileProvider.getUriForFile(context, getFileProvider(context), file);
final Intent intent = new Intent(Intent.ACTION_EDIT);
intent.setData(uri); // Mime type inferred automatically
intent.setType(GsFileUtils.getMimeType(file));
intent.setDataAndType(uri, GsFileUtils.getMimeType(file));
intent.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
intent.putExtra(MediaStore.EXTRA_OUTPUT, uri);
Expand Down

0 comments on commit cbd54be

Please sign in to comment.