Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f14fe14a authored by Yohei Yukawa's avatar Yohei Yukawa
Browse files

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
      f982e75a

Bug: 35102403
Test: compile
Change-Id: I6d47e8cb6e301286bcb26922b74ee7cac2c5c1c5
parent 3e32b84e
Loading
Loading
Loading
Loading
+2 −5
Original line number Diff line number Diff line
@@ -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,13 +1034,10 @@ public class TextServicesManagerService extends ITextServicesManager.Stub {

        @Override
        public void onCallbackDied(ISpellCheckerSessionListener listener) {
            synchronized(mSpellCheckerMap) {
            mGroup.removeListener(listener);
        }
    }

    }

    private static final class ISpellCheckerServiceCallbackBinder
            extends ISpellCheckerServiceCallback.Stub {
        @NonNull