Loading android/app/src/com/android/bluetooth/hfp/HeadsetService.java +6 −11 Original line number Original line Diff line number Diff line Loading @@ -2216,17 +2216,10 @@ public class HeadsetService extends ProfileService { /** Called from {@link HeadsetClientStateMachine} to update inband ringing status. */ /** Called from {@link HeadsetClientStateMachine} to update inband ringing status. */ public void updateInbandRinging(BluetoothDevice device, boolean connected) { public void updateInbandRinging(BluetoothDevice device, boolean connected) { synchronized (mStateMachines) { synchronized (mStateMachines) { List<BluetoothDevice> audioConnectableDevices = getConnectedDevices(); final int enabled; final boolean inbandRingingRuntimeDisable = mInbandRingingRuntimeDisable; final boolean inbandRingingRuntimeDisable = mInbandRingingRuntimeDisable; if (audioConnectableDevices.size() > 1 || isHeadsetClientConnected()) { mInbandRingingRuntimeDisable = mInbandRingingRuntimeDisable = true; getConnectedDevices().size() > 1 || isHeadsetClientConnected(); enabled = 0; } else { mInbandRingingRuntimeDisable = false; enabled = 1; } final boolean updateAll = inbandRingingRuntimeDisable != mInbandRingingRuntimeDisable; final boolean updateAll = inbandRingingRuntimeDisable != mInbandRingingRuntimeDisable; Loading @@ -2236,7 +2229,7 @@ public class HeadsetService extends ProfileService { + " Device=" + " Device=" + device + device + " enabled=" + " enabled=" + enabled + !mInbandRingingRuntimeDisable + " connected=" + " connected=" + connected + connected + " Update all=" + " Update all=" Loading @@ -2244,7 +2237,9 @@ public class HeadsetService extends ProfileService { StateMachineTask sendBsirTask = StateMachineTask sendBsirTask = stateMachine -> stateMachine -> stateMachine.sendMessage(HeadsetStateMachine.SEND_BSIR, enabled); stateMachine.sendMessage( HeadsetStateMachine.SEND_BSIR, mInbandRingingRuntimeDisable ? 0 : 1); if (updateAll) { if (updateAll) { doForEachConnectedStateMachine(sendBsirTask); doForEachConnectedStateMachine(sendBsirTask); Loading Loading
android/app/src/com/android/bluetooth/hfp/HeadsetService.java +6 −11 Original line number Original line Diff line number Diff line Loading @@ -2216,17 +2216,10 @@ public class HeadsetService extends ProfileService { /** Called from {@link HeadsetClientStateMachine} to update inband ringing status. */ /** Called from {@link HeadsetClientStateMachine} to update inband ringing status. */ public void updateInbandRinging(BluetoothDevice device, boolean connected) { public void updateInbandRinging(BluetoothDevice device, boolean connected) { synchronized (mStateMachines) { synchronized (mStateMachines) { List<BluetoothDevice> audioConnectableDevices = getConnectedDevices(); final int enabled; final boolean inbandRingingRuntimeDisable = mInbandRingingRuntimeDisable; final boolean inbandRingingRuntimeDisable = mInbandRingingRuntimeDisable; if (audioConnectableDevices.size() > 1 || isHeadsetClientConnected()) { mInbandRingingRuntimeDisable = mInbandRingingRuntimeDisable = true; getConnectedDevices().size() > 1 || isHeadsetClientConnected(); enabled = 0; } else { mInbandRingingRuntimeDisable = false; enabled = 1; } final boolean updateAll = inbandRingingRuntimeDisable != mInbandRingingRuntimeDisable; final boolean updateAll = inbandRingingRuntimeDisable != mInbandRingingRuntimeDisable; Loading @@ -2236,7 +2229,7 @@ public class HeadsetService extends ProfileService { + " Device=" + " Device=" + device + device + " enabled=" + " enabled=" + enabled + !mInbandRingingRuntimeDisable + " connected=" + " connected=" + connected + connected + " Update all=" + " Update all=" Loading @@ -2244,7 +2237,9 @@ public class HeadsetService extends ProfileService { StateMachineTask sendBsirTask = StateMachineTask sendBsirTask = stateMachine -> stateMachine -> stateMachine.sendMessage(HeadsetStateMachine.SEND_BSIR, enabled); stateMachine.sendMessage( HeadsetStateMachine.SEND_BSIR, mInbandRingingRuntimeDisable ? 0 : 1); if (updateAll) { if (updateAll) { doForEachConnectedStateMachine(sendBsirTask); doForEachConnectedStateMachine(sendBsirTask); Loading