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

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

Merge "Lock BatteryStats when calling getStartClockTime" into tm-qpr-dev

parents 198f6aac 86690659
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -822,7 +822,10 @@ public final class BatteryStatsService extends IBatteryStats.Stub

                    final long sessionStart = mBatteryUsageStatsStore
                            .getLastBatteryUsageStatsBeforeResetAtomPullTimestamp();
                    final long sessionEnd = mStats.getStartClockTime();
                    final long sessionEnd;
                    synchronized (mStats) {
                        sessionEnd = mStats.getStartClockTime();
                    }
                    final BatteryUsageStatsQuery queryBeforeReset =
                            new BatteryUsageStatsQuery.Builder()
                                    .setMaxStatsAgeMs(0)