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

Commit 0069ce22 authored by Dmitri Plotnikov's avatar Dmitri Plotnikov Committed by Automerger Merge Worker
Browse files

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

parents 2f5b89b2 a908dde9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -827,7 +827,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)