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

Commit 63752a84 authored by Jing Ji's avatar Jing Ji
Browse files

Mark the persistent flag while creating the ProcessRecord

...if it's a persistent app indeed.

As we're not necessarily reusing the ProcessRecord now - including
persistent process - this was to handle the case where the old
process has been killed but not cleaned up, and the new process
creation request comes in - in this case, we'll create a new
ProcessRecord. If we do so, we need to set the persistent flag
correctly to the new ProcessRecord.

Bug: 230296979
Test: Manual
Change-Id: I2c8f8d054c64a8dd97ee4913779e927464382525
parent 2e6039cd
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -2996,9 +2996,10 @@ public final class ProcessList {
                hostingRecord.getDefiningUid(), hostingRecord.getDefiningProcessName());
        final ProcessStateRecord state = r.mState;

        if (!mService.mBooted && !mService.mBooting
        if (!isolated && !isSdkSandbox
                && userId == UserHandle.USER_SYSTEM
                && (info.flags & PERSISTENT_MASK) == PERSISTENT_MASK) {
                && (info.flags & PERSISTENT_MASK) == PERSISTENT_MASK
                && (TextUtils.equals(proc, info.processName))) {
            // The system process is initialized to SCHED_GROUP_DEFAULT in init.rc.
            state.setCurrentSchedulingGroup(ProcessList.SCHED_GROUP_DEFAULT);
            state.setSetSchedGroup(ProcessList.SCHED_GROUP_DEFAULT);