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

Commit 463850e0 authored by Dianne Hackborn's avatar Dianne Hackborn Committed by Android (Google) Code Review
Browse files

Merge "Fix issue #10795385: System process crash reinstalling GEL -" into klp-dev

parents 80645121 e56c2c3f
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -14749,7 +14749,7 @@ public final class ActivityManagerService extends ActivityManagerNative
    }
    private final void setProcessTrackerState(ProcessRecord proc, int memFactor, long now) {
        if (proc.thread != null) {
        if (proc.thread != null && proc.baseProcessTracker != null) {
            proc.baseProcessTracker.setState(proc.repProcState, memFactor, now, proc.pkgList);
        }
    }
+22 −16
Original line number Diff line number Diff line
@@ -567,7 +567,8 @@ final class ProcessRecord {
     */
    public boolean addPackage(String pkg, ProcessStatsService tracker) {
        if (!pkgList.containsKey(pkg)) {
            pkgList.put(pkg, tracker.getProcessStateLocked(pkg, info.uid, processName));
            pkgList.put(pkg, baseProcessTracker != null
                    ? tracker.getProcessStateLocked(pkg, info.uid, processName) : null);
            return true;
        }
        return false;
@@ -592,10 +593,11 @@ final class ProcessRecord {
     *  Delete all packages from list except the package indicated in info
     */
    public void resetPackageList(ProcessStatsService tracker) {
        final int N = pkgList.size();
        if (baseProcessTracker != null) {
            long now = SystemClock.uptimeMillis();
            baseProcessTracker.setState(ProcessStats.STATE_NOTHING,
                    tracker.getMemFactorLocked(), now, pkgList);
        final int N = pkgList.size();
            if (N != 1) {
                for (int i=0; i<N; i++) {
                    ProcessStats.ProcessState ps = pkgList.valueAt(i);
@@ -612,6 +614,10 @@ final class ProcessRecord {
                    ps.makeActive();
                }
            }
        } else if (N != 1) {
            pkgList.clear();
            pkgList.put(info.packageName, null);
        }
    }
    
    public String[] getPackageList() {