Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 47e14e56 authored by Aaron Tsai's avatar Aaron Tsai
Browse files

Adding 1s time gap between back-to-back calling setDataThrottling API

Modem has restriction that it can not process back-to-back thermal actions.
Adding 1s delay to prevent unexpected errors.

Bug: 181634712
Test: atest VtsHalRadioV1_6TargetTest -- --test-arg com.android.tradefed.testtype.GTest:native-test-flag:"--gtest_filter=*setDataThrottling/0_slot1"
Change-Id: I70a717cbc3a63d5b1abb4be9d3920d0ee3451b14
parent 40bbe789
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -433,6 +433,8 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) {
                 ::android::hardware::radio::V1_6::RadioError::NONE,
                 ::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS}));
    }

    sleep(1);
    serial = GetRandomSerialNumber();

    res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::THROTTLE_ANCHOR_CARRIER,
@@ -453,6 +455,8 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) {
                 ::android::hardware::radio::V1_6::RadioError::NONE,
                 ::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS}));
    }

    sleep(1);
    serial = GetRandomSerialNumber();

    res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::HOLD, 60000);
@@ -473,6 +477,8 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) {
                 ::android::hardware::radio::V1_6::RadioError::NONE,
                 ::android::hardware::radio::V1_6::RadioError::INVALID_ARGUMENTS}));
    }

    sleep(1);
    serial = GetRandomSerialNumber();

    res = radio_v1_6->setDataThrottling(serial, DataThrottlingAction::NO_DATA_THROTTLING, 60000);