OSDN Git Service

Fix nativeProcs being null.
authorMartijn Coenen <maco@google.com>
Mon, 27 Mar 2017 19:45:19 +0000 (12:45 -0700)
committerSteven Moreland <smoreland@google.com>
Mon, 27 Mar 2017 21:01:34 +0000 (21:01 +0000)
dumpStackTraces originally checked this. This only happens when a silent
ANR is triggerred on a process name not in NATIVE_STACKS_OF_INTEREST.

Bug: 36414311
Bug: 36652737
Test: manual
Change-Id: I24402fb2ef2e08482f866dc1086ce83c1365d7ec

services/core/java/com/android/server/am/AppErrors.java

index 7b1af38..c10f77c 100644 (file)
@@ -870,7 +870,7 @@ class AppErrors {
             nativeProcs = NATIVE_STACKS_OF_INTEREST;
         }
 
-        int[] pids = Process.getPidsForCommands(nativeProcs);
+        int[] pids = nativeProcs == null ? null : Process.getPidsForCommands(nativeProcs);
         ArrayList<Integer> nativePids = null;
 
         if (pids != null) {