Merge "vibrator: vts: correct the checking flag when testing on() interfaces" am: 321618f711 am: 47c899b6c8

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1505756

Change-Id: Ie89e7cfb076a4cf0f7eac552698e1d1bae948e7a
This commit is contained in:
Treehugger Robot
2020-11-30 06:39:11 +00:00
committed by Automerger Merge Worker

View File

@@ -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());
}