From 4bbad20d70f2fc9b084b8c5cfd18b5ddfb78df78 Mon Sep 17 00:00:00 2001 From: Po Lu Date: Mon, 4 Sep 2023 09:42:10 +0800 Subject: [PATCH] Correct deadlock in Android port * java/org/gnu/emacs/EmacsService.java (updateCursorAnchorInfo): Delete extraneous whitespace. (updateExtractedText): Encase synchronous IM manager operation in deadlock prevention mechanism. --- java/org/gnu/emacs/EmacsService.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/org/gnu/emacs/EmacsService.java b/java/org/gnu/emacs/EmacsService.java index fb123769bdf..05952f98cf1 100644 --- a/java/org/gnu/emacs/EmacsService.java +++ b/java/org/gnu/emacs/EmacsService.java @@ -889,8 +889,6 @@ public final class EmacsService extends Service 0); info = builder.build (); - - if (DEBUG_IC) Log.d (TAG, ("updateCursorAnchorInfo: " + x + " " + y + " " + yBaseline + "-" + yBottom)); @@ -1142,8 +1140,10 @@ public final class EmacsService extends Service if (DEBUG_IC) Log.d (TAG, "updateExtractedText: @" + token + ", " + text); + icBeginSynchronous (); window.view.imManager.updateExtractedText (window.view, token, text); + icEndSynchronous (); } -- 2.39.2