mirror of
https://github.com/Evolution-X/hardware_interfaces
synced 2026-02-01 15:58:43 +00:00
Merge "vibrator: vts: correct the checking flag when testing on() interfaces" am: 321618f711
Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1505756 Change-Id: I6bf86bbcc31f9f7e3d3c176c8c742f6933884858
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user