audio: add try catch for BluetoothLeAudio.registerCallback in BtHelper.java
The LE proxy to the BT service were initialized on profile connection,
but were never reset on profile disconnection in BtHelper.
Wrapped the calls to the BT proxies with try/catch as the
notification that a profile disconnected can happen while
the proxy is used.
09-04 01:59:48.703 1000 3272 4896 E AndroidRuntime: *** FATAL EXCEPTION IN SYSTEM PROCESS: AudioDeviceBroker
09-04 01:59:48.703 1000 3272 4896 E AndroidRuntime: java.lang.RuntimeException: android.os.DeadObjectException
09-04 01:59:48.703 1000 3272 4896 E AndroidRuntime: at android.bluetooth.BluetoothLeAudio.registerCallback(BluetoothLeAudio.java:979)
09-04 01:59:48.703 1000 3272 4896 E AndroidRuntime: at com.android.server.audio.BtHelper.onBtProfileConnected(BtHelper.java:992)
Change-Id: Ia1d8e307054e77e99d472e192f16f6f70f3f11c4
Signed-off-by:
chenxin20 <chenxin20@xiaomi.com>
Loading
Please register or sign in to comment