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:
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user