remove test for verifing video state requests are gated Telecom is not longer requiring clients to add the CallAttributes#SUPPORTS_VIDEO_CALLING in order to change the video state. This is due to issues in the Core-Telecom jetpack layer. Flag: com.android.server.telecom.flags.transactional_video_state Fixes: 335887238 (remap CallAttributes CallType in addCall) Fixes: 325320195 (do not gate setVideoState with capability) Test: 4 new unit tests, removed 1 CTS test Change-Id: Ic06ea9e1c106fbd8c6ebea2bc12b2f21b4af7a36
diff --git a/tests/tests/telecom/src/android/telecom/cts/TelecomCtsVoipCall.java b/tests/tests/telecom/src/android/telecom/cts/TelecomCtsVoipCall.java index 582b318..51ceabc 100644 --- a/tests/tests/telecom/src/android/telecom/cts/TelecomCtsVoipCall.java +++ b/tests/tests/telecom/src/android/telecom/cts/TelecomCtsVoipCall.java
@@ -127,6 +127,8 @@ @Override public void onVideoStateChanged(int videoState) { + Log.i(TAG, String.format("onVideoStateChanged: callId=[%s], videoState=[%d]", mCallId, + mVideoState)); mVideoState = videoState; mWasVideoStateChangedCalled = true; }
diff --git a/tests/tests/telecom/src/android/telecom/cts/TransactionalApisTest.java b/tests/tests/telecom/src/android/telecom/cts/TransactionalApisTest.java index 17a5029..946fbc6 100644 --- a/tests/tests/telecom/src/android/telecom/cts/TransactionalApisTest.java +++ b/tests/tests/telecom/src/android/telecom/cts/TransactionalApisTest.java
@@ -531,7 +531,7 @@ try { startCallWithAttributesAndVerify(new CallAttributes.Builder(DEFAULT_T_HANDLE, DIRECTION_OUTGOING, TEST_NAME_1, TEST_URI_1) - .setCallType(CallAttributes.AUDIO_CALL) + .setCallType(AUDIO_CALL) .setCallCapabilities(CallAttributes.SUPPORTS_VIDEO_CALLING) .build(), mCall1); // set the call active @@ -552,47 +552,6 @@ } /** - * Common fail case: Test the scenario where an outgoing call that does not set the - * {@link CallAttributes.CallCapability#SUPPORTS_VIDEO_CALLING} - */ - public void testTransactionalVideoStateChanges_withoutVideoCapabilitiesForCall() { - if (!mShouldTestTelecom || !Flags.transactionalVideoState()) { - return; - } - try { - startCallWithAttributesAndVerify( - new CallAttributes.Builder(DEFAULT_T_HANDLE, DIRECTION_OUTGOING, - TEST_NAME_1, TEST_URI_1) - .setCallType(CallAttributes.AUDIO_CALL) - .setCallCapabilities(0 /* purposely do not add VIDEO capabilities */) - .build(), mCall1); - // set the call active - callControlAction(SET_ACTIVE, mCall1); - waitUntilVideoStateIs(AUDIO_CALL, mCall1); - final CountDownLatch latch = new CountDownLatch(1); - // request the video state change - mCall1.mCallControl.requestVideoState(CallAttributes.VIDEO_CALL, Runnable::run, - new OutcomeReceiver<Void, CallException>() { - @Override - public void onResult(Void result) { - } - - @Override - public void onError(CallException exception) { - latch.countDown(); - } - }); - // wait for the latch to count down signaling the onError was called - assertOnErrorWasReceived(latch); - // disconnect - callControlAction(DISCONNECT, mCall1); - assertNumCalls(getInCallService(), 0); - } finally { - cleanup(); - } - } - - /** * Common fail case: Test the scenario where an application failed to register a PhoneAccount * with {@link PhoneAccount#CAPABILITY_SUPPORTS_VIDEO_CALLING} and requests video state changes * via {@link android.telecom.CallControl#requestVideoState(int, Executor, OutcomeReceiver)}