1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-03-15 19:31:29 -07:00

Update Android port

* doc/lispref/commands.texi (Misc Events): Document variable
`disable-inhibit-text-conversion'.
* java/org/gnu/emacs/EmacsDialog.java (display1): Try an
activity that is certain to be focused first.
* lisp/touch-screen.el (touch-screen-track-tap)
(touch-screen-track-drag): Bind
`disable-inhibit-text-conversion'.
* src/keyboard.c (read_key_sequence): Only disable text
conversion if an actual function or numeric key is found in the
key sequence.
(syms_of_keyboard): New variable
`disable-inhibit-text-conversion'.
* src/lread.c (read_filtered_event): Check new variable.
* src/textconv.c (textconv_query): Remove unused label.
This commit is contained in:
Po Lu 2023-03-15 09:46:01 +08:00
parent aec73dba8f
commit c74bab6067
6 changed files with 64 additions and 42 deletions

View file

@ -244,23 +244,26 @@ public final class EmacsDialog implements DialogInterface.OnDismissListener
AlertDialog dialog;
Window window;
/* First, try to display a dialog using the service context. */
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M
|| Settings.canDrawOverlays (EmacsService.SERVICE))
context = EmacsService.SERVICE;
else if (EmacsActivity.focusedActivities.isEmpty ())
if (EmacsActivity.focusedActivities.isEmpty ())
{
/* If focusedActivities is empty then this dialog may have
been displayed immediately after a popup dialog is
dismissed. */
dismissed. Or Emacs might legitimately be in the
background. Try the service context first if possible. */
context = EmacsActivity.lastFocusedActivity;
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M
|| Settings.canDrawOverlays (EmacsService.SERVICE))
context = EmacsService.SERVICE;
else
context = EmacsActivity.lastFocusedActivity;
if (context == null)
return false;
}
else
/* Display using the activity context when Emacs is in the
foreground, as this allows the dialog to be dismissed more
consistently. */
context = EmacsActivity.focusedActivities.get (0);
Log.d (TAG, "display1: using context " + context);