Adjust background time to avoid background + screen time larger than
time slot duration. Test: make RunSettingsRoboTests Bug: 265089855 Fix: 265089855 Change-Id: Idf3fee13eccd5b1f699feb5f79bd2aa474e444b8
This commit is contained in:
@@ -1547,6 +1547,9 @@ public final class DataProcessor {
|
||||
appUsageMap,
|
||||
selectedBatteryEntry.mUserId,
|
||||
selectedBatteryEntry.mPackageName));
|
||||
// Make sure the background + screen-on time will not exceed the threshold.
|
||||
backgroundUsageTimeInMs = Math.min(
|
||||
backgroundUsageTimeInMs, (long) TOTAL_HOURLY_TIME_THRESHOLD - screenOnTime);
|
||||
final BatteryDiffEntry currentBatteryDiffEntry = new BatteryDiffEntry(
|
||||
context,
|
||||
foregroundUsageTimeInMs,
|
||||
|
Reference in New Issue
Block a user