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

Port to Android API 36

* java/AndroidManifest.xml.in: Update targetSdkVersion to 36.

* java/INSTALL: Document revised compilation dependencies.

* java/org/gnu/emacs/EmacsActivity.java (interceptBackGesture):
New function.
(onCreate): Invoke the same to register back gesture callbacks
on Android 16 or better.

* java/org/gnu/emacs/EmacsWindow.java (onBackInvoked): New
function.

* src/keyboard.c (lispy_function_keys): Amend with new symbols
introduced in Android API 36.
This commit is contained in:
Po Lu 2025-06-11 10:34:49 +08:00
parent f69b822fb0
commit 231c4f20ea
5 changed files with 100 additions and 3 deletions

View file

@ -58,6 +58,7 @@ import android.util.SparseArray;
import android.util.Log;
import android.os.Build;
import android.os.SystemClock;
/* This defines a window, which is a handle. Windows represent a
rectangular subset of the screen with their own contents.
@ -890,6 +891,20 @@ public final class EmacsWindow extends EmacsHandleObject
EmacsNative.sendWindowAction (this.handle, 0);
}
/* Dispatch a back gesture invocation as a KeyPress event. Lamentably
the platform does not appear to support reporting keyboard
modifiers with these events. */
public void
onBackInvoked ()
{
long time = SystemClock.uptimeMillis ();
EmacsNative.sendKeyPress (this.handle, time, 0,
KeyEvent.KEYCODE_BACK, 0);
EmacsNative.sendKeyRelease (this.handle, time, 0,
KeyEvent.KEYCODE_BACK, 0);
}
/* Mouse and touch event handling.