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

Commit 2afa9abc authored by Hyundo Moon's avatar Hyundo Moon Committed by Automerger Merge Worker
Browse files

Merge "Fix deadlock in MediaRouterService" into sc-v2-dev am: a5be112b am: 9affa9f6

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/16284010

Change-Id: Idfffbe7dd96e30ac4e26c3138720f045ce7caaea
parents 5ce7c4b2 9affa9f6
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -101,6 +101,7 @@ public final class MediaRouterService extends IMediaRouterService.Stub

    // State guarded by mLock.
    private final Object mLock = new Object();

    private final SparseArray<UserRecord> mUserRecords = new SparseArray<>();
    private final ArrayMap<IBinder, ClientRecord> mAllClientRecords = new ArrayMap<>();
    private int mCurrentUserId = -1;
@@ -351,9 +352,7 @@ public final class MediaRouterService extends IMediaRouterService.Stub

        final long token = Binder.clearCallingIdentity();
        try {
            synchronized (mLock) {
            mAudioService.setBluetoothA2dpOn(on);
            }
        } catch (RemoteException ex) {
            Slog.w(TAG, "RemoteException while calling setBluetoothA2dpOn. on=" + on);
        } finally {