Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 321618f7 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "vibrator: vts: correct the checking flag when testing on() interfaces"

parents 4cdcadf7 15b01dc5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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<void> completionPromise;
    std::future<void> 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<CompletionCallback> callback = new CompletionCallback([] {});
        EXPECT_EQ(Status::EX_UNSUPPORTED_OPERATION, vibrator->on(250, callback).exceptionCode());
    }