From 83f4904d51d324e74b6fd8af08c2d0b27f4029a6 Mon Sep 17 00:00:00 2001 From: Yin-Chia Yeh Date: Tue, 11 Jul 2017 13:44:35 -0700 Subject: [PATCH] Camera: reset callback after test done Test: VTS test pass Bug: 63570734 Change-Id: Ia7b1e8e9baae2885d9c43821fe2933df883f7892 Merged-In: Ic0eecaf843b5c2e78f60325090ea652d43a74a0b --- .../2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp index 2ae48535f1..9bffb1fa71 100644 --- a/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp +++ b/camera/provider/2.4/vts/functional/VtsHalCameraProviderV2_4TargetTest.cpp @@ -1111,6 +1111,10 @@ TEST_F(CameraHidlTest, setCallback) { auto status = provider.second->setCallback(cb); ASSERT_TRUE(status.isOk()); ASSERT_EQ(Status::OK, status); + // Reset callback since cb will go out of scope + status = provider.second->setCallback(nullptr); + ASSERT_TRUE(status.isOk()); + ASSERT_EQ(Status::OK, status); } }