* Even if amplitude is > 0 resulting intensity might be 0 sometimes
* New devices just return EINVAL in kernel and ignore it, but on older
ones this may result in very weak vibration
Change-Id: I5d290d60d8414ca747dce4af847f190e3caedbe0
if (intensity > INTENSITY_MAX) {
intensity = INTENSITY_MAX;
}
+
+ if (intensity == 0) {
+ return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
+ }
+
LOG(DEBUG) << "Setting intensity: " << intensity;
if (mHasTimedOutIntensity) {