[Bugfix] Fix the wrong lastBackgroundTime in UidRecord
Test:A process call into updateOomAdjLocked in background which will set its uidRec.lastBackgroundTime = SystemClock.uptimeMillis(); and then in the idleUidsLocked() method it will compare the lastBackgroundTime with the elapsedRealtime which may cause a process which just go into background a few seconds ago become idle state and then be killed by this Change-Id: I419a555ef2f6490c26290b19fc86756fde293551 Signed-off-by: lihuan3 <lihuan3@xiaomi.com>
This commit is contained in:
@@ -387,7 +387,7 @@ public final class OomAdjuster {
|
||||
ActiveUids uids = mTmpUidRecords;
|
||||
uids.clear();
|
||||
uids.put(uidRec.uid, uidRec);
|
||||
updateUidsLocked(uids, now);
|
||||
updateUidsLocked(uids, SystemClock.elapsedRealtime());
|
||||
mProcessList.incrementProcStateSeqAndNotifyAppsLocked(uids);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user