diff options
| author | Po Lu <luangruo@yahoo.com> | 2025-06-11 10:34:49 +0800 |
|---|---|---|
| committer | Po Lu <luangruo@yahoo.com> | 2025-06-11 10:34:49 +0800 |
| commit | 231c4f20ea17a406519d5797e8ea1afdd0111a7c (patch) | |
| tree | d974ea77ed5c8d8794185f77566078c63e04872d /java/org/gnu/emacs/EmacsWindow.java | |
| parent | f69b822fb0e804a13ff7a4eb55fc2ae618e0de72 (diff) | |
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.
Diffstat (limited to 'java/org/gnu/emacs/EmacsWindow.java')
| -rw-r--r-- | java/org/gnu/emacs/EmacsWindow.java | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/java/org/gnu/emacs/EmacsWindow.java b/java/org/gnu/emacs/EmacsWindow.java index 394b2c26414..fffa2cc5d49 100644 --- a/java/org/gnu/emacs/EmacsWindow.java +++ b/java/org/gnu/emacs/EmacsWindow.java @@ -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. |
