diff options
author | younghwan1.kim <younghwan1.kim@lge.com> | 2015-04-02 19:15:11 +0900 |
---|---|---|
committer | younghwan1.kim <younghwan1.kim@lge.com> | 2015-04-03 08:08:30 +0900 |
commit | cd005ebf76d9bde584987be4690b128f687bc46d (patch) | |
tree | e4e98891ee921f94e7e4cc46e27c10d6240bf0b4 /services | |
parent | 64c8a07345cb7cb01b3e98442b52c51d473fbf2d (diff) | |
download | frameworks_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-x | services/core/java/com/android/server/am/ActiveServices.java | 2 |
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); |