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

Commit d45c98a4 authored by SongFerng Wang's avatar SongFerng Wang Committed by Automerger Merge Worker
Browse files

Merge "[LeAudioBroadcast] avoid the system register mBroadcastCallback again"...

Merge "[LeAudioBroadcast] avoid the system register mBroadcastCallback again" into tm-qpr-dev am: e2137ed5

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



Change-Id: Ieea9628ca023eba9f2946f4d4bf6599863f3b9b2
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents a601bfec e2137ed5
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -87,19 +87,23 @@ public class LocalBluetoothLeBroadcast implements LocalBluetoothProfile {
            if (DEBUG) {
                Log.d(TAG, "Bluetooth service connected");
            }
            if(!mIsProfileReady) {
                mService = (BluetoothLeBroadcast) proxy;
                mIsProfileReady = true;
                registerServiceCallBack(mExecutor, mBroadcastCallback);
            }
        }

        @Override
        public void onServiceDisconnected(int profile) {
            if (DEBUG) {
                Log.d(TAG, "Bluetooth service disconnected");
            }
            if(mIsProfileReady) {
                mIsProfileReady = false;
                unregisterServiceCallBack(mBroadcastCallback);
            }
        }
    };

    private final BluetoothLeBroadcast.Callback mBroadcastCallback =