summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Martijn Coenen <maco@google.com> 2019-09-06 11:52:40 +0200
committer Ian Kasprzak <iankaz@google.com> 2019-11-14 23:48:14 +0000
commit0807f15ebaf739092472840cecb38703ecc76b7f (patch)
tree3164bed593a954e22c6822c5d22e2872396861cb
parent9aeaffb1fedda8887c0173b303a6f8487eb17ac8 (diff)
Re-land: Reconcile Zygote process name code with Q release.
Re-landing due to merge from staging branch reverting fix. 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: I9cb47cea2295dd6c7df16722d3bb474185b7dc6b Merged-In: Ice3eb966a88e6de5bc8834b60b54bcac31bf31db
-rw-r--r--core/java/com/android/internal/os/ZygoteConnection.java4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java
index 0d4ec41adf6e..b15e1efa46c8 100644
--- a/core/java/com/android/internal/os/ZygoteConnection.java
+++ b/core/java/com/android/internal/os/ZygoteConnection.java
@@ -485,6 +485,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) {