Update Android port

* java/org/gnu/emacs/EmacsService.java (browseUrl): Confer
rights to write the URI indefinitely.
This commit is contained in:
Po Lu 2023-09-03 20:13:29 +08:00
parent 7eed479eab
commit 6278e15f62

View file

@ -643,13 +643,18 @@ invocation of app_process (through android-emacs) can
uri.getPath ());
}
Log.d (TAG, ("browseUri: browsing " + url
+ " --> " + uri.getPath ()
+ " --> " + uri));
intent = new Intent (Intent.ACTION_VIEW, uri);
/* Set several flags on the Intent prompting the system to
permit the recipient to read and edit the URI
indefinitely. */
intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK
| Intent.FLAG_GRANT_READ_URI_PERMISSION);
| Intent.FLAG_GRANT_READ_URI_PERMISSION
| Intent.FLAG_GRANT_WRITE_URI_PERMISSION);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT)
intent.addFlags (Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION);
}
else
{