Fix issue #11790471: Crash removed home buttons and notification bar/shade
Whoops persistent processes are, well, persistent. Don't remove services from them. We'll be keeping that process record around. Change-Id: I29e9fb6f704efdf0caad5e0307a7adbb416eed3b
This commit is contained in:
@@ -1847,7 +1847,7 @@ public final class ActiveServices {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (finishing) {
|
if (finishing) {
|
||||||
if (r.app != null) {
|
if (r.app != null && !r.app.persistent) {
|
||||||
r.app.services.remove(r);
|
r.app.services.remove(r);
|
||||||
}
|
}
|
||||||
r.app = null;
|
r.app = null;
|
||||||
@@ -1930,8 +1930,10 @@ public final class ActiveServices {
|
|||||||
Slog.i(TAG, " Force stopping service " + service);
|
Slog.i(TAG, " Force stopping service " + service);
|
||||||
if (service.app != null) {
|
if (service.app != null) {
|
||||||
service.app.removed = true;
|
service.app.removed = true;
|
||||||
|
if (!service.app.persistent) {
|
||||||
service.app.services.remove(service);
|
service.app.services.remove(service);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
service.app = null;
|
service.app = null;
|
||||||
service.isolatedProc = null;
|
service.isolatedProc = null;
|
||||||
result.add(service);
|
result.add(service);
|
||||||
@@ -2032,7 +2034,7 @@ public final class ActiveServices {
|
|||||||
synchronized (sr.stats.getBatteryStats()) {
|
synchronized (sr.stats.getBatteryStats()) {
|
||||||
sr.stats.stopLaunchedLocked();
|
sr.stats.stopLaunchedLocked();
|
||||||
}
|
}
|
||||||
if (sr.app != null) {
|
if (sr.app != null && !sr.app.persistent) {
|
||||||
sr.app.services.remove(sr);
|
sr.app.services.remove(sr);
|
||||||
}
|
}
|
||||||
sr.app = null;
|
sr.app = null;
|
||||||
|
|||||||
Reference in New Issue
Block a user