diff options
| author | 2019-10-03 11:18:38 -0700 | |
|---|---|---|
| committer | 2019-10-03 11:18:38 -0700 | |
| commit | 30641f56c6c32b9bb627a843935bcf5cac71841d (patch) | |
| tree | 47f975edf0899f4ed962b9b79c47554d09c1be51 | |
| parent | ed6096a2d2ad4a22c013783032ccba0cc7d37a4c (diff) | |
| parent | cca303ecd9fca99a0d23a4690c950e32c8664a88 (diff) | |
Merge "zygote: respond and wait for reply to --boot-completed." am: d34e18c036 am: 15f8fb42d6 am: 332a53756d
am: cca303ecd9
Change-Id: Iaf3ab6f8baa3cf1e57b546fc9d00b428ad2a6811
| -rw-r--r-- | core/java/android/os/ZygoteProcess.java | 1 | ||||
| -rw-r--r-- | core/java/com/android/internal/os/ZygoteConnection.java | 6 |
2 files changed, 7 insertions, 0 deletions
diff --git a/core/java/android/os/ZygoteProcess.java b/core/java/android/os/ZygoteProcess.java index 9a3a7cea42dd..907eae87bcb2 100644 --- a/core/java/android/os/ZygoteProcess.java +++ b/core/java/android/os/ZygoteProcess.java @@ -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); diff --git a/core/java/com/android/internal/os/ZygoteConnection.java b/core/java/com/android/internal/os/ZygoteConnection.java index b3ec5f56e75a..a14b09343a01 100644 --- a/core/java/com/android/internal/os/ZygoteConnection.java +++ b/core/java/com/android/internal/os/ZygoteConnection.java @@ -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(); } |