Loading packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastAssistant.java +13 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,19 @@ public class LocalBluetoothLeBroadcastAssistant implements LocalBluetoothProfile Log.d(TAG, "The BluetoothLeBroadcastAssistant is null"); return; } try { mService.addSource(sink, metadata, isGroupOp); } catch (IllegalStateException e) { // BT will check callback registration before add source. // If it throw callback exception when bt is disabled, then the failure is intended, // just catch it here. BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); if (adapter != null && adapter.isEnabled()) { throw e; } else { Log.d(TAG, "Catch addSource failure when bt is disabled: " + e); } } } /** Loading Loading
packages/SettingsLib/src/com/android/settingslib/bluetooth/LocalBluetoothLeBroadcastAssistant.java +13 −1 Original line number Diff line number Diff line Loading @@ -151,7 +151,19 @@ public class LocalBluetoothLeBroadcastAssistant implements LocalBluetoothProfile Log.d(TAG, "The BluetoothLeBroadcastAssistant is null"); return; } try { mService.addSource(sink, metadata, isGroupOp); } catch (IllegalStateException e) { // BT will check callback registration before add source. // If it throw callback exception when bt is disabled, then the failure is intended, // just catch it here. BluetoothAdapter adapter = BluetoothAdapter.getDefaultAdapter(); if (adapter != null && adapter.isEnabled()) { throw e; } else { Log.d(TAG, "Catch addSource failure when bt is disabled: " + e); } } } /** Loading