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

Commit 4edbb598 authored by Chen Chen's avatar Chen Chen Committed by Automerger Merge Worker
Browse files

Merge "BluetoothInCallService: check PROPERTY_GENERIC_CONFERENCE before...

Merge "BluetoothInCallService: check PROPERTY_GENERIC_CONFERENCE before PROPERTY_GENERIC_CONFERENCE" am: 96cc1445

Original change: https://android-review.googlesource.com/c/platform/packages/apps/Bluetooth/+/1788667

Change-Id: Iafea3671e7d171457934f8cc762e6bb33d61342c
parents 90992009 96cc1445
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -305,4 +305,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
@@ -606,7 +606,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
@@ -379,6 +379,7 @@ public class BluetoothInCallServiceTest {
        Integer parentId = parentCall.getId();
        when(foregroundCall.getParentId()).thenReturn(parentId);
        when(heldCall.getParentId()).thenReturn(parentId);
        when(parentCall.hasProperty(Call.Details.PROPERTY_GENERIC_CONFERENCE)).thenReturn(true);

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

        clearInvocations(mMockBluetoothHeadset);
        mBluetoothInCallService.listCurrentCalls();
@@ -642,6 +644,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);