[DO NOT MERGE] vibrator/cs40l26: Fix unsupport primitive effects test
Bug: 264219822 Test: atest Vibrator/VibratorAidl#ComposeUnsupportedPrimitives/TOP_LEVEL_VIBRATOR_0 Change-Id: I736e509bcd1e8004c144744e06c63cc35b6fbfb2
This commit is contained in:
parent
fae76d2817
commit
2724d61255
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