Merge "[LE Broadcast]Fix the crash in the BluetoothLeBroadcast constructor" into tm-qpr-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
5fa44874ba
@@ -210,13 +210,15 @@ public class LocalBluetoothLeBroadcast implements LocalBluetoothProfile {
|
|||||||
|
|
||||||
LocalBluetoothLeBroadcast(Context context) {
|
LocalBluetoothLeBroadcast(Context context) {
|
||||||
mExecutor = Executors.newSingleThreadExecutor();
|
mExecutor = Executors.newSingleThreadExecutor();
|
||||||
BluetoothAdapter.getDefaultAdapter().
|
|
||||||
getProfileProxy(context, mServiceListener, BluetoothProfile.LE_AUDIO_BROADCAST);
|
|
||||||
mBuilder = new BluetoothLeAudioContentMetadata.Builder();
|
mBuilder = new BluetoothLeAudioContentMetadata.Builder();
|
||||||
mContentResolver = context.getContentResolver();
|
mContentResolver = context.getContentResolver();
|
||||||
Handler handler = new Handler(Looper.getMainLooper());
|
Handler handler = new Handler(Looper.getMainLooper());
|
||||||
mSettingsObserver = new BroadcastSettingsObserver(handler);
|
mSettingsObserver = new BroadcastSettingsObserver(handler);
|
||||||
updateBroadcastInfoFromContentProvider();
|
updateBroadcastInfoFromContentProvider();
|
||||||
|
|
||||||
|
// Before registering callback, the constructor should finish creating the all of variables.
|
||||||
|
BluetoothAdapter.getDefaultAdapter()
|
||||||
|
.getProfileProxy(context, mServiceListener, BluetoothProfile.LE_AUDIO_BROADCAST);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user