Merge "[ActivityManager] Do not add service to reschedule after removing users."

This commit is contained in:
Olawale Ogunwale
2015-04-07 03:36:29 +00:00
committed by Gerrit Code Review

View File

@@ -2228,7 +2228,7 @@ public final class ActiveServices {
EventLog.writeEvent(EventLogTags.AM_SERVICE_CRASHED_TOO_MUCH,
sr.userId, sr.crashCount, sr.shortName, app.pid);
bringDownServiceLocked(sr);
} else if (!allowRestart) {
} else if (!allowRestart || !mAm.isUserRunningLocked(sr.userId, false)) {
bringDownServiceLocked(sr);
} else {
boolean canceled = scheduleServiceRestartLocked(sr, true);