Merge "Maybe fix issue #10748810: Runtime restart: crash under..." into klp-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
e39ced0f7c
@@ -983,7 +983,7 @@ public final class ProcessStats implements Parcelable {
|
|||||||
PackageState pkgState = uids.valueAt(iu);
|
PackageState pkgState = uids.valueAt(iu);
|
||||||
for (int iproc=pkgState.mProcesses.size()-1; iproc>=0; iproc--) {
|
for (int iproc=pkgState.mProcesses.size()-1; iproc>=0; iproc--) {
|
||||||
ProcessState ps = pkgState.mProcesses.valueAt(iproc);
|
ProcessState ps = pkgState.mProcesses.valueAt(iproc);
|
||||||
if (ps.isInUse()) {
|
if (ps.isInUse() || ps.mCommonProcess.isInUse()) {
|
||||||
pkgState.mProcesses.valueAt(iproc).resetSafely(now);
|
pkgState.mProcesses.valueAt(iproc).resetSafely(now);
|
||||||
} else {
|
} else {
|
||||||
pkgState.mProcesses.removeAt(iproc);
|
pkgState.mProcesses.removeAt(iproc);
|
||||||
@@ -2496,8 +2496,12 @@ public final class ProcessStats implements Parcelable {
|
|||||||
// The array map is still pointing to a common process state
|
// The array map is still pointing to a common process state
|
||||||
// that is now shared across packages. Update it to point to
|
// that is now shared across packages. Update it to point to
|
||||||
// the new per-package state.
|
// the new per-package state.
|
||||||
proc = mStats.mPackages.get(pkgList.keyAt(index),
|
PackageState pkg = mStats.mPackages.get(pkgList.keyAt(index), proc.mUid);
|
||||||
proc.mUid).mProcesses.get(proc.mName);
|
if (pkg == null) {
|
||||||
|
throw new IllegalStateException("No existing package "
|
||||||
|
+ pkgList.keyAt(index) + " for multi-proc" + proc.mName);
|
||||||
|
}
|
||||||
|
proc = pkg.mProcesses.get(proc.mName);
|
||||||
if (proc == null) {
|
if (proc == null) {
|
||||||
throw new IllegalStateException("Didn't create per-package process");
|
throw new IllegalStateException("Didn't create per-package process");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user