Snap for 8902501 from a7b5051c8a5fc627c3fa20a8f45b832c28bf0277 to mainline-go-networking-release

Change-Id: Ibbe5c52e0fe1f5962b62c5d3a8a59f20b2f07158
diff --git a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
index bfe1945..296e18d 100644
--- a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
+++ b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java
@@ -192,7 +192,9 @@
 
         // Enable memory-mapped coverage if JaCoCo is in the boot classpath. system_server is
         // skipped due to being persistent and having its own coverage writing mechanism.
-        if (!isSystemServer && enableMemoryMappedDataMethod != null) {
+        // Child zygote processes are also skipped so that file descriptors are not kept open
+        // when the child zygote process forks again.
+        if (!isSystemServer && !isChildZygote && enableMemoryMappedDataMethod != null) {
           try {
             enableMemoryMappedDataMethod.invoke(null);
           } catch (ReflectiveOperationException e) {