Merge "Fix BatteryStats counts foreground activity time." am: 982daf25b8 am: 96d22e94c0
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1958912 Change-Id: I97a93591408ee7efe9c587743f0c3d20da26dc47
This commit is contained in:
@@ -4934,6 +4934,10 @@ final class ActivityRecord extends WindowToken implements WindowManagerService.A
|
|||||||
mAtmService.updateActivityUsageStats(this, Event.ACTIVITY_STOPPED);
|
mAtmService.updateActivityUsageStats(this, Event.ACTIVITY_STOPPED);
|
||||||
break;
|
break;
|
||||||
case DESTROYED:
|
case DESTROYED:
|
||||||
|
if (app != null && (mVisible || mVisibleRequested)) {
|
||||||
|
// The app may be died while visible (no PAUSED state).
|
||||||
|
mAtmService.updateBatteryStats(this, false);
|
||||||
|
}
|
||||||
mAtmService.updateActivityUsageStats(this, Event.ACTIVITY_DESTROYED);
|
mAtmService.updateActivityUsageStats(this, Event.ACTIVITY_DESTROYED);
|
||||||
// Fall through.
|
// Fall through.
|
||||||
case DESTROYING:
|
case DESTROYING:
|
||||||
|
|||||||
Reference in New Issue
Block a user