Merge "resetFgsRestrictionLocked() must be called AFTER logFGSStateChangeLocked()." into sc-dev
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user