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