From 3f76554417d125f31a5196e4743602417d57cb75 Mon Sep 17 00:00:00 2001 From: Jack Nudelman Date: Wed, 18 Nov 2020 16:21:06 -0800 Subject: [PATCH] Change setDataThrottling window parameter to a long millisecond. As requested by Android Council review of API. Test: vts Change-Id: I1f633856c31623ef95f459b2195743f53b5d85fc Merged-In: I1f633856c31623ef95f459b2195743f53b5d85fc --- radio/1.6/IRadio.hal | 6 +++--- radio/1.6/vts/functional/radio_hidl_hal_api.cpp | 9 +++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/radio/1.6/IRadio.hal b/radio/1.6/IRadio.hal index 85e8cad4c9..de5468dc36 100644 --- a/radio/1.6/IRadio.hal +++ b/radio/1.6/IRadio.hal @@ -347,15 +347,15 @@ interface IRadio extends @1.5::IRadio { * * @param serial Serial number of request. * @param dataThrottlingAction DataThrottlingAction as defined in types.hal - * @param completionWindowSecs window, in seconds, in which the requested - * throttling action has to be achieved. This must be 0 when + * @param completionDurationMillis window, in milliseconds, in which the + * requested throttling action has to be achieved. This must be 0 when * dataThrottlingAction is DataThrottlingAction:HOLD. * * Response function is IRadioResponse.setDataThrottlingResponse() */ oneway setDataThrottling(int32_t serial, DataThrottlingAction dataThrottlingAction, - int32_t completionWindowSecs); + int64_t completionDurationMillis); /** * Get which bands the modem's background scan is acting on. diff --git a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp index ba825b83a0..75772cdb2a 100644 --- a/radio/1.6/vts/functional/radio_hidl_hal_api.cpp +++ b/radio/1.6/vts/functional/radio_hidl_hal_api.cpp @@ -303,7 +303,7 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) { serial = GetRandomSerialNumber(); Return res = radio_v1_6->setDataThrottling( - serial, DataThrottlingAction::THROTTLE_SECONDARY_CARRIER, 60); + serial, DataThrottlingAction::THROTTLE_SECONDARY_CARRIER, 60000); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); @@ -318,7 +318,8 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) { serial = GetRandomSerialNumber(); - res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::THROTTLE_ANCHOR_CARRIER, 60); + res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::THROTTLE_ANCHOR_CARRIER, + 60000); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type); @@ -332,7 +333,7 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) { serial = GetRandomSerialNumber(); - res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::HOLD, 60); + res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::HOLD, 60000); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); @@ -347,7 +348,7 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) { serial = GetRandomSerialNumber(); - res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::NO_DATA_THROTTLING, 60); + res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::NO_DATA_THROTTLING, 60000); ASSERT_OK(res); EXPECT_EQ(std::cv_status::no_timeout, wait()); EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);