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

Commit 51904bf4 authored by Jing Ji's avatar Jing Ji Committed by Automerger Merge Worker
Browse files

Merge "Construct the UidState in case of not found during unparceling" into tm-dev am: 0fe49ee5

parents f2db747d 0fe49ee5
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -1182,7 +1182,16 @@ public final class ProcessStats implements Parcelable {
                        + " " + proc);
                mProcesses.put(procName, uid, proc);

                mUidStates.get(uid).addProcess(proc);
                UidState uidState = mUidStates.get(uid);
                if (uidState == null) {
                    // This is not expected, log a warning and construct a new UID state.
                    if (DEBUG_PARCEL) {
                        Slog.w(TAG, "Couldn't find the common UID " + uid + " for " + proc);
                    }
                    uidState = new UidState(this, uid);
                    mUidStates.put(uid, uidState);
                }
                uidState.addProcess(proc);
            }
        }