1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-24 22:40:51 -08:00

Update Android port

* INSTALL.android: Explain where to get tree-sitter.

* configure.ac: Add support for dynamic modules and tree-sitter.

* doc/emacs/android.texi (Android Windowing):
* java/org/gnu/emacs/EmacsSdk11Clipboard.java
(EmacsSdk11Clipboard, ownsClipboard): Improve clipboard handling
and documentation.
This commit is contained in:
Po Lu 2023-02-20 22:14:29 +08:00
parent fecd0a9fed
commit 57c19f477f
4 changed files with 36 additions and 5 deletions

View file

@ -25,6 +25,8 @@ import android.content.ClipData;
import android.util.Log;
import android.os.Build;
import java.io.UnsupportedEncodingException;
/* This class implements EmacsClipboard for Android 3.0 and later
@ -43,7 +45,12 @@ public class EmacsSdk11Clipboard extends EmacsClipboard
EmacsSdk11Clipboard ()
{
manager = EmacsService.SERVICE.getClipboardManager ();
manager.addPrimaryClipChangedListener (this);
/* The system forbids Emacs from reading clipboard data in the
background under Android 10 or later. */
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.Q)
manager.addPrimaryClipChangedListener (this);
}
@Override
@ -105,6 +112,9 @@ public class EmacsSdk11Clipboard extends EmacsClipboard
public synchronized int
ownsClipboard ()
{
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
return -1;
return ownsClipboard ? 1 : 0;
}