[DO NOT MERGE] vibrator/cs40l26: Fix unsupport primitive effects test am: 2724d61255
Original change: https://googleplex-android-review.googlesource.com/c/device/google/felix/+/21015728 Change-Id: I5356546cb334606256e828f60fb69134decdbaef Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
commit
aeca9c2df6
1 changed files with 3 additions and 4 deletions
|
@ -765,16 +765,15 @@ ndk::ScopedAStatus Vibrator::compose(const std::vector<CompositeEffect> &composi
|
||||||
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
|
return ndk::ScopedAStatus::fromExceptionCode(EX_ILLEGAL_ARGUMENT);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(effectScale < mPrimitiveMinScale[static_cast<uint32_t>(e_curr.primitive)]) {
|
|
||||||
effectScale = mPrimitiveMinScale[static_cast<uint32_t>(e_curr.primitive)];
|
|
||||||
}
|
|
||||||
|
|
||||||
if (e_curr.primitive != CompositePrimitive::NOOP) {
|
if (e_curr.primitive != CompositePrimitive::NOOP) {
|
||||||
ndk::ScopedAStatus status;
|
ndk::ScopedAStatus status;
|
||||||
status = getPrimitiveDetails(e_curr.primitive, &effectIndex);
|
status = getPrimitiveDetails(e_curr.primitive, &effectIndex);
|
||||||
if (!status.isOk()) {
|
if (!status.isOk()) {
|
||||||
return status;
|
return status;
|
||||||
}
|
}
|
||||||
|
if (effectScale < mPrimitiveMinScale[static_cast<uint32_t>(e_curr.primitive)]) {
|
||||||
|
effectScale = mPrimitiveMinScale[static_cast<uint32_t>(e_curr.primitive)];
|
||||||
|
}
|
||||||
effectVolLevel = intensityToVolLevel(effectScale, effectIndex);
|
effectVolLevel = intensityToVolLevel(effectScale, effectIndex);
|
||||||
totalDuration += mEffectDurations[effectIndex];
|
totalDuration += mEffectDurations[effectIndex];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue