1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2026-01-19 01:10:57 -08:00

Update Android port

* java/debug.sh (is_root): Go back to using unix sockets; allow
adb to forward them correctly.
* java/org/gnu/emacs/EmacsInputConnection.java
(getExtractedText): Don't print text if NULL.
* java/org/gnu/emacs/EmacsService.java (EmacsService): New field
`imSyncInProgress'.
(updateIC): If an IM sync might be in progress, avoid deadlocks.
* java/org/gnu/emacs/EmacsView.java (onCreateInputConnection):
Set `imSyncInProgress' across synchronization point.
* src/android.c (android_check_query): Use __atomic_store_n.
(android_answer_query): New function.
(android_begin_query): Set `android_servicing_query' to 2.
Check once, and don't spin waiting for query to complete.
(android_end_query): Use __atomic_store_n.
(android_run_in_emacs_thread): Compare-and-exchange flag.  If
originally 1, fail.
* src/textconv.c (really_set_composing_text): Clear conversion
region if text is empty.
This commit is contained in:
Po Lu 2023-05-31 10:13:04 +08:00
parent 733a6776f9
commit 57903519eb
6 changed files with 126 additions and 22 deletions

View file

@ -628,8 +628,14 @@ public final class EmacsView extends ViewGroup
}
/* Obtain the current position of point and set it as the
selection. */
selection. Don't do this under one specific situation: if
`android_update_ic' is being called in the main thread, trying
to synchronize with it can cause a dead lock in the IM
manager. */
EmacsService.imSyncInProgress = true;
selection = EmacsNative.getSelection (window.handle);
EmacsService.imSyncInProgress = false;
if (selection != null)
Log.d (TAG, "onCreateInputConnection: current selection is: "