summaryrefslogtreecommitdiffstats
path: root/services
diff options
context:
space:
mode:
authoryounghwan1.kim <younghwan1.kim@lge.com>2015-04-02 19:15:11 +0900
committeryounghwan1.kim <younghwan1.kim@lge.com>2015-04-03 08:08:30 +0900
commitcd005ebf76d9bde584987be4690b128f687bc46d (patch)
treee4e98891ee921f94e7e4cc46e27c10d6240bf0b4 /services
parent64c8a07345cb7cb01b3e98442b52c51d473fbf2d (diff)
downloadframeworks_base-cd005ebf76d9bde584987be4690b128f687bc46d.zip
frameworks_base-cd005ebf76d9bde584987be4690b128f687bc46d.tar.gz
frameworks_base-cd005ebf76d9bde584987be4690b128f687bc46d.tar.bz2
[ActivityManager] Do not add service to reschedule after removing users.
Some service which has persistent attribute has restarted again and again after removing users. but it dies right after launching because it is not valid in owner mode. This patch will check service's userId whether userId is alive or not. And then if userId is not alive, then service will bring down. Change-Id: Id99bf3c651b88e377f1fd6bec8aaad81318d7579
Diffstat (limited to 'services')
-rwxr-xr-xservices/core/java/com/android/server/am/ActiveServices.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/services/core/java/com/android/server/am/ActiveServices.java b/services/core/java/com/android/server/am/ActiveServices.java
index 059dde1..dcd0222 100755
--- a/services/core/java/com/android/server/am/ActiveServices.java
+++ b/services/core/java/com/android/server/am/ActiveServices.java
@@ -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);