Merge "zygote: respond and wait for reply to --boot-completed." am: d34e18c036 am: 15f8fb42d6 am: 332a53756d

am: cca303ecd9

Change-Id: Iaf3ab6f8baa3cf1e57b546fc9d00b428ad2a6811
This commit is contained in:
Josh Gao
2019-10-03 11:18:38 -07:00
committed by android-build-merger
2 changed files with 7 additions and 0 deletions

View File

@@ -758,6 +758,7 @@ public class ZygoteProcess {
ZygoteState state = openZygoteSocketIfNeeded(abi);
state.mZygoteOutputWriter.write("1\n--boot-completed\n");
state.mZygoteOutputWriter.flush();
state.mZygoteInputStream.readInt();
}
} catch (Exception ex) {
throw new RuntimeException("Failed to inform zygote of boot_completed", ex);

View File

@@ -306,6 +306,12 @@ class ZygoteConnection {
}
private void handleBootCompleted() {
try {
mSocketOutStream.writeInt(0);
} catch (IOException ioe) {
throw new IllegalStateException("Error writing to command socket", ioe);
}
VMRuntime.bootCompleted();
}