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

Commit f35554bb 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...

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

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/18497057



Change-Id: I9ecb89e3d312ca374dbc78b57c27d02394667150
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 1258293f 5578bc7d
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) {