Merge "Check if app's ntwk state will be changed before updating procstate." am: 36b9bc8e4b
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/2030427 Change-Id: I01f44b56e76b087ed4ce3a5186e20a88b162e952
This commit is contained in:
@@ -547,7 +547,6 @@ public class OomAdjuster {
|
|||||||
uids.clear();
|
uids.clear();
|
||||||
uids.put(uidRec.getUid(), uidRec);
|
uids.put(uidRec.getUid(), uidRec);
|
||||||
updateUidsLSP(uids, SystemClock.elapsedRealtime());
|
updateUidsLSP(uids, SystemClock.elapsedRealtime());
|
||||||
mProcessList.incrementProcStateSeqAndNotifyAppsLOSP(uids);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1268,8 +1267,6 @@ public class OomAdjuster {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mProcessList.incrementProcStateSeqAndNotifyAppsLOSP(activeUids);
|
|
||||||
|
|
||||||
return mService.mAppProfiler.updateLowMemStateLSP(numCached, numEmpty, numTrimming);
|
return mService.mAppProfiler.updateLowMemStateLSP(numCached, numEmpty, numTrimming);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1304,6 +1301,11 @@ public class OomAdjuster {
|
|||||||
|
|
||||||
@GuardedBy({"mService", "mProcLock"})
|
@GuardedBy({"mService", "mProcLock"})
|
||||||
private void updateUidsLSP(ActiveUids activeUids, final long nowElapsed) {
|
private void updateUidsLSP(ActiveUids activeUids, final long nowElapsed) {
|
||||||
|
// This compares previously set procstate to the current procstate in regards to whether
|
||||||
|
// or not the app's network access will be blocked. So, this needs to be called before
|
||||||
|
// we update the UidRecord's procstate by calling {@link UidRecord#setSetProcState}.
|
||||||
|
mProcessList.incrementProcStateSeqAndNotifyAppsLOSP(activeUids);
|
||||||
|
|
||||||
ArrayList<UidRecord> becameIdle = mTmpBecameIdle;
|
ArrayList<UidRecord> becameIdle = mTmpBecameIdle;
|
||||||
becameIdle.clear();
|
becameIdle.clear();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user