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

Commit 45bce99c authored by Treehugger Robot's avatar Treehugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Mute haptic when the audio attributes have mute haptic flag." into main

parents fad4956e 60cbcf38
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -44,6 +44,10 @@ static sp<os::IExternalVibratorService> getExternalVibratorService() {
}

os::HapticScale onExternalVibrationStart(const sp<os::ExternalVibration>& externalVibration) {
    if (externalVibration->getAudioAttributes().flags & AUDIO_FLAG_MUTE_HAPTIC) {
        ALOGD("%s, mute haptic according to audio attributes flag", __func__);
        return os::HapticScale::MUTE;
    }
    const sp<os::IExternalVibratorService> evs = getExternalVibratorService();
    if (evs != nullptr) {
        int32_t ret;