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

Commit ecc7a0a5 authored by lihuan3's avatar lihuan3 Committed by 欢 李
Browse files

[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: default avatarlihuan3 <lihuan3@xiaomi.com>
parent c779768d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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);
            }
        }