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

Commit bf5dd80d authored by ykhung's avatar ykhung
Browse files

Fix corner case IndexOutOfBound exception for null content

Bug: 184807417
Test: make SettingsRoboTests
Change-Id: Icf35b4084bcea62c2879a100d1b35b5448d8276d
parent 41389324
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -185,7 +185,7 @@ public class BatteryChartPreferenceController extends AbstractPreferenceControll
    private void setBatteryHistoryMapInner(
            final Map<Long, Map<String, BatteryHistEntry>> batteryHistoryMap) {
        // Resets all battery history data relative variables.
        if (batteryHistoryMap == null) {
        if (batteryHistoryMap == null || batteryHistoryMap.isEmpty()) {
            mBatteryIndexedMap = null;
            mBatteryHistoryKeys = null;
            mBatteryHistoryLevels = null;