Only use PROCESS_STATE_TOP as foreground time.
There are some miscalculations in state FOREGROUND_SERVICE and FOREGROUND, so we move them out of the foreground time for now. We will fix it after O and may add them back later. Bug: 37000096 Test: RunSettingsRoboTests Change-Id: Ic3f2f7fa69e8a213895c601630d1cca94fd32220
This commit is contained in:
@@ -100,9 +100,7 @@ public class BatteryUtils {
|
||||
|
||||
private long getProcessForegroundTimeMs(BatteryStats.Uid uid, int which) {
|
||||
final long rawRealTimeUs = convertMsToUs(SystemClock.elapsedRealtime());
|
||||
final int foregroundTypes[] = {BatteryStats.Uid.PROCESS_STATE_TOP,
|
||||
BatteryStats.Uid.PROCESS_STATE_FOREGROUND_SERVICE,
|
||||
BatteryStats.Uid.PROCESS_STATE_FOREGROUND};
|
||||
final int foregroundTypes[] = {BatteryStats.Uid.PROCESS_STATE_TOP};
|
||||
Log.v(TAG, "package: " + mPackageManager.getNameForUid(uid.getUid()));
|
||||
|
||||
long timeUs = 0;
|
||||
|
Reference in New Issue
Block a user