From 3b8ca2e7ac72fd5c6d017f1bc6f4e4e031f593cf Mon Sep 17 00:00:00 2001 From: Martijn Coenen Date: Fri, 6 Sep 2019 11:52:40 +0200 Subject: [PATCH] Reconcile Zygote process name code with Q release. Some Zygote code that was pushed to AOSP master is different from the pushed Q release. In particular, a call to set the process name for a Zygote child was missing, causing an app zygote test to fail. Bug: 139535125 Test: atest android.app.cts.ServiceTest#testAppZygoteServices Change-Id: I53b0bc0116f1573cb1e52a998e10346bd5601f67 Merged-In: I2bce277ff8f2de4614e19d5385fe6712b076f9c9 --- core/java/com/android/internal/os/ZygoteConnection.java | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java index ad53eb9feeae1..c24ffb0c329b2 100644 --- a/core/java/com/android/internal/os/ZygoteConnection.java +++ b/core/java/com/android/internal/os/ZygoteConnection.java @@ -479,6 +479,10 @@ class ZygoteConnection { closeSocket(); + if (parsedArgs.mNiceName != null) { + Process.setArgV0(parsedArgs.mNiceName); + } + // End of the postFork event. Trace.traceEnd(Trace.TRACE_TAG_ACTIVITY_MANAGER); if (parsedArgs.mInvokeWith != null) {