Loading services/core/java/com/android/server/audio/BtHelper.java +17 −4 Original line number Diff line number Diff line Loading @@ -603,7 +603,11 @@ public class BtHelper { break; case BluetoothProfile.LE_AUDIO: if (mLeAudio != null && mLeAudioCallback != null) { try { mLeAudio.unregisterCallback(mLeAudioCallback); } catch (Exception e) { Log.e(TAG, "Exception while unregistering callback for LE audio", e); } } mLeAudio = null; mLeAudioCallback = null; Loading Loading @@ -680,12 +684,21 @@ public class BtHelper { return; } if (mLeAudio != null && mLeAudioCallback != null) { try { mLeAudio.unregisterCallback(mLeAudioCallback); } catch (Exception e) { Log.e(TAG, "Exception while unregistering callback for LE audio", e); } } mLeAudio = (BluetoothLeAudio) proxy; mLeAudioCallback = new MyLeAudioCallback(); try{ mLeAudio.registerCallback( mContext.getMainExecutor(), mLeAudioCallback); } catch (Exception e) { mLeAudioCallback = null; Log.e(TAG, "Exception while registering callback for LE audio", e); } break; case BluetoothProfile.A2DP_SINK: case BluetoothProfile.LE_AUDIO_BROADCAST: Loading Loading
services/core/java/com/android/server/audio/BtHelper.java +17 −4 Original line number Diff line number Diff line Loading @@ -603,7 +603,11 @@ public class BtHelper { break; case BluetoothProfile.LE_AUDIO: if (mLeAudio != null && mLeAudioCallback != null) { try { mLeAudio.unregisterCallback(mLeAudioCallback); } catch (Exception e) { Log.e(TAG, "Exception while unregistering callback for LE audio", e); } } mLeAudio = null; mLeAudioCallback = null; Loading Loading @@ -680,12 +684,21 @@ public class BtHelper { return; } if (mLeAudio != null && mLeAudioCallback != null) { try { mLeAudio.unregisterCallback(mLeAudioCallback); } catch (Exception e) { Log.e(TAG, "Exception while unregistering callback for LE audio", e); } } mLeAudio = (BluetoothLeAudio) proxy; mLeAudioCallback = new MyLeAudioCallback(); try{ mLeAudio.registerCallback( mContext.getMainExecutor(), mLeAudioCallback); } catch (Exception e) { mLeAudioCallback = null; Log.e(TAG, "Exception while registering callback for LE audio", e); } break; case BluetoothProfile.A2DP_SINK: case BluetoothProfile.LE_AUDIO_BROADCAST: Loading