diff options
author | Fenglin Wu <fenglinw@codeaurora.org> | 2020-06-11 19:49:53 +0800 |
---|---|---|
committer | Fenglin Wu <fenglinw@codeaurora.org> | 2020-06-12 15:43:03 +0800 |
commit | 5d179ffc66f293f1f123d229d8bcc8bf8997faff (patch) | |
tree | 61ffe798933dab8f225ef96d6e00b0f544943138 | |
parent | ab76e75b68eb92b79ab1c28d7c25393f77a9fd7d (diff) |
vibrator: bail out for unsupported effect strength
When playing effect, bail out if unsupported effect strength value is
received.
Change-Id: I00bd72be3032e12835f6da185c69a024aa26f50c
-rw-r--r-- | 1.2/Vibrator.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/1.2/Vibrator.cpp b/1.2/Vibrator.cpp index b699704..faff619 100644 --- a/1.2/Vibrator.cpp +++ b/1.2/Vibrator.cpp @@ -286,7 +286,7 @@ Return<Status> InputFFDevice::playEffect(int effectId, EffectStrength es, long * mCurrMagnitude = STRONG_MAGNITUDE; break; default: - break; + return Status::UNSUPPORTED_OPERATION; } return play(effectId, INVALID_VALUE, playLengthMs); |