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

Commit 9c2b4278 authored by Jing Ji's avatar Jing Ji Committed by Automerger Merge Worker
Browse files

Merge "Force a battery tracker update on dumping proto request" into tm-dev am: 4740cb69

parents fc37e3e6 4740cb69
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -839,6 +839,8 @@ final class AppBatteryTracker extends BaseAppStateTracker<AppBatteryPolicy>

    @Override
    void dumpAsProto(ProtoOutputStream proto, int uid) {
        // Force an update.
        updateBatteryUsageStatsIfNecessary(mInjector.currentTimeMillis(), true);
        synchronized (mLock) {
            final SparseArray<ImmutableBatteryUsage> uidConsumers = mUidBatteryUsageInWindow;
            if (uid != android.os.Process.INVALID_UID) {