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

Commit 86d85e3d authored by vnori's avatar vnori Committed by android-build-merger
Browse files

Merge "consider the situations where the device has only one volume level...

Merge "consider the situations where the device has only one volume level set." am: da8a9936 am: 234153e2
am: 433c747c

Change-Id: I71379d620319a82f61628a2ba2951a5085117c2b
parents 6cd2c109 433c747c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -751,7 +751,7 @@ public class HeadsetClientStateMachine extends StateMachine {
    }

    static int amToHfVol(int amVol) {
        int amRange = mMaxAmVcVol - mMinAmVcVol;
        int amRange = (mMaxAmVcVol > mMinAmVcVol) ? (mMaxAmVcVol - mMinAmVcVol) : 1;
        int hfRange = MAX_HFP_SCO_VOICE_CALL_VOLUME - MIN_HFP_SCO_VOICE_CALL_VOLUME;
        int hfOffset = (hfRange * (amVol - mMinAmVcVol)) / amRange;
        int hfVol = MIN_HFP_SCO_VOICE_CALL_VOLUME + hfOffset;