summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorbodamnam <bodamnam@google.com>2022-12-02 06:27:52 +0000
committerBodam Nam <bodamnam@google.com>2022-12-05 07:43:07 +0000
commit7b7cd4d7f107e9472ff27c009229198ace2c5a25 (patch)
tree592615729da04675e051fd5c85ed7d2ec7168860 /tests
parent5c5cfb549b45118dc20f7e0975c7410e3716c657 (diff)
downloadImsMedia-7b7cd4d7f107e9472ff27c009229198ace2c5a25.tar.gz
Update audiosession setMediaQualityThreshold in live
The current code did not update the threshold when the modifySession and add/confirmConfig is not called to the live stream. I modify the code to update during the stream is running when the setMediaQualityThreshold is called without modifySession and add/confirmConfig. Bug: 248377731 Test: 1 to 1 Voice Call test with device, atest ImsMediaNativeTests Change-Id: I15c4ffb75339d532440ad4d0df57c18335cde0ef
Diffstat (limited to 'tests')
-rw-r--r--tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioStreamGraphRtcpTest.cpp13
-rw-r--r--tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioStreamGraphRtpRxTest.cpp13
2 files changed, 26 insertions, 0 deletions
diff --git a/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioStreamGraphRtcpTest.cpp b/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioStreamGraphRtcpTest.cpp
index 0e6021e1..21ff4699 100644
--- a/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioStreamGraphRtcpTest.cpp
+++ b/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioStreamGraphRtcpTest.cpp
@@ -143,6 +143,19 @@ TEST_F(AudioStreamGraphRtcpTest, TestGraphSetMediaThresholdFail)
EXPECT_EQ(graph->setMediaQualityThreshold(&threshold), false);
}
+TEST_F(AudioStreamGraphRtcpTest, TestGraphSetMediaThresholdSuccess)
+{
+ EXPECT_EQ(graph->create(&config), RESULT_SUCCESS);
+ EXPECT_EQ(graph->setMediaQualityThreshold(&threshold), true);
+ EXPECT_EQ(graph->start(), RESULT_SUCCESS);
+ EXPECT_EQ(graph->getState(), kStreamStateRunning);
+
+ // live update
+ EXPECT_EQ(graph->setMediaQualityThreshold(&threshold), true);
+ EXPECT_EQ(graph->stop(), RESULT_SUCCESS);
+ EXPECT_EQ(graph->getState(), kStreamStateCreated);
+}
+
TEST_F(AudioStreamGraphRtcpTest, TestRtcpStreamAndUpdate)
{
EXPECT_EQ(graph->create(&config), RESULT_SUCCESS);
diff --git a/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioStreamGraphRtpRxTest.cpp b/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioStreamGraphRtpRxTest.cpp
index d20c32f2..871292ff 100644
--- a/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioStreamGraphRtpRxTest.cpp
+++ b/tests/native/service/src/com/android/telephony/imsmedia/lib/libimsmedia/core/audio/AudioStreamGraphRtpRxTest.cpp
@@ -143,6 +143,19 @@ TEST_F(AudioStreamGraphRtpRxTest, TestGraphSetMediaThresholdFail)
EXPECT_EQ(graph->setMediaQualityThreshold(&threshold), false);
}
+TEST_F(AudioStreamGraphRtpRxTest, TestGraphSetMediaThresholdSuccess)
+{
+ EXPECT_EQ(graph->create(&config), RESULT_SUCCESS);
+ EXPECT_EQ(graph->setMediaQualityThreshold(&threshold), true);
+ EXPECT_EQ(graph->start(), RESULT_SUCCESS);
+ EXPECT_EQ(graph->getState(), kStreamStateRunning);
+
+ // live update
+ EXPECT_EQ(graph->setMediaQualityThreshold(&threshold), true);
+ EXPECT_EQ(graph->stop(), RESULT_SUCCESS);
+ EXPECT_EQ(graph->getState(), kStreamStateCreated);
+}
+
TEST_F(AudioStreamGraphRtpRxTest, TestRtpRxStreamDirectionUpdate)
{
EXPECT_EQ(graph->create(&config), RESULT_SUCCESS);