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

Commit 469225a0 authored by Yuyang Huang's avatar Yuyang Huang
Browse files

remove the ConferenceCallInference flag and turn on inference by default

Bug: 246909387
Test: atest BluetoothInCallServiceTest
Change-Id: I5bd821ddc87a1b9db64cb139f837fdffef487c85
parent 0a2fb4b0
Loading
Loading
Loading
Loading
+2 −8
Original line number Original line Diff line number Diff line
@@ -78,8 +78,6 @@ import java.util.concurrent.Executors;
public class BluetoothInCallService extends InCallService {
public class BluetoothInCallService extends InCallService {


    private static final String TAG = "BluetoothInCallService";
    private static final String TAG = "BluetoothInCallService";
    @VisibleForTesting static final String CLCC_INFERENCE = "ConferenceCallInference";

    // match up with bthf_call_state_t of bt_hf.h
    // match up with bthf_call_state_t of bt_hf.h
    private static final int CALL_STATE_ACTIVE = 0;
    private static final int CALL_STATE_ACTIVE = 0;
    private static final int CALL_STATE_HELD = 1;
    private static final int CALL_STATE_HELD = 1;
@@ -750,16 +748,12 @@ public class BluetoothInCallService extends InCallService {


    private void sendListOfCalls(boolean shouldLog) {
    private void sendListOfCalls(boolean shouldLog) {
        Collection<BluetoothCall> calls = mCallInfo.getBluetoothCalls();
        Collection<BluetoothCall> calls = mCallInfo.getBluetoothCalls();
        boolean isInferenceEnabled =

                DeviceConfig.getBoolean(DeviceConfig.NAMESPACE_BLUETOOTH, CLCC_INFERENCE, false);
        Log.d(TAG, "is conference call inference enabled: " + isInferenceEnabled);
        // either do conference call CLCC index inference or normal conference call
        // either do conference call CLCC index inference or normal conference call
        BluetoothCall conferenceCallChildrenNotReady = null;
        BluetoothCall conferenceCallChildrenNotReady = null;
        for (BluetoothCall call : calls) {
        for (BluetoothCall call : calls) {
            // find the conference call parent among calls
            // find the conference call parent among calls
            if (isInferenceEnabled
            if (call.isConference() && !mBluetoothConferenceCallInference.isEmpty()) {
                    && call.isConference()
                    && !mBluetoothConferenceCallInference.isEmpty()) {
                Log.d(
                Log.d(
                        TAG,
                        TAG,
                        "conference call inferred size: "
                        "conference call inferred size: "
+0 −4
Original line number Original line Diff line number Diff line
@@ -16,7 +16,6 @@


package com.android.bluetooth.telephony;
package com.android.bluetooth.telephony;


import static com.android.bluetooth.telephony.BluetoothInCallService.CLCC_INFERENCE;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.*;
import static org.mockito.Mockito.*;


@@ -818,7 +817,6 @@ public class BluetoothInCallServiceTest {


    @Test
    @Test
    public void testListCurrentCallsConferenceEmptyChildrenInference() throws Exception {
    public void testListCurrentCallsConferenceEmptyChildrenInference() throws Exception {
        DeviceConfig.setProperty(DeviceConfig.NAMESPACE_BLUETOOTH, CLCC_INFERENCE, "true", false);
        mBluetoothInCallService.mTelephonyManager = mMockTelephonyManager;
        mBluetoothInCallService.mTelephonyManager = mMockTelephonyManager;
        when(mMockTelephonyManager.getNetworkCountryIso()).thenReturn("");
        when(mMockTelephonyManager.getNetworkCountryIso()).thenReturn("");


@@ -952,8 +950,6 @@ public class BluetoothInCallServiceTest {
                        anyBoolean(),
                        anyBoolean(),
                        nullable(String.class),
                        nullable(String.class),
                        anyInt());
                        anyInt());

        DeviceConfig.setProperty(DeviceConfig.NAMESPACE_BLUETOOTH, CLCC_INFERENCE, "false", false);
    }
    }


    @Test
    @Test