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

Commit c847f1cf authored by Jack He's avatar Jack He Committed by android-build-merger
Browse files

HFP: Round battery level to nearest integer

am: 119c961c

Change-Id: Ie67e9d46b63b0ac3234035580476b4c9af80da0d
parents de2e2c8b 119c961c
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -336,8 +336,8 @@ public class HeadsetService extends ProfileService {
                                + ", scale=" + scale);
                        return;
                    }
                    batteryLevel = batteryLevel * 5 / scale;
                    mSystemInterface.getHeadsetPhoneState().setCindBatteryCharge(batteryLevel);
                    int cindBatteryLevel = Math.round(batteryLevel * 5 / ((float) scale));
                    mSystemInterface.getHeadsetPhoneState().setCindBatteryCharge(cindBatteryLevel);
                    break;
                }
                case AudioManager.VOLUME_CHANGED_ACTION: {