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

Skip to content
Commit 906055e3 authored by jackqdyulei's avatar jackqdyulei
Browse files

Add NPE check for screen and cellular update.

When battery is full of charge, usageList in BatteryStatsHelper
will be empty. As a result, we cannot find BatterySipper with
type screen and cell, which creates the null pointer error.

In this cl, I add NPE check for sipper. When sipper is null, all
data will be set to default value. I also add check for totalPower
so we won't have divided by zero error.

Bug: 35757789
Test: RunSettingsRoboTests
Change-Id: I80f3c0c542e0a50868e7c314a8d9b3c17999d8c6
parent 7e0df1e4
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment