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

Commit a08ce971 authored by Harpreet \"Eli\" Sangha's avatar Harpreet \"Eli\" Sangha Committed by android-build-merger
Browse files

Merge "VibratorService: AIDL Amplitude API Change"

am: 081e49f2

Change-Id: I4c7b7e1056833095b3bb8f7e3f7e472ddc2962e1
parents 1381de46 081e49f2
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());
        }