diff options
-rw-r--r-- | JavaLibrary.bp | 4 | ||||
-rw-r--r-- | dalvik/src/main/java/dalvik/system/ZygoteHooks.java | 4 | ||||
-rw-r--r-- | ojluni/src/main/java/java/util/concurrent/FutureTask.java | 5 |
3 files changed, 12 insertions, 1 deletions
diff --git a/JavaLibrary.bp b/JavaLibrary.bp index 79521ba1281..f070571623d 100644 --- a/JavaLibrary.bp +++ b/JavaLibrary.bp @@ -919,6 +919,10 @@ java_sdk_library { "//build/soong/java/core-libraries", "//frameworks/base", "//frameworks/base/api", + + // DO NOT REMOVE: Legacy visibility, needed for snapshots that are + // generated for the S build. + "//libcore/mmodules/core_platform_api", ], srcs: [ ":core_oj_api_files", diff --git a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java index bfe19454d07..296e18d3503 100644 --- a/dalvik/src/main/java/dalvik/system/ZygoteHooks.java +++ b/dalvik/src/main/java/dalvik/system/ZygoteHooks.java @@ -192,7 +192,9 @@ public final class ZygoteHooks { // 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) { diff --git a/ojluni/src/main/java/java/util/concurrent/FutureTask.java b/ojluni/src/main/java/java/util/concurrent/FutureTask.java index e913ef32a2d..426394428b3 100644 --- a/ojluni/src/main/java/java/util/concurrent/FutureTask.java +++ b/ojluni/src/main/java/java/util/concurrent/FutureTask.java @@ -507,10 +507,15 @@ public class FutureTask<V> implements RunnableFuture<V> { status = "[Cancelled]"; break; default: + // BEGIN Android-changed: recursion risk building string (b/241297967) + /* final Callable<?> callable = this.callable; status = (callable == null) ? "[Not completed]" : "[Not completed, task = " + callable + "]"; + */ + status = "[Not completed]"; + // END Android-changed: recursion risk building string (b/241297967) } return super.toString() + status; } |