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

Commit 4ba381fd authored by Hui Yu's avatar Hui Yu Committed by Android (Google) Code Review
Browse files

Merge "resetFgsRestrictionLocked() must be called AFTER logFGSStateChangeLocked()." into sc-dev

parents de90ce29 a6c9fe40
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -1930,7 +1930,6 @@ public final class ActiveServices {
                    decActiveForegroundAppLocked(smap, r);
                }
                r.isForeground = false;
                resetFgsRestrictionLocked(r);
                r.mFgsExitTime = SystemClock.uptimeMillis();
                ServiceState stracker = r.getTracker();
                if (stracker != null) {
@@ -1945,6 +1944,7 @@ public final class ActiveServices {
                        FrameworkStatsLog.FOREGROUND_SERVICE_STATE_CHANGED__STATE__EXIT,
                        r.mFgsExitTime > r.mFgsEnterTime
                                ? (int)(r.mFgsExitTime - r.mFgsEnterTime) : 0);
                resetFgsRestrictionLocked(r);
                mAm.updateForegroundServiceUsageStats(r.name, r.userId, false);
                if (r.app != null) {
                    mAm.updateLruProcessLocked(r.app, false, null);
@@ -4192,8 +4192,7 @@ public final class ActiveServices {
        r.isForeground = false;
        r.foregroundId = 0;
        r.foregroundNoti = null;
        r.mAllowWhileInUsePermissionInFgs = false;
        r.mAllowStartForeground = REASON_DENIED;
        resetFgsRestrictionLocked(r);

        // Clear start entries.
        r.clearDeliveredStartsLocked();