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

Commit 2f71316d authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Vts: thermal: Test notification with an unregistered local callback"...

Merge "Vts: thermal: Test notification with an unregistered local callback" into stage-aosp-sc-ts-dev am: c11fad6a am: 04b2f495

Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15811944

Change-Id: I67c1389b45c48cde2bc957b09464fd4fdcf2f1e2
parents b7fce262 04b2f495
Loading
Loading
Loading
Loading
+3 −2
Original line number Original line Diff line number Diff line
@@ -106,9 +106,10 @@ class ThermalHidlTest : public testing::TestWithParam<std::string> {
// Note: a real thermal throttling event from the Thermal HAL could be
// Note: a real thermal throttling event from the Thermal HAL could be
// inadvertently received here.
// inadvertently received here.
TEST_P(ThermalHidlTest, NotifyThrottlingTest) {
TEST_P(ThermalHidlTest, NotifyThrottlingTest) {
    auto ret = mThermalCallback->notifyThrottling(kThrottleTemp);
    sp<ThermalCallback> thermalCallback = new (std::nothrow) ThermalCallback();
    auto ret = thermalCallback->notifyThrottling(kThrottleTemp);
    ASSERT_TRUE(ret.isOk());
    ASSERT_TRUE(ret.isOk());
    auto res = mThermalCallback->WaitForCallback(kCallbackNameNotifyThrottling);
    auto res = thermalCallback->WaitForCallback(kCallbackNameNotifyThrottling);
    EXPECT_TRUE(res.no_timeout);
    EXPECT_TRUE(res.no_timeout);
    ASSERT_TRUE(res.args);
    ASSERT_TRUE(res.args);
    EXPECT_EQ(kThrottleTemp, res.args->temperature);
    EXPECT_EQ(kThrottleTemp, res.args->temperature);