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

Commit 4691384b authored by Hui Yu's avatar Hui Yu Committed by Automerger Merge Worker
Browse files

Merge "resetFgsRestrictionLocked() must be called AFTER...

Merge "resetFgsRestrictionLocked() must be called AFTER logFGSStateChangeLocked()." into sc-dev am: 4ba381fd

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/base/+/14850891

Change-Id: I80e34f28a077762c2e22e6863f6515e54e34819b
parents f1aca6db 4ba381fd
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();