From dc94b2973f76f1a2fa743353759154210306a0cf Mon Sep 17 00:00:00 2001 From: yuanhuihui Date: Thu, 22 Sep 2016 18:17:16 +0800 Subject: [PATCH] [ActivityManager] Reset killed flag at attachApplicationLocked A restarted process will reuse original process record. If only reset KilledByAm flag, not reset Killed flag. When app process have been killed by AMS can skip unnessary ANR, but not catch lowmemorykiller in AppErrors.appNotResponding() Change-Id: Ie4653edf4252797eaeefbf9a4a35ac00cfa857d8 Signed-off-by: yuanhuihui --- .../core/java/com/android/server/am/ActivityManagerService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 08b204af7fe71..7ac139f62f45a 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -6427,6 +6427,8 @@ public final class ActivityManagerService extends ActivityManagerNative app.debugging = false; app.cached = false; app.killedByAm = false; + app.killed = false; + // We carefully use the same state that PackageManager uses for // filtering, since we use this flag to decide if we need to install