Loading src/com/android/server/telecom/BluetoothPhoneServiceImpl.java +6 −0 Original line number Diff line number Diff line Loading @@ -615,6 +615,12 @@ public class BluetoothPhoneServiceImpl { } } } if (conferenceCall.getState() == CallState.ON_HOLD && conferenceCall.can(Connection.CAPABILITY_MANAGE_CONFERENCE)) { // If the parent IMS CEP conference call is on hold, we should mark this call as // being on hold regardless of what the other children are doing. state = CALL_STATE_HELD; } } else if (isConferenceWithNoChildren) { // Handle the special case of an IMS conference call without conference event package // support. The call will be marked as a conference, but the conference will not have Loading tests/src/com/android/server/telecom/tests/BluetoothPhoneServiceTest.java +30 −0 Original line number Diff line number Diff line Loading @@ -540,6 +540,36 @@ public class BluetoothPhoneServiceTest extends TelecomTestCase { verify(mMockBluetoothHeadset).clccResponse(0, 0, 0, 0, false, null, 0); } @MediumTest public void testListCurrentCallsHeldImsCepConference() throws Exception { ArrayList<Call> calls = new ArrayList<>(); Call parentCall = createHeldCall(); Call childCall1 = createActiveCall(); Call childCall2 = createActiveCall(); calls.add(parentCall); calls.add(childCall1); calls.add(childCall2); addCallCapability(parentCall, Connection.CAPABILITY_MANAGE_CONFERENCE); when(childCall1.getParentCall()).thenReturn(parentCall); when(childCall2.getParentCall()).thenReturn(parentCall); when(parentCall.isConference()).thenReturn(true); when(parentCall.getState()).thenReturn(CallState.ON_HOLD); when(childCall1.getState()).thenReturn(CallState.ACTIVE); when(childCall2.getState()).thenReturn(CallState.ACTIVE); when(parentCall.isIncoming()).thenReturn(true); when(mMockCallsManager.getCalls()).thenReturn(calls); mBluetoothPhoneService.mBinder.listCurrentCalls(); verify(mMockBluetoothHeadset).clccResponse(eq(1), eq(0), eq(CALL_STATE_HELD), eq(0), eq(true), (String) isNull(), eq(-1)); verify(mMockBluetoothHeadset).clccResponse(eq(2), eq(0), eq(CALL_STATE_HELD), eq(0), eq(true), (String) isNull(), eq(-1)); verify(mMockBluetoothHeadset).clccResponse(0, 0, 0, 0, false, null, 0); } @MediumTest public void testQueryPhoneState() throws Exception { Call ringingCall = createRingingCall(); Loading Loading
src/com/android/server/telecom/BluetoothPhoneServiceImpl.java +6 −0 Original line number Diff line number Diff line Loading @@ -615,6 +615,12 @@ public class BluetoothPhoneServiceImpl { } } } if (conferenceCall.getState() == CallState.ON_HOLD && conferenceCall.can(Connection.CAPABILITY_MANAGE_CONFERENCE)) { // If the parent IMS CEP conference call is on hold, we should mark this call as // being on hold regardless of what the other children are doing. state = CALL_STATE_HELD; } } else if (isConferenceWithNoChildren) { // Handle the special case of an IMS conference call without conference event package // support. The call will be marked as a conference, but the conference will not have Loading
tests/src/com/android/server/telecom/tests/BluetoothPhoneServiceTest.java +30 −0 Original line number Diff line number Diff line Loading @@ -540,6 +540,36 @@ public class BluetoothPhoneServiceTest extends TelecomTestCase { verify(mMockBluetoothHeadset).clccResponse(0, 0, 0, 0, false, null, 0); } @MediumTest public void testListCurrentCallsHeldImsCepConference() throws Exception { ArrayList<Call> calls = new ArrayList<>(); Call parentCall = createHeldCall(); Call childCall1 = createActiveCall(); Call childCall2 = createActiveCall(); calls.add(parentCall); calls.add(childCall1); calls.add(childCall2); addCallCapability(parentCall, Connection.CAPABILITY_MANAGE_CONFERENCE); when(childCall1.getParentCall()).thenReturn(parentCall); when(childCall2.getParentCall()).thenReturn(parentCall); when(parentCall.isConference()).thenReturn(true); when(parentCall.getState()).thenReturn(CallState.ON_HOLD); when(childCall1.getState()).thenReturn(CallState.ACTIVE); when(childCall2.getState()).thenReturn(CallState.ACTIVE); when(parentCall.isIncoming()).thenReturn(true); when(mMockCallsManager.getCalls()).thenReturn(calls); mBluetoothPhoneService.mBinder.listCurrentCalls(); verify(mMockBluetoothHeadset).clccResponse(eq(1), eq(0), eq(CALL_STATE_HELD), eq(0), eq(true), (String) isNull(), eq(-1)); verify(mMockBluetoothHeadset).clccResponse(eq(2), eq(0), eq(CALL_STATE_HELD), eq(0), eq(true), (String) isNull(), eq(-1)); verify(mMockBluetoothHeadset).clccResponse(0, 0, 0, 0, false, null, 0); } @MediumTest public void testQueryPhoneState() throws Exception { Call ringingCall = createRingingCall(); Loading