diff options
author | Sewook Seo <sewookseo@google.com> | 2023-05-04 01:22:28 +0000 |
---|---|---|
committer | Sewook Seo <sewookseo@google.com> | 2023-05-04 06:55:06 +0000 |
commit | b458489e24889d96638c4b29e2e887e38d6097bf (patch) | |
tree | fd88fec5eb8ea58162eeed88e27e79a015d7f9a2 /services/QualifiedNetworksService | |
parent | 322663eba2be892b2c7cbbb3669d348cf6fb1744 (diff) | |
download | Telephony-b458489e24889d96638c4b29e2e887e38d6097bf.tar.gz |
[QNS] bug fix for handling video call type changed
QNS recognizes video call when it enters in waiting state.
Will update video call HO policy for the ACTIVE, HOLD and DISCONNECTING
states.
Bug: 280561889
Test: QualifiedNetworksServiceTests, Device test with Carrier TCs.
Change-Id: Ia2d4ec866bcc64948256fdd34e570020f1030031
Diffstat (limited to 'services/QualifiedNetworksService')
2 files changed, 18 insertions, 3 deletions
diff --git a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCallStatusTracker.java b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCallStatusTracker.java index b45ba78..eb2f231 100644 --- a/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCallStatusTracker.java +++ b/services/QualifiedNetworksService/src/com/android/telephony/qns/QnsCallStatusTracker.java @@ -907,9 +907,9 @@ public class QnsCallStatusTracker { for (CallState cs : mCallStates) { if (cs.getImsCallServiceType() == ImsCallProfile.SERVICE_TYPE_NORMAL && cs.getImsCallType() == ImsCallProfile.CALL_TYPE_VT - && (cs.getCallState() != PreciseCallState.PRECISE_CALL_STATE_ALERTING - && cs.getCallState() != PreciseCallState.PRECISE_CALL_STATE_DIALING - && cs.getCallState() != PreciseCallState.PRECISE_CALL_STATE_INCOMING)) { + && (cs.getCallState() == PreciseCallState.PRECISE_CALL_STATE_DISCONNECTING + || cs.getCallState() == PreciseCallState.PRECISE_CALL_STATE_HOLDING + || cs.getCallState() == PreciseCallState.PRECISE_CALL_STATE_ACTIVE)) { return true; } } diff --git a/services/QualifiedNetworksService/tests/src/com/android/telephony/qns/QnsCallStatusTrackerTest.java b/services/QualifiedNetworksService/tests/src/com/android/telephony/qns/QnsCallStatusTrackerTest.java index a9247f0..eed22f4 100644 --- a/services/QualifiedNetworksService/tests/src/com/android/telephony/qns/QnsCallStatusTrackerTest.java +++ b/services/QualifiedNetworksService/tests/src/com/android/telephony/qns/QnsCallStatusTrackerTest.java @@ -289,6 +289,21 @@ public class QnsCallStatusTrackerTest extends QnsTest { mTestCallStateList.add(new CallState.Builder(PreciseCallState.PRECISE_CALL_STATE_ACTIVE) .setImsCallType(ImsCallProfile.CALL_TYPE_VOICE) .setImsCallServiceType(ImsCallProfile.SERVICE_TYPE_NORMAL).build()); + mTestCallStateList.add(new CallState.Builder(PreciseCallState.PRECISE_CALL_STATE_WAITING) + .setImsCallType(ImsCallProfile.CALL_TYPE_VT) + .setImsCallServiceType(ImsCallProfile.SERVICE_TYPE_NORMAL).build()); + mCallTracker.updateCallState(mTestCallStateList); + msg = mTestLooperListener.nextMessage(); + // Video call is still in waiting state, QNS call type changed event should not be happened. + assertNull(msg); + assertFalse(mCallTracker.isCallIdle()); // for IMS calls only + assertTrue(mCallTracker.isCallIdle(NetworkCapabilities.NET_CAPABILITY_EIMS)); + assertFalse(mCallTracker.isCallIdle(NetworkCapabilities.NET_CAPABILITY_IMS)); + + mTestCallStateList.clear(); + mTestCallStateList.add(new CallState.Builder(PreciseCallState.PRECISE_CALL_STATE_ACTIVE) + .setImsCallType(ImsCallProfile.CALL_TYPE_VOICE) + .setImsCallServiceType(ImsCallProfile.SERVICE_TYPE_NORMAL).build()); mTestCallStateList.add(new CallState.Builder(PreciseCallState.PRECISE_CALL_STATE_HOLDING) .setImsCallType(ImsCallProfile.CALL_TYPE_VT) .setImsCallServiceType(ImsCallProfile.SERVICE_TYPE_NORMAL).build()); |