Merge "Avoid IOB while bringDownDisabledPackageServicesLocked()" am: 4e46c416a0 am: 992a2bb968
Change-Id: I4328a5b9d25f061839856f0758de516ea01ebaf5
This commit is contained in:
@@ -272,6 +272,7 @@ public final class ActiveServices {
|
|||||||
|
|
||||||
static final int MSG_BG_START_TIMEOUT = 1;
|
static final int MSG_BG_START_TIMEOUT = 1;
|
||||||
static final int MSG_UPDATE_FOREGROUND_APPS = 2;
|
static final int MSG_UPDATE_FOREGROUND_APPS = 2;
|
||||||
|
static final int MSG_ENSURE_NOT_START_BG = 3;
|
||||||
|
|
||||||
ServiceMap(Looper looper, int userId) {
|
ServiceMap(Looper looper, int userId) {
|
||||||
super(looper);
|
super(looper);
|
||||||
@@ -289,6 +290,11 @@ public final class ActiveServices {
|
|||||||
case MSG_UPDATE_FOREGROUND_APPS: {
|
case MSG_UPDATE_FOREGROUND_APPS: {
|
||||||
updateForegroundApps(this);
|
updateForegroundApps(this);
|
||||||
} break;
|
} break;
|
||||||
|
case MSG_ENSURE_NOT_START_BG: {
|
||||||
|
synchronized (mAm) {
|
||||||
|
rescheduleDelayedStartsLocked();
|
||||||
|
}
|
||||||
|
} break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -296,7 +302,9 @@ public final class ActiveServices {
|
|||||||
if (mStartingBackground.remove(r)) {
|
if (mStartingBackground.remove(r)) {
|
||||||
if (DEBUG_DELAYED_STARTS) Slog.v(TAG_SERVICE,
|
if (DEBUG_DELAYED_STARTS) Slog.v(TAG_SERVICE,
|
||||||
"No longer background starting: " + r);
|
"No longer background starting: " + r);
|
||||||
rescheduleDelayedStartsLocked();
|
removeMessages(MSG_ENSURE_NOT_START_BG);
|
||||||
|
Message msg = obtainMessage(MSG_ENSURE_NOT_START_BG);
|
||||||
|
sendMessage(msg);
|
||||||
}
|
}
|
||||||
if (mDelayedStartList.remove(r)) {
|
if (mDelayedStartList.remove(r)) {
|
||||||
if (DEBUG_DELAYED_STARTS) Slog.v(TAG_SERVICE, "No longer delaying start: " + r);
|
if (DEBUG_DELAYED_STARTS) Slog.v(TAG_SERVICE, "No longer delaying start: " + r);
|
||||||
|
|||||||
Reference in New Issue
Block a user