-
Notifications
You must be signed in to change notification settings - Fork 246
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed for Deadlock in IMMS Proxy Service.
Observed deadlock while switching user. Updating imms service locking scenerio. 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
1 parent
3b87e8e
commit 4e41e50
Showing
1 changed file
with
38 additions
and
0 deletions.
There are no files selected for viewing
38 changes: 38 additions & 0 deletions
38
...eliminary/frameworks/opt/car/services/0001-Fixed-for-Deadlock-in-IMMS-Proxy-Service.patch
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
From 4ddc5c17a8d84a1b05fee583574c09a9dd2cfdd4 Mon Sep 17 00:00:00 2001 | ||
From: Ankit Agrawal <[email protected]> | ||
Date: Fri, 20 Sep 2024 07:06:01 +0530 | ||
Subject: [PATCH] Fixed for Deadlock in IMMS Proxy Service. | ||
|
||
Observed deadlock while switching user. | ||
|
||
Updating imms service locking scenerio. | ||
|
||
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 | 7 ++++++- | ||
1 file changed, 6 insertions(+), 1 deletion(-) | ||
|
||
diff --git a/builtInServices/src_imms/com/android/server/inputmethod/InputMethodManagerServiceProxy.java b/builtInServices/src_imms/com/android/server/inputmethod/InputMethodManagerServiceProxy.java | ||
index e7bb329..94a3548 100644 | ||
--- a/builtInServices/src_imms/com/android/server/inputmethod/InputMethodManagerServiceProxy.java | ||
+++ b/builtInServices/src_imms/com/android/server/inputmethod/InputMethodManagerServiceProxy.java | ||
@@ -126,7 +126,12 @@ public final class InputMethodManagerServiceProxy extends IInputMethodManager.St | ||
if ((imms = mServicesForUser.get(userId)) != null) { | ||
return imms; | ||
} | ||
- imms = new CarInputMethodManagerService(mContext, sExecutor); | ||
+ } finally { | ||
+ mRwLock.writeLock().unlock(); | ||
+ } | ||
+ imms = new CarInputMethodManagerService(mContext, sExecutor); | ||
+ try { | ||
+ mRwLock.writeLock().lock(); | ||
mServicesForUser.set(userId, imms); | ||
InputMethodManagerInternal localService = imms.getInputMethodManagerInternal(); | ||
mLocalServicesForUser.set(userId, localService); | ||
-- | ||
2.34.1 | ||
|