Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5a1e08bb authored by Yuyang Huang's avatar Yuyang Huang Committed by Gerrit Code Review
Browse files

Merge "Remove flag pretend_network_service" into main

parents 02c402cd 9c3e689b
Loading
Loading
Loading
Loading
+20 −20
Original line number Diff line number Diff line
@@ -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)
@@ -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,
+10 −24
Original line number Diff line number Diff line
@@ -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);
@@ -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),
@@ -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 */
+0 −7
Original line number Diff line number Diff line
@@ -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"