diff options
| author | Po Lu | 2023-09-03 20:13:29 +0800 |
|---|---|---|
| committer | Po Lu | 2023-09-03 20:21:14 +0800 |
| commit | 6278e15f62c7b3e3b360689bbe292a3f0d9ef8f5 (patch) | |
| tree | 29f0f0b680d4c1bb4c2164181deee0185ac2d8a3 /java/org/gnu | |
| parent | 7eed479eabc793b616dff32e9a3e8d9c882f3a81 (diff) | |
| download | emacs-6278e15f62c7b3e3b360689bbe292a3f0d9ef8f5.tar.gz emacs-6278e15f62c7b3e3b360689bbe292a3f0d9ef8f5.zip | |
Update Android port
* java/org/gnu/emacs/EmacsService.java (browseUrl): Confer
rights to write the URI indefinitely.
Diffstat (limited to 'java/org/gnu')
| -rw-r--r-- | java/org/gnu/emacs/EmacsService.java | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/EmacsService.java index 404796cd08c..fb123769bdf 100644 --- a/java/org/gnu/emacs/EmacsService.java +++ b/java/org/gnu/emacs/EmacsService.java | |||
| @@ -643,13 +643,18 @@ public final class EmacsService extends Service | |||
| 643 | uri.getPath ()); | 643 | uri.getPath ()); |
| 644 | } | 644 | } |
| 645 | 645 | ||
| 646 | Log.d (TAG, ("browseUri: browsing " + url | ||
| 647 | + " --> " + uri.getPath () | ||
| 648 | + " --> " + uri)); | ||
| 649 | |||
| 650 | intent = new Intent (Intent.ACTION_VIEW, uri); | 646 | intent = new Intent (Intent.ACTION_VIEW, uri); |
| 647 | |||
| 648 | /* Set several flags on the Intent prompting the system to | ||
| 649 | permit the recipient to read and edit the URI | ||
| 650 | indefinitely. */ | ||
| 651 | |||
| 651 | intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK | 652 | intent.setFlags (Intent.FLAG_ACTIVITY_NEW_TASK |
| 652 | | Intent.FLAG_GRANT_READ_URI_PERMISSION); | 653 | | Intent.FLAG_GRANT_READ_URI_PERMISSION |
| 654 | | Intent.FLAG_GRANT_WRITE_URI_PERMISSION); | ||
| 655 | |||
| 656 | if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT) | ||
| 657 | intent.addFlags (Intent.FLAG_GRANT_PERSISTABLE_URI_PERMISSION); | ||
| 653 | } | 658 | } |
| 654 | else | 659 | else |
| 655 | { | 660 | { |