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

Commit 53337d63 authored by mxyyiyi's avatar mxyyiyi
Browse files

Add accumulated() in BatteryUsageStats to tweak the latency.

Bug: 404736234
Test: Manual
Flag: EXEMPT simple fix
Change-Id: I0ec6a9aaf45b5619c8f98063bebf370b2195a95f
parent 4dc8d326
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -44,7 +44,7 @@ public class BatteryUsageStatsLoader extends AsyncLoaderCompat<BatteryUsageStats
        }
        try {
            return mBatteryStatsManager.getBatteryUsageStats(
                    builder.includeProcessStateData().build());
                    builder.includeProcessStateData().accumulated().build());
        } catch (RuntimeException e) {
            Log.e(TAG, "loadInBackground() for getBatteryUsageStats()", e);
            // Use default BatteryUsageStats.
+1 −0
Original line number Diff line number Diff line
@@ -177,6 +177,7 @@ public final class DataProcessor {
                new BatteryUsageStatsQuery.Builder()
                        .includeBatteryHistory()
                        .includeProcessStateData()
                        .accumulated()
                        .build();
        final BatteryUsageStats batteryUsageStats =
                context.getSystemService(BatteryStatsManager.class)