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

Commit a5336f51 authored by Dmitri Plotnikov's avatar Dmitri Plotnikov Committed by Android (Google) Code Review
Browse files

Merge "Fix NPE when PowerStats throttle period config is missing" into main

parents d2542fcd 09c5b2d4
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -620,6 +620,10 @@ public final class BatteryStatsService extends IBatteryStats.Stub

    private void setPowerStatsThrottlePeriods(BatteryStatsImpl.BatteryStatsConfig.Builder builder,
            String configString) {
        if (configString == null) {
            return;
        }

        Matcher matcher = Pattern.compile("([^:]+):(\\d+)\\s*").matcher(configString);
        while (matcher.find()) {
            String powerComponentName = matcher.group(1);