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

Commit 36b9bc8e authored by Sudheer Shanka's avatar Sudheer Shanka Committed by Gerrit Code Review
Browse files

Merge "Check if app's ntwk state will be changed before updating procstate."

parents 855ec2d3 39da7d1c
Loading
Loading
Loading
Loading
+5 −3
Original line number Diff line number Diff line
@@ -547,7 +547,6 @@ public class OomAdjuster {
                uids.clear();
                uids.put(uidRec.getUid(), uidRec);
                updateUidsLSP(uids, SystemClock.elapsedRealtime());
                mProcessList.incrementProcStateSeqAndNotifyAppsLOSP(uids);
            }
        }

@@ -1268,8 +1267,6 @@ public class OomAdjuster {
            }
        }

        mProcessList.incrementProcStateSeqAndNotifyAppsLOSP(activeUids);

        return mService.mAppProfiler.updateLowMemStateLSP(numCached, numEmpty, numTrimming);
    }

@@ -1304,6 +1301,11 @@ public class OomAdjuster {

    @GuardedBy({"mService", "mProcLock"})
    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;
        becameIdle.clear();