diff options
author | Harpreet \"Eli\" Sangha <eliptus@google.com> | 2020-03-11 06:00:55 +0900 |
---|---|---|
committer | Harpreet \"Eli\" Sangha <eliptus@google.com> | 2020-03-12 05:49:35 +0900 |
commit | 7aec50208c94406d5e91bdbafe37e34b0e53d0f8 (patch) | |
tree | deff29028984803f0212b298d26c9eeb23113b0a /vibrator/aidl/default/Vibrator.cpp | |
parent | b74b76cc5edccbd3c11ca24be7ea250f61a5b084 (diff) |
vibrator: aidl: Apply Compose API Feedback
- Make Thud and Spin optional due to complexity.
- Make "scale" inclusive of zero, which represents minimum "feelable"
intensity.
- Update VTS tests appropriately.
- Fix typo in VTS test names.
Bug: 151084263
Test: VTS on Flame, Walleye, and Cuttlefish
Signed-off-by: Harpreet \"Eli\" Sangha <eliptus@google.com>
Change-Id: Ib0d046be83ee79ab38e0b9c3fb87a41f23879f8b
Diffstat (limited to 'vibrator/aidl/default/Vibrator.cpp')
-rw-r--r-- | vibrator/aidl/default/Vibrator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/vibrator/aidl/default/Vibrator.cpp b/vibrator/aidl/default/Vibrator.cpp index 9236b95ddc..b359100d1a 100644 --- a/vibrator/aidl/default/Vibrator.cpp +++ b/vibrator/aidl/default/Vibrator.cpp @@ -146,7 +146,7 @@ ndk::ScopedAStatus Vibrator::compose(const std::vector<CompositeEffect>& composi if (e.delayMs > kComposeDelayMaxMs) { return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } - if (e.scale <= 0.0f || e.scale > 1.0f) { + if (e.scale < 0.0f || e.scale > 1.0f) { return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT); } if (std::find(supported.begin(), supported.end(), e.primitive) == supported.end()) { |