diff options
| author | Po Lu | 2023-03-15 09:46:01 +0800 |
|---|---|---|
| committer | Po Lu | 2023-03-15 09:46:01 +0800 |
| commit | c74bab6067cb95516b25e5650d5077441541ea1e (patch) | |
| tree | 95c6f345713cecc2744ec7b26349c4190439e0c1 /java/org | |
| parent | aec73dba8f955da8ae5937309a4e7f88a6b1b3c2 (diff) | |
| download | emacs-c74bab6067cb95516b25e5650d5077441541ea1e.tar.gz emacs-c74bab6067cb95516b25e5650d5077441541ea1e.zip | |
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.
Diffstat (limited to 'java/org')
| -rw-r--r-- | java/org/gnu/emacs/EmacsDialog.java | 19 |
1 files changed, 11 insertions, 8 deletions
diff --git a/java/org/gnu/emacs/EmacsDialog.java b/java/org/gnu/emacs/EmacsDialog.java index de5a37bd5c5..3a5f22021fc 100644 --- a/java/org/gnu/emacs/EmacsDialog.java +++ b/java/org/gnu/emacs/EmacsDialog.java | |||
| @@ -244,23 +244,26 @@ public final class EmacsDialog implements DialogInterface.OnDismissListener | |||
| 244 | AlertDialog dialog; | 244 | AlertDialog dialog; |
| 245 | Window window; | 245 | Window window; |
| 246 | 246 | ||
| 247 | /* First, try to display a dialog using the service context. */ | 247 | if (EmacsActivity.focusedActivities.isEmpty ()) |
| 248 | |||
| 249 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M | ||
| 250 | || Settings.canDrawOverlays (EmacsService.SERVICE)) | ||
| 251 | context = EmacsService.SERVICE; | ||
| 252 | else if (EmacsActivity.focusedActivities.isEmpty ()) | ||
| 253 | { | 248 | { |
| 254 | /* If focusedActivities is empty then this dialog may have | 249 | /* If focusedActivities is empty then this dialog may have |
| 255 | been displayed immediately after a popup dialog is | 250 | been displayed immediately after a popup dialog is |
| 256 | dismissed. */ | 251 | dismissed. Or Emacs might legitimately be in the |
| 252 | background. Try the service context first if possible. */ | ||
| 257 | 253 | ||
| 258 | context = EmacsActivity.lastFocusedActivity; | 254 | if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M |
| 255 | || Settings.canDrawOverlays (EmacsService.SERVICE)) | ||
| 256 | context = EmacsService.SERVICE; | ||
| 257 | else | ||
| 258 | context = EmacsActivity.lastFocusedActivity; | ||
| 259 | 259 | ||
| 260 | if (context == null) | 260 | if (context == null) |
| 261 | return false; | 261 | return false; |
| 262 | } | 262 | } |
| 263 | else | 263 | else |
| 264 | /* Display using the activity context when Emacs is in the | ||
| 265 | foreground, as this allows the dialog to be dismissed more | ||
| 266 | consistently. */ | ||
| 264 | context = EmacsActivity.focusedActivities.get (0); | 267 | context = EmacsActivity.focusedActivities.get (0); |
| 265 | 268 | ||
| 266 | Log.d (TAG, "display1: using context " + context); | 269 | Log.d (TAG, "display1: using context " + context); |