Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d723dd91 authored by Treehugger Robot's avatar Treehugger Robot Committed by Automerger Merge Worker
Browse files

Merge "Fixed Handler Leak on WrapperInit" am: 9c7e15ab

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1495716

MUST ONLY BE SUBMITTED BY AUTOMERGER

Change-Id: I5070ec1f948d3fee3eacf5f6069417b8c7d7474a
parents 56f018b1 9c7e15ab
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -69,15 +69,16 @@ public class WrapperInit {
        // Tell the Zygote what our actual PID is (since it only knows about the
        // wrapper that it directly forked).
        if (fdNum != 0) {
            try {
            FileDescriptor fd = new FileDescriptor();
            try {
                fd.setInt$(fdNum);
                DataOutputStream os = new DataOutputStream(new FileOutputStream(fd));
                os.writeInt(Process.myPid());
                os.close();
                IoUtils.closeQuietly(fd);
            } catch (IOException ex) {
                Slog.d(TAG, "Could not write pid of wrapped process to Zygote pipe.", ex);
            } finally {
                IoUtils.closeQuietly(fd);
            }
        }