Merge "[LeAudioBroadcast] avoid the system register mBroadcastCallback again" into tm-qpr-dev am: e2137ed5b3
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/19259768 Change-Id: Ieea9628ca023eba9f2946f4d4bf6599863f3b9b2 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
@@ -87,9 +87,11 @@ public class LocalBluetoothLeBroadcast implements LocalBluetoothProfile {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Bluetooth service connected");
|
||||
}
|
||||
mService = (BluetoothLeBroadcast) proxy;
|
||||
mIsProfileReady = true;
|
||||
registerServiceCallBack(mExecutor, mBroadcastCallback);
|
||||
if(!mIsProfileReady) {
|
||||
mService = (BluetoothLeBroadcast) proxy;
|
||||
mIsProfileReady = true;
|
||||
registerServiceCallBack(mExecutor, mBroadcastCallback);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -97,8 +99,10 @@ public class LocalBluetoothLeBroadcast implements LocalBluetoothProfile {
|
||||
if (DEBUG) {
|
||||
Log.d(TAG, "Bluetooth service disconnected");
|
||||
}
|
||||
mIsProfileReady = false;
|
||||
unregisterServiceCallBack(mBroadcastCallback);
|
||||
if(mIsProfileReady) {
|
||||
mIsProfileReady = false;
|
||||
unregisterServiceCallBack(mBroadcastCallback);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user