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

Commit bec242ac authored by lijilou's avatar lijilou
Browse files

BatteryStatsImpl:fix ArithmeticException due to list size is zero.

Test: OEM monkey test
Bug: 341658103
Change-Id: Idfc3db1c0ea3be536cad82bf98fab6d668d26a36
parent 2417c31f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3377,7 +3377,7 @@ public class BatteryStatsImpl extends BatteryStats {
            }
            return mTotalTimeUs + (mNesting > 0
                    ? (curBatteryRealtimeUs - mUpdateTimeUs)
                            / (mTimerPool != null ? mTimerPool.size() : 1)
                            / (mTimerPool != null && mTimerPool.size() > 0 ? mTimerPool.size() : 1)
                    : 0);
        }