commit | e45eeb1d4293be49236e9c1933c1ecf95866e9ff | [log] [tgz] |
---|---|---|
author | TreeHugger Robot <treehugger-gerrit@google.com> | Mon Sep 13 20:15:10 2021 +0000 |
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | Mon Sep 13 20:15:10 2021 +0000 |
tree | 50ce34f234dca9d969d231a26fa2afae7fc29b31 | |
parent | 52c78f07291d2a60e8b32f9db6a043e4324ccdbc [diff] | |
parent | 91f7af8d0794af8971482e0afffc3af917113ec7 [diff] |
Merge "Vts: thermal: Test notification with an unregistered local callback" into sc-qpr1-dev am: 91f7af8d07 Original change: https://googleplex-android-review.googlesource.com/c/platform/hardware/interfaces/+/15720639 Change-Id: Ibf4afa7593ddb64dd062938ba0d87cbf35d89b72
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);