Loading services/core/java/com/android/server/audio/BtHelper.java +17 −8 Original line number Diff line number Diff line Loading @@ -436,8 +436,13 @@ public class BtHelper { if (mBluetoothHeadset == null || mBluetoothHeadsetDevice == null) { return false; } try { return mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice) == BluetoothHeadset.STATE_AUDIO_CONNECTED; } catch (Exception e) { Log.e(TAG, "Exception while getting audio state of " + mBluetoothHeadsetDevice, e); } return false; } // @GuardedBy("mDeviceBroker.mSetModeLock") Loading Loading @@ -1051,6 +1056,7 @@ public class BtHelper { } private void checkScoAudioState() { try { if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null && mScoAudioState == SCO_STATE_INACTIVE Loading @@ -1058,6 +1064,9 @@ public class BtHelper { != BluetoothHeadset.STATE_AUDIO_DISCONNECTED) { mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL; } } catch (Exception e) { Log.e(TAG, "Exception while getting audio state of " + mBluetoothHeadsetDevice, e); } } private boolean getBluetoothHeadset() { Loading Loading
services/core/java/com/android/server/audio/BtHelper.java +17 −8 Original line number Diff line number Diff line Loading @@ -436,8 +436,13 @@ public class BtHelper { if (mBluetoothHeadset == null || mBluetoothHeadsetDevice == null) { return false; } try { return mBluetoothHeadset.getAudioState(mBluetoothHeadsetDevice) == BluetoothHeadset.STATE_AUDIO_CONNECTED; } catch (Exception e) { Log.e(TAG, "Exception while getting audio state of " + mBluetoothHeadsetDevice, e); } return false; } // @GuardedBy("mDeviceBroker.mSetModeLock") Loading Loading @@ -1051,6 +1056,7 @@ public class BtHelper { } private void checkScoAudioState() { try { if (mBluetoothHeadset != null && mBluetoothHeadsetDevice != null && mScoAudioState == SCO_STATE_INACTIVE Loading @@ -1058,6 +1064,9 @@ public class BtHelper { != BluetoothHeadset.STATE_AUDIO_DISCONNECTED) { mScoAudioState = SCO_STATE_ACTIVE_EXTERNAL; } } catch (Exception e) { Log.e(TAG, "Exception while getting audio state of " + mBluetoothHeadsetDevice, e); } } private boolean getBluetoothHeadset() { Loading