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

Commit dfc60ec5 authored by Dianne Hackborn's avatar Dianne Hackborn
Browse files

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: Ic92a6e7bcc24b01aeef5f97f994f105d5e11ea7f
parent 93b55c11
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -1018,7 +1018,7 @@ public final class ProcessStats implements Parcelable {
                    for (int iproc=pkgState.mProcesses.size()-1; iproc>=0; iproc--) {
                        final ProcessState ps = pkgState.mProcesses.valueAt(iproc);
                        if (ps.isInUse()) {
                            pkgState.mProcesses.valueAt(iproc).resetSafely(now);
                            ps.resetSafely(now);
                            ps.mCommonProcess.mTmpNumInUse++;
                            ps.mCommonProcess.mTmpFoundSubProc = ps;
                        } else {
@@ -1029,7 +1029,7 @@ public final class ProcessStats implements Parcelable {
                    for (int isvc=pkgState.mServices.size()-1; isvc>=0; isvc--) {
                        final ServiceState ss = pkgState.mServices.valueAt(isvc);
                        if (ss.isInUse()) {
                            pkgState.mServices.valueAt(isvc).resetSafely(now);
                            ss.resetSafely(now);
                        } else {
                            pkgState.mServices.removeAt(isvc);
                        }
@@ -3142,7 +3142,7 @@ public final class ProcessStats implements Parcelable {
        }

        public boolean isInUse() {
            return mOwner != null;
            return mOwner != null || mRestarting;
        }

        void add(ServiceState other) {