Merge "zygote: respond and wait for reply to --boot-completed."
This commit is contained in:
@@ -760,6 +760,7 @@ public class ZygoteProcess {
|
|||||||
ZygoteState state = openZygoteSocketIfNeeded(abi);
|
ZygoteState state = openZygoteSocketIfNeeded(abi);
|
||||||
state.mZygoteOutputWriter.write("1\n--boot-completed\n");
|
state.mZygoteOutputWriter.write("1\n--boot-completed\n");
|
||||||
state.mZygoteOutputWriter.flush();
|
state.mZygoteOutputWriter.flush();
|
||||||
|
state.mZygoteInputStream.readInt();
|
||||||
}
|
}
|
||||||
} catch (Exception ex) {
|
} catch (Exception ex) {
|
||||||
throw new RuntimeException("Failed to inform zygote of boot_completed", ex);
|
throw new RuntimeException("Failed to inform zygote of boot_completed", ex);
|
||||||
|
|||||||
@@ -305,6 +305,12 @@ class ZygoteConnection {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void handleBootCompleted() {
|
private void handleBootCompleted() {
|
||||||
|
try {
|
||||||
|
mSocketOutStream.writeInt(0);
|
||||||
|
} catch (IOException ioe) {
|
||||||
|
throw new IllegalStateException("Error writing to command socket", ioe);
|
||||||
|
}
|
||||||
|
|
||||||
VMRuntime.bootCompleted();
|
VMRuntime.bootCompleted();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user