Loading android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java +20 −20 Original line number Diff line number Diff line Loading @@ -2129,8 +2129,8 @@ class HeadsetStateMachine extends StateMachine { callSetup = phoneState.getNumHeldCall(); } if (Flags.pretendNetworkService()) { logd("processAtCind: pretendNetworkService enabled"); // During wifi call, a regular call in progress while no network service, // pretend service availability and signal strength. boolean isCallOngoing = (phoneState.getNumActiveCall() > 0) || (phoneState.getNumHeldCall() > 0) Loading @@ -2145,12 +2145,12 @@ class HeadsetStateMachine extends StateMachine { "processAtCind: If regular call is in progress/active/held while no network" + " during BT-ON, pretend service availability and signal strength"); service = HeadsetHalConstants.NETWORK_STATE_AVAILABLE; signal = 3; signal = 3; // use a non-zero signal strength } else { service = phoneState.getCindService(); signal = phoneState.getCindSignal(); } } mNativeInterface.cindResponse( device, service, Loading android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetStateMachineTest.java +10 −24 Original line number Diff line number Diff line Loading @@ -1288,7 +1288,6 @@ public class HeadsetStateMachineTest { /** A test to verify that we correctly send CIND response when a call is in progress */ @Test public void testCindEventWhenCallIsInProgress() { mSetFlagsRule.enableFlags(Flags.FLAG_PRETEND_NETWORK_SERVICE); when(mPhoneState.getCindService()) .thenReturn(HeadsetHalConstants.NETWORK_STATE_NOT_AVAILABLE); when(mHeadsetService.isVirtualCallStarted()).thenReturn(false); Loading @@ -1300,7 +1299,6 @@ public class HeadsetStateMachineTest { HeadsetStateMachine.STACK_EVENT, new HeadsetStackEvent(HeadsetStackEvent.EVENT_TYPE_AT_CIND, mTestDevice)); // wait state machine to process the message if (Flags.pretendNetworkService()) { verify(mNativeInterface, timeout(ASYNC_CALL_TIMEOUT_MILLIS)) .cindResponse( eq(mTestDevice), Loading @@ -1311,18 +1309,6 @@ public class HeadsetStateMachineTest { anyInt(), anyInt(), anyInt()); } else { verify(mNativeInterface, timeout(ASYNC_CALL_TIMEOUT_MILLIS)) .cindResponse( eq(mTestDevice), eq(HeadsetHalConstants.NETWORK_STATE_NOT_AVAILABLE), anyInt(), anyInt(), anyInt(), anyInt(), anyInt(), anyInt()); } } /** A test to verify that we correctly handles key pressed event from a HSP headset */ Loading flags/hfp.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -22,13 +22,6 @@ flag { bug: "316498257" } flag { name: "pretend_network_service" namespace: "bluetooth" description: "during ongoing call, pretend network service in +CIND when network is unavailable" bug: "317307596" } flag { name: "hfp_software_datapath" namespace: "bluetooth" Loading Loading
android/app/src/com/android/bluetooth/hfp/HeadsetStateMachine.java +20 −20 Original line number Diff line number Diff line Loading @@ -2129,8 +2129,8 @@ class HeadsetStateMachine extends StateMachine { callSetup = phoneState.getNumHeldCall(); } if (Flags.pretendNetworkService()) { logd("processAtCind: pretendNetworkService enabled"); // During wifi call, a regular call in progress while no network service, // pretend service availability and signal strength. boolean isCallOngoing = (phoneState.getNumActiveCall() > 0) || (phoneState.getNumHeldCall() > 0) Loading @@ -2145,12 +2145,12 @@ class HeadsetStateMachine extends StateMachine { "processAtCind: If regular call is in progress/active/held while no network" + " during BT-ON, pretend service availability and signal strength"); service = HeadsetHalConstants.NETWORK_STATE_AVAILABLE; signal = 3; signal = 3; // use a non-zero signal strength } else { service = phoneState.getCindService(); signal = phoneState.getCindSignal(); } } mNativeInterface.cindResponse( device, service, Loading
android/app/tests/unit/src/com/android/bluetooth/hfp/HeadsetStateMachineTest.java +10 −24 Original line number Diff line number Diff line Loading @@ -1288,7 +1288,6 @@ public class HeadsetStateMachineTest { /** A test to verify that we correctly send CIND response when a call is in progress */ @Test public void testCindEventWhenCallIsInProgress() { mSetFlagsRule.enableFlags(Flags.FLAG_PRETEND_NETWORK_SERVICE); when(mPhoneState.getCindService()) .thenReturn(HeadsetHalConstants.NETWORK_STATE_NOT_AVAILABLE); when(mHeadsetService.isVirtualCallStarted()).thenReturn(false); Loading @@ -1300,7 +1299,6 @@ public class HeadsetStateMachineTest { HeadsetStateMachine.STACK_EVENT, new HeadsetStackEvent(HeadsetStackEvent.EVENT_TYPE_AT_CIND, mTestDevice)); // wait state machine to process the message if (Flags.pretendNetworkService()) { verify(mNativeInterface, timeout(ASYNC_CALL_TIMEOUT_MILLIS)) .cindResponse( eq(mTestDevice), Loading @@ -1311,18 +1309,6 @@ public class HeadsetStateMachineTest { anyInt(), anyInt(), anyInt()); } else { verify(mNativeInterface, timeout(ASYNC_CALL_TIMEOUT_MILLIS)) .cindResponse( eq(mTestDevice), eq(HeadsetHalConstants.NETWORK_STATE_NOT_AVAILABLE), anyInt(), anyInt(), anyInt(), anyInt(), anyInt(), anyInt()); } } /** A test to verify that we correctly handles key pressed event from a HSP headset */ Loading
flags/hfp.aconfig +0 −7 Original line number Diff line number Diff line Loading @@ -22,13 +22,6 @@ flag { bug: "316498257" } flag { name: "pretend_network_service" namespace: "bluetooth" description: "during ongoing call, pretend network service in +CIND when network is unavailable" bug: "317307596" } flag { name: "hfp_software_datapath" namespace: "bluetooth" Loading