Merge "Merge "Construct the UidState in case of not found during unparceling" into tm-dev am: 0fe49ee574 am: ed578c06b2 am: d7bdd3b62a" into tm-qpr-dev-plus-aosp

This commit is contained in:
Automerger Merge Worker
2022-05-24 20:18:26 +00:00
committed by Android (Google) Code Review

View File

@@ -1182,7 +1182,16 @@ public final class ProcessStats implements Parcelable {
+ " " + proc); + " " + proc);
mProcesses.put(procName, uid, 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);
} }
} }