From ea8b5de33dc4aa446cd22fd0e4a9253216ac4086 Mon Sep 17 00:00:00 2001 From: Christopher Ferris Date: Fri, 17 Jun 2016 15:29:58 -0700 Subject: [PATCH] Catch throwable exceptions. If the zygote dies early enough, certain exceptions disappear and never result in an error message in the log. Fix the code to catch all Throwable exceptions so that an error message does not result in a silent restart of the zygote. Bug: 29400363 Change-Id: Ib044006629ea4441728921f3c587d0cb295ec745 --- core/java/com/android/internal/os/ZygoteInit.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/java/com/android/internal/os/ZygoteInit.java b/core/java/com/android/internal/os/ZygoteInit.java index 9c960c04d4914..73a3a0be32e1e 100644 --- a/core/java/com/android/internal/os/ZygoteInit.java +++ b/core/java/com/android/internal/os/ZygoteInit.java @@ -753,7 +753,7 @@ public class ZygoteInit { closeServerSocket(); } catch (MethodAndArgsCaller caller) { caller.run(); - } catch (RuntimeException ex) { + } catch (Throwable ex) { Log.e(TAG, "Zygote died with exception", ex); closeServerSocket(); throw ex;