More on issue #12031685 (DO NOT MERGE)
Integrate from master: Fix issue #13065185: Frequent runtime restarts on launching... ..."Hill Climb Racing" app A service is in use when it is in the restarting state. Change-Id: Iffdea96f867f89089e7ad07b4b1bef056951a5e8
This commit is contained in:
@ -1004,7 +1004,7 @@ public final class ProcessStats implements Parcelable {
|
|||||||
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() || ps.mCommonProcess.isInUse()) {
|
if (ps.isInUse() || ps.mCommonProcess.isInUse()) {
|
||||||
pkgState.mProcesses.valueAt(iproc).resetSafely(now);
|
ps.resetSafely(now);
|
||||||
} else {
|
} else {
|
||||||
pkgState.mProcesses.valueAt(iproc).makeDead();
|
pkgState.mProcesses.valueAt(iproc).makeDead();
|
||||||
pkgState.mProcesses.removeAt(iproc);
|
pkgState.mProcesses.removeAt(iproc);
|
||||||
@ -1013,7 +1013,7 @@ public final class ProcessStats implements Parcelable {
|
|||||||
for (int isvc=pkgState.mServices.size()-1; isvc>=0; isvc--) {
|
for (int isvc=pkgState.mServices.size()-1; isvc>=0; isvc--) {
|
||||||
ServiceState ss = pkgState.mServices.valueAt(isvc);
|
ServiceState ss = pkgState.mServices.valueAt(isvc);
|
||||||
if (ss.isInUse()) {
|
if (ss.isInUse()) {
|
||||||
pkgState.mServices.valueAt(isvc).resetSafely(now);
|
ss.resetSafely(now);
|
||||||
} else {
|
} else {
|
||||||
pkgState.mServices.removeAt(isvc);
|
pkgState.mServices.removeAt(isvc);
|
||||||
}
|
}
|
||||||
@ -3014,7 +3014,7 @@ public final class ProcessStats implements Parcelable {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isInUse() {
|
public boolean isInUse() {
|
||||||
return mOwner != null;
|
return mOwner != null || mRestarting;
|
||||||
}
|
}
|
||||||
|
|
||||||
void add(ServiceState other) {
|
void add(ServiceState other) {
|
||||||
|
Reference in New Issue
Block a user