Skip to content
Snippets Groups Projects
Commit 63159a4f authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "BatteryStatsImpl:fix ArithmeticException due to list size is zero." into main

parents ca6f6d5f bec242ac
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
 
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment