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
Loading
Please register or sign in to comment