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
(cherry picked from commit 15b01dc53b
)
This commit is contained in:
parent
26e1d731bb
commit
9edfd34da9
1 changed files with 2 additions and 2 deletions
|
@ -95,7 +95,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<void> completionPromise;
|
||||
std::future<void> completionFuture{completionPromise.get_future()};
|
||||
|
@ -109,7 +109,7 @@ TEST_P(VibratorAidl, OnWithCallback) {
|
|||
}
|
||||
|
||||
TEST_P(VibratorAidl, OnCallbackNotSupported) {
|
||||
if (!(capabilities & IVibrator::CAP_PERFORM_CALLBACK)) {
|
||||
if (!(capabilities & IVibrator::CAP_ON_CALLBACK)) {
|
||||
sp<CompletionCallback> callback = new CompletionCallback([] {});
|
||||
EXPECT_EQ(Status::EX_UNSUPPORTED_OPERATION, vibrator->on(250, callback).exceptionCode());
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue