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

Commit b0e53fd9 authored by Shraddha Basantwani's avatar Shraddha Basantwani
Browse files

Haptic Generator : Modify setHgHapticScales method to use const reference.

Bug: 258124419
Test: atest VtsHalHapticGeneratorTargetTest

Change-Id: I70dfbf4ba4a46dc30938846f63e928ca2a04b969
parent bcd5d085
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -67,7 +67,7 @@ void HapticGeneratorContext::reset() {
}

RetCode HapticGeneratorContext::setHgHapticScales(
        const std::vector<HapticGenerator::HapticScale> hapticScales) {
        const std::vector<HapticGenerator::HapticScale>& hapticScales) {
    std::lock_guard lg(mMutex);
    for (auto hapticScale : hapticScales) {
        mParams.mHapticScales.insert_or_assign(hapticScale.id, hapticScale.scale);
+1 −1
Original line number Diff line number Diff line
@@ -69,7 +69,7 @@ class HapticGeneratorContext final : public EffectContext {
    RetCode disable();
    void reset();

    RetCode setHgHapticScales(const std::vector<HapticGenerator::HapticScale> hapticScales);
    RetCode setHgHapticScales(const std::vector<HapticGenerator::HapticScale>& hapticScales);
    std::vector<HapticGenerator::HapticScale> getHgHapticScales();

    RetCode setHgVibratorInformation(const HapticGenerator::VibratorInformation& vibratorInfo);