Skip to content

Commit

Permalink
Fixed for Deadlock in IMMS Proxy Service.
Browse files Browse the repository at this point in the history
Observed deadlock while switching user.

Updating imms service based on user in seperate thread.

Tests: Switch user few times. there is no dead lock issue.

Tracked-On: OAM-122779
Signed-off-by: Ankit Agrawal <[email protected]>
  • Loading branch information
ankithbti52509 committed Sep 19, 2024
1 parent 3b87e8e commit 6472a7f
Showing 1 changed file with 37 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
From a2517aec88f768d2b04150ace9788ed5eb2f74eb Mon Sep 17 00:00:00 2001
From: Ankit Agrawal <[email protected]>
Date: Thu, 19 Sep 2024 19:24:33 +0530
Subject: [PATCH] Fixed for Deadlock in IMMS.

Observed deadlock while switching user.

Updating imms service based on user in seperate thread.

Tests: Switch user few times. there is no dead lock issue.

Tracked-On: OAM-122779
Signed-off-by: Ankit Agrawal <[email protected]>
---
.../server/inputmethod/InputMethodManagerServiceProxy.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/builtInServices/src_imms/com/android/server/inputmethod/InputMethodManagerServiceProxy.java b/builtInServices/src_imms/com/android/server/inputmethod/InputMethodManagerServiceProxy.java
index e7bb329..4f3f208 100644
--- a/builtInServices/src_imms/com/android/server/inputmethod/InputMethodManagerServiceProxy.java
+++ b/builtInServices/src_imms/com/android/server/inputmethod/InputMethodManagerServiceProxy.java
@@ -1076,8 +1076,10 @@ public final class InputMethodManagerServiceProxy extends IInputMethodManager.St
if (DBG) {
Slogf.d(mImmiTag, "User {%d} invoking updateImeWindowStatus", callingUserId);
}
- InputMethodManagerInternal immi = getLocalServiceForUser(callingUserId);
- immi.updateImeWindowStatus(disableImeIcon);
+ sExecutor.execute(() -> {
+ InputMethodManagerInternal immi = getLocalServiceForUser(callingUserId);
+ immi.updateImeWindowStatus(disableImeIcon);
+ });
}

@Override
--
2.34.1

0 comments on commit 6472a7f

Please sign in to comment.