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

Commit b797db49 authored by Chen Chen's avatar Chen Chen
Browse files

BluetoothInCallService: check PROPERTY_GENERIC_CONFERENCE before PROPERTY_GENERIC_CONFERENCE

Bug: 187386219
Test: atest BluetoothInstrumentationTests
Phone call experience maually tested by testers
Change-Id: If50f874076df9da9c7ca1cb3e58ccc1a54097b58
Merged-In: If50f874076df9da9c7ca1cb3e58ccc1a54097b58
(cherry picked from commit 31b8772ae9920b63b856296fff81da5d87e9f862)
parent 9eb7a1f1
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -315,4 +315,8 @@ public class BluetoothCall {
        }
        return result;
    }

    public boolean hasProperty(int property) {
        return getDetails().hasProperty(property);
    }
}
+2 −1
Original line number Diff line number Diff line
@@ -603,7 +603,8 @@ public class BluetoothInCallService extends InCallService {
        }

        BluetoothCall conferenceCall = getBluetoothCallById(call.getParentId());
        if (!mCallInfo.isNullCall(conferenceCall)) {
        if (!mCallInfo.isNullCall(conferenceCall)
                && conferenceCall.hasProperty(Call.Details.PROPERTY_GENERIC_CONFERENCE)) {
            isPartOfConference = true;

            // Run some alternative states for Conference-level merge/swap support.
+3 −0
Original line number Diff line number Diff line
@@ -380,6 +380,7 @@ public class BluetoothInCallServiceTest {
        String parentId = parentCall.getTelecomCallId();
        when(foregroundCall.getParentId()).thenReturn(parentId);
        when(heldCall.getParentId()).thenReturn(parentId);
        when(parentCall.hasProperty(Call.Details.PROPERTY_GENERIC_CONFERENCE)).thenReturn(true);

        clearInvocations(mMockBluetoothHeadset);
        mBluetoothInCallService.listCurrentCalls();
@@ -426,6 +427,7 @@ public class BluetoothInCallServiceTest {
        String parentId = parentCall.getTelecomCallId();
        when(confCall1.getParentId()).thenReturn(parentId);
        when(confCall2.getParentId()).thenReturn(parentId);
        when(parentCall.hasProperty(Call.Details.PROPERTY_GENERIC_CONFERENCE)).thenReturn(true);

        clearInvocations(mMockBluetoothHeadset);
        mBluetoothInCallService.listCurrentCalls();
@@ -643,6 +645,7 @@ public class BluetoothInCallServiceTest {
        when(parentCall.getState()).thenReturn(Call.STATE_HOLDING);
        when(childCall1.getState()).thenReturn(Call.STATE_ACTIVE);
        when(childCall2.getState()).thenReturn(Call.STATE_ACTIVE);
        when(parentCall.hasProperty(Call.Details.PROPERTY_GENERIC_CONFERENCE)).thenReturn(true);

        when(parentCall.isIncoming()).thenReturn(true);
        when(mMockCallInfo.getBluetoothCalls()).thenReturn(calls);