commit | 04b2f495081fbd387609444dba475b07d5f92a08 | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Wed Sep 15 03:25:18 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Wed Sep 15 03:25:18 2021 +0000 |
tree | fd3c6497039b82e2041f9f62b59cd61d744cd32a | |
parent | 59e69d25636f77984324a4d31151261c56995f9f [diff] | |
parent | c11fad6ab46656dfac104ea13758dd6a5a111e9c [diff] |
Merge "Vts: thermal: Test notification with an unregistered local callback" into stage-aosp-sc-ts-dev am: c11fad6ab4 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15811944 Change-Id: I7fc94c1219ba23c5cf2d8a9661111579d883a8d5
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);