diff options
| author | 2018-02-13 16:31:53 +0000 | |
|---|---|---|
| committer | 2018-02-13 16:31:53 +0000 | |
| commit | 78d15fd15aa8809c26cd335b5eaaf688a148b037 (patch) | |
| tree | 5ab382d6510e2e70ee601dfd944f0239a8e48a22 | |
| parent | 8fe8f5fa9b9ff45510f7c601f3e1031098071df7 (diff) | |
| parent | c0c9f53175f460b7451d1b18ee0f73b24e5a2e77 (diff) | |
Merge "fix misleading FATAL EXCEPTION IN SYSTEM PROCESS log"
am: c0c9f53175
Change-Id: I25f1aad9e04c22e0cd4ffc848a53c30dd740bdac
| -rw-r--r-- | core/java/com/android/internal/os/RuntimeInit.java | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/core/java/com/android/internal/os/RuntimeInit.java b/core/java/com/android/internal/os/RuntimeInit.java index 66475e445efa..895be082c679 100644 --- a/core/java/com/android/internal/os/RuntimeInit.java +++ b/core/java/com/android/internal/os/RuntimeInit.java @@ -71,10 +71,11 @@ public class RuntimeInit { public void uncaughtException(Thread t, Throwable e) { // Don't re-enter if KillApplicationHandler has already run if (mCrashing) return; - if (mApplicationObject == null) { - // The "FATAL EXCEPTION" string is still used on Android even though - // apps can set a custom UncaughtExceptionHandler that renders uncaught - // exceptions non-fatal. + + // mApplicationObject is null for non-zygote java programs (e.g. "am") + // There are also apps running with the system UID. We don't want the + // first clause in either of these two cases, only for system_server. + if (mApplicationObject == null && (Process.SYSTEM_UID == Process.myUid())) { Clog_e(TAG, "*** FATAL EXCEPTION IN SYSTEM PROCESS: " + t.getName(), e); } else { StringBuilder message = new StringBuilder(); |