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

Commit 982daf25 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Fix BatteryStats counts foreground activity time."

parents cbb2fa2f 19758a38
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -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: