Force a battery tracker update on dumping proto request
There is an internal throttling but it shouldn't be applicable to the dump request. Bug: 203105544 Test: dumpsys activity app-restrictions --proto Change-Id: Iff718224f08df1b63f7f90c210faf3e01bbee1e3
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user