From a73b68fb856aa3563be7423e5f93314eddc7d144 Mon Sep 17 00:00:00 2001 From: Dianne Hackborn Date: Tue, 28 Jul 2015 17:22:46 -0700 Subject: Fix issue #22802617: APR: spurious wtf when restarting a persistent process Just don't do a wtf here, it isn't really wrong (though it isn't really right, but at this point in a release it is right enough!). Change-Id: Ic38a2e27556224cf8868f1fa18b4810929d67fcc --- services/core/java/com/android/server/am/ActivityManagerService.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index cf7ebe882f59..89e500e0432f 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -5840,7 +5840,10 @@ public final class ActivityManagerService extends ActivityManagerNative // We shouldn't already have a process under this name, but just in case we // need to clean up whatever may be there now. ProcessRecord old = removeProcessNameLocked(proc.processName, proc.uid); - if (old != null) { + if (old == proc && proc.persistent) { + // We are re-adding a persistent process. Whatevs! Just leave it there. + Slog.w(TAG, "Re-adding persistent process " + proc); + } else if (old != null) { Slog.wtf(TAG, "Already have existing proc " + old + " when adding " + proc); } UidRecord uidRec = mActiveUids.get(proc.uid); -- cgit v1.2.3-59-g8ed1b