Remove a redundant synchronized block
This CL removes a redundant synchronized block, which was accidentally
added in the previous CL [1] that simplified
TextServicesManagerService (TSMS) by using RemoteCallbackList<E>.
Since SpellCheckerBindGroup#removeListener() internally acquires the
lock on TSMS#mSpellCheckerMap, there is no need to acquire the same
lock in the caller.
This CL is just a mechanical clean-up. No behavior change is intended.
[1]: I38942765ed6bec6713757b1d5f325e7a633c2ba7
f982e75a26
Bug: 35102403
Test: compile
Change-Id: I6d47e8cb6e301286bcb26922b74ee7cac2c5c1c5
This commit is contained in:
@@ -1024,7 +1024,7 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
private final class InternalDeathRecipients extends
|
||||
private static final class InternalDeathRecipients extends
|
||||
RemoteCallbackList<ISpellCheckerSessionListener> {
|
||||
private final SpellCheckerBindGroup mGroup;
|
||||
|
||||
@@ -1034,11 +1034,8 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {
|
||||
|
||||
@Override
|
||||
public void onCallbackDied(ISpellCheckerSessionListener listener) {
|
||||
synchronized(mSpellCheckerMap) {
|
||||
mGroup.removeListener(listener);
|
||||
}
|
||||
mGroup.removeListener(listener);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private static final class ISpellCheckerServiceCallbackBinder
|
||||
|
||||
Reference in New Issue
Block a user