* 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.
(Please see the section GNUTLS near the end of this file.)
libtiff - https://sourceforge.net/projects/android-ports-for-gnu-emacs
(Extract and point ``--with-ndk-path'' to tiff-4.5.0-emacs.tar.gz.)
+ tree-sitter - https://sourceforge.net/projects/android-ports-for-gnu-emacs
+ (Please see the section TREE-SITTER near the end of this file.)
We anticipate that most untested non-trivial ndk-build dependencies
will need adjustments in Emacs to work, as the Emacs build system
should not try to build these packages separately using any
`configure' script or Makefiles inside.
+TREE-SITTER
+
+A copy of tree-sitter modified to build with the ndk-build system can
+also find that URL. To build Emacs with tree-sitter, you must unpack
+the following tar archive in that site:
+
+ tree-sitter-0.20.7-emacs.tar.gz
+
+and add the resulting folder to ``--with-ndk-build''.
+
\f
This file is part of GNU Emacs.
passthrough="$passthrough --with-gnutls=$with_gnutls"
passthrough="$passthrough --with-tiff=$with_tiff"
passthrough="$passthrough --with-selinux=$with_selinux"
+ passthrough="$passthrough --with-modules=$with_modules"
+ passthrough="$passthrough --with-tree-sitter=$with_tree_sitter"
AS_IF([XCONFIGURE=android ANDROID_CC="$ANDROID_CC" \
ANDROID_SDK="$android_sdk" android_abi=$android_abi \
with_gnutls=no
with_tiff=no
with_selinux=no
+ with_modules=no
+ with_tree_sitter=no
fi
with_rsvg=no
with_libsystemd=no
with_cairo=no
with_imagemagick=no
- with_tree_sitter=no
with_xft=no
with_harfbuzz=no
with_libotf=no
with_gpm=no
with_dbus=no
with_gsettings=no
- with_modules=no
with_threads=no
# zlib is available in android.
always returns @code{nil} for the clipboard selection.
@item
-On Android 3.0 and later, Emacs can only access clipboard data when
-one of its frames has the input focus.
+Between Android 3.0 and Android 9.0, Emacs is able to access the
+clipboard whenever it wants, and @code{gui-selection-owner-p} always
+returns accurate results.
+
+@item
+Under Android 10.0 and later, Emacs can only access clipboard data
+when one of its frames has the input focus, and
+@code{gui-selection-owner-p} always returns @code{nil} for the
+clipboard selection.
@end itemize
Since the Android system itself has no concept of a primary
import android.util.Log;
+import android.os.Build;
+
import java.io.UnsupportedEncodingException;
/* This class implements EmacsClipboard for Android 3.0 and later
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
public synchronized int
ownsClipboard ()
{
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q)
+ return -1;
+
return ownsClipboard ? 1 : 0;
}