From 15b01dc53b5b6212f0731d503701642f4aca3f6e Mon Sep 17 00:00:00 2001 From: Fenglin Wu Date: Mon, 23 Nov 2020 10:03:10 +0800 Subject: [PATCH] vibrator: vts: correct the checking flag when testing on() interfaces Check CAP_ON_CALLBACK flag when testing vibrator onWithCallback() and OnCallbackNotSupported() functions. Bug: 172485963 Change-Id: Ie5c926ec943f191d1e5309ac85e7c8e1540fb824 --- vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp b/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp index 888a4031bf..e51f5947d8 100644 --- a/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp +++ b/vibrator/aidl/vts/VtsHalVibratorTargetTest.cpp @@ -96,7 +96,7 @@ TEST_P(VibratorAidl, OnThenOffBeforeTimeout) { } TEST_P(VibratorAidl, OnWithCallback) { - if (!(capabilities & IVibrator::CAP_PERFORM_CALLBACK)) return; + if (!(capabilities & IVibrator::CAP_ON_CALLBACK)) return; std::promise completionPromise; std::future completionFuture{completionPromise.get_future()}; @@ -110,7 +110,7 @@ TEST_P(VibratorAidl, OnWithCallback) { } TEST_P(VibratorAidl, OnCallbackNotSupported) { - if (!(capabilities & IVibrator::CAP_PERFORM_CALLBACK)) { + if (!(capabilities & IVibrator::CAP_ON_CALLBACK)) { sp callback = new CompletionCallback([] {}); EXPECT_EQ(Status::EX_UNSUPPORTED_OPERATION, vibrator->on(250, callback).exceptionCode()); }