Replace Screen system component time with device screen on time

Bug: 278022529
Fix: 278022529
Test: manual
Change-Id: I95a107ea5c3c5e15893c0846c8fd83757e7b9358
This commit is contained in:
Zaiyue Xue
2023-04-24 13:50:14 +08:00
parent d92c4fc823
commit 1237a70c96
2 changed files with 10 additions and 5 deletions

View File

@@ -1402,6 +1402,11 @@ public final class DataProcessor {
currentEntry.mCachedUsageConsumePower,
nextEntry.mCachedUsageConsumePower);
}
if (selectedBatteryEntry.isSystemEntry()
&& selectedBatteryEntry.mDrainType == BatteryConsumer.POWER_COMPONENT_SCREEN) {
// Replace Screen system component time with screen on time.
foregroundUsageTimeInMs = slotScreenOnTime;
}
// Excludes entry since we don't have enough data to calculate.
if (foregroundUsageTimeInMs == 0
&& backgroundUsageTimeInMs == 0