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

Commit e2137ed5 authored by SongFerng Wang's avatar SongFerng Wang Committed by Android (Google) Code Review
Browse files

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

parents 6ccda783 548cc04b
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 =