Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 853c56a6 authored by Harpreet \"Eli\" Sangha's avatar Harpreet \"Eli\" Sangha
Browse files

VibratorService: AIDL Amplitude API Change



Bug: 139762802
Test: Manual Invocation via 'idlcli'
Change-Id: Ibdfbab0d04a21cf7bca4c5cd7db1f86fa6a91431
Signed-off-by: default avatarHarpreet \"Eli\" Sangha <eliptus@google.com>
parent 75275ad5
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -291,7 +291,7 @@ static jlong vibratorSupportsAmplitudeControl(JNIEnv*, jclass) {

static void vibratorSetAmplitude(JNIEnv*, jclass, jint amplitude) {
    if (auto hal = getHal<aidl::IVibrator>()) {
        auto status = hal->call(&aidl::IVibrator::IVibrator::setAmplitude, amplitude);
        auto status = hal->call(&aidl::IVibrator::IVibrator::setAmplitude, static_cast<float>(amplitude) / UINT8_MAX);
        if (!status.isOk()) {
            ALOGE("Failed to set vibrator amplitude: %s", status.toString8().string());
        }