commit | 2f71316d1b0c59b804b744596e531742e1e666e0 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Wed Sep 15 03:38:13 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Sep 15 03:38:13 2021 +0000 |
tree | fd3c6497039b82e2041f9f62b59cd61d744cd32a | |
parent | b7fce2622276f18fefaee159acf26220ce236851 [diff] | |
parent | 04b2f495081fbd387609444dba475b07d5f92a08 [diff] |
Merge "Vts: thermal: Test notification with an unregistered local callback" into stage-aosp-sc-ts-dev am: c11fad6ab4 am: 04b2f49508 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15811944 Change-Id: I67c1389b45c48cde2bc957b09464fd4fdcf2f1e2
diff --git a/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp b/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp index 2ee91f4..6c5aca7 100644 --- a/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp +++ b/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp
@@ -106,9 +106,10 @@ // Note: a real thermal throttling event from the Thermal HAL could be // inadvertently received here. 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()); - auto res = mThermalCallback->WaitForCallback(kCallbackNameNotifyThrottling); + auto res = thermalCallback->WaitForCallback(kCallbackNameNotifyThrottling); EXPECT_TRUE(res.no_timeout); ASSERT_TRUE(res.args); EXPECT_EQ(kThrottleTemp, res.args->temperature);