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

Commit 4c29aad5 authored by ykhung's avatar ykhung
Browse files

Refine consumed battery value formula for power component

for power component, the battery UI is designed to show system relative component without considering the attributed apps, update the current formula to use `devicePowerMah` value data only

Bug: 188663505
Test: make SettingsgRoboTests
Change-Id: Ibeeb360915303faed2f79c4621f17d6ba0dd725f
parent 954389be
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -241,7 +241,7 @@ public class BatteryEntry {
        mBatteryConsumer = null;
        mIsHidden = false;
        mPowerComponentId = powerComponentId;
        mConsumedPower = devicePowerMah - appsPowerMah;
        mConsumedPower = devicePowerMah;
        mUsageDurationMs = usageDurationMs;
        mConsumerType = ConvertUtils.CONSUMER_TYPE_SYSTEM_BATTERY;

@@ -265,11 +265,10 @@ public class BatteryEntry {
        icon = context.getDrawable(iconId);
        name = powerComponentName;

        mConsumedPower = devicePowerMah - appsPowerMah;
        mConsumedPower = devicePowerMah;
        mConsumerType = ConvertUtils.CONSUMER_TYPE_SYSTEM_BATTERY;
    }


    public Drawable getIcon() {
        return icon;
    }