Loading src/com/android/server/telecom/Call.java +2 −1 Original line number Diff line number Diff line Loading @@ -807,7 +807,8 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable { fixParentAfterDisconnect(); } if (mState == CallState.DISCONNECTED && mDisconnectCause.getCode() == DisconnectCause.MISSED) { (mDisconnectCause.getCode() == DisconnectCause.MISSED || mDisconnectCause.getCode() == DisconnectCause.REJECTED)) { // Ensure when an incoming call is missed that the video state history is updated. mVideoStateHistory |= mVideoState; } Loading tests/src/com/android/server/telecom/tests/BasicCallTests.java +32 −0 Original line number Diff line number Diff line Loading @@ -870,6 +870,38 @@ public class BasicCallTests extends TelecomSystemTest { assertEquals(VideoProfile.STATE_BIDIRECTIONAL, call.getVideoState()); } /** * Ensure that when an incoming video call is missed, the video state history still includes * video calling. This is important for the call log. */ @LargeTest public void testIncomingVideoCallMissedCheckVideoHistory() throws Exception { IdPair ids = startIncomingPhoneCall("650-555-1212", mPhoneAccountA0.getAccountHandle(), VideoProfile.STATE_BIDIRECTIONAL, mConnectionServiceFixtureA); com.android.server.telecom.Call call = mTelecomSystem.getCallsManager().getCalls() .iterator().next(); mConnectionServiceFixtureA.sendSetDisconnected(ids.mConnectionId, DisconnectCause.MISSED); assertTrue(VideoProfile.isVideo(call.getVideoStateHistory())); } /** * Ensure that when an incoming video call is rejected, the video state history still includes * video calling. This is important for the call log. */ @LargeTest public void testIncomingVideoCallRejectedCheckVideoHistory() throws Exception { IdPair ids = startIncomingPhoneCall("650-555-1212", mPhoneAccountA0.getAccountHandle(), VideoProfile.STATE_BIDIRECTIONAL, mConnectionServiceFixtureA); com.android.server.telecom.Call call = mTelecomSystem.getCallsManager().getCalls() .iterator().next(); mConnectionServiceFixtureA.sendSetDisconnected(ids.mConnectionId, DisconnectCause.REJECTED); assertTrue(VideoProfile.isVideo(call.getVideoStateHistory())); } /** * Test scenario where the user starts an outgoing video call with no selected PhoneAccount, and * then subsequently selects a PhoneAccount which does not support video calling. Loading Loading
src/com/android/server/telecom/Call.java +2 −1 Original line number Diff line number Diff line Loading @@ -807,7 +807,8 @@ public class Call implements CreateConnectionResponse, EventManager.Loggable { fixParentAfterDisconnect(); } if (mState == CallState.DISCONNECTED && mDisconnectCause.getCode() == DisconnectCause.MISSED) { (mDisconnectCause.getCode() == DisconnectCause.MISSED || mDisconnectCause.getCode() == DisconnectCause.REJECTED)) { // Ensure when an incoming call is missed that the video state history is updated. mVideoStateHistory |= mVideoState; } Loading
tests/src/com/android/server/telecom/tests/BasicCallTests.java +32 −0 Original line number Diff line number Diff line Loading @@ -870,6 +870,38 @@ public class BasicCallTests extends TelecomSystemTest { assertEquals(VideoProfile.STATE_BIDIRECTIONAL, call.getVideoState()); } /** * Ensure that when an incoming video call is missed, the video state history still includes * video calling. This is important for the call log. */ @LargeTest public void testIncomingVideoCallMissedCheckVideoHistory() throws Exception { IdPair ids = startIncomingPhoneCall("650-555-1212", mPhoneAccountA0.getAccountHandle(), VideoProfile.STATE_BIDIRECTIONAL, mConnectionServiceFixtureA); com.android.server.telecom.Call call = mTelecomSystem.getCallsManager().getCalls() .iterator().next(); mConnectionServiceFixtureA.sendSetDisconnected(ids.mConnectionId, DisconnectCause.MISSED); assertTrue(VideoProfile.isVideo(call.getVideoStateHistory())); } /** * Ensure that when an incoming video call is rejected, the video state history still includes * video calling. This is important for the call log. */ @LargeTest public void testIncomingVideoCallRejectedCheckVideoHistory() throws Exception { IdPair ids = startIncomingPhoneCall("650-555-1212", mPhoneAccountA0.getAccountHandle(), VideoProfile.STATE_BIDIRECTIONAL, mConnectionServiceFixtureA); com.android.server.telecom.Call call = mTelecomSystem.getCallsManager().getCalls() .iterator().next(); mConnectionServiceFixtureA.sendSetDisconnected(ids.mConnectionId, DisconnectCause.REJECTED); assertTrue(VideoProfile.isVideo(call.getVideoStateHistory())); } /** * Test scenario where the user starts an outgoing video call with no selected PhoneAccount, and * then subsequently selects a PhoneAccount which does not support video calling. Loading