Merge "Notify the ART runtime when boot is complete." am: f83748ae28 am: 6b9ab57b2d
am: ed22d5f05c
Change-Id: I88c5ab8807446464854d59f95ffc2877fa6aa963
This commit is contained in:
@@ -741,6 +741,31 @@ public class ZygoteProcess {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Notify the Zygote processes that boot completed.
|
||||
*/
|
||||
public void bootCompleted() {
|
||||
// Notify both the 32-bit and 64-bit zygote.
|
||||
if (Build.SUPPORTED_32_BIT_ABIS.length > 0) {
|
||||
bootCompleted(Build.SUPPORTED_32_BIT_ABIS[0]);
|
||||
}
|
||||
if (Build.SUPPORTED_64_BIT_ABIS.length > 0) {
|
||||
bootCompleted(Build.SUPPORTED_64_BIT_ABIS[0]);
|
||||
}
|
||||
}
|
||||
|
||||
private void bootCompleted(String abi) {
|
||||
try {
|
||||
synchronized (mLock) {
|
||||
ZygoteState state = openZygoteSocketIfNeeded(abi);
|
||||
state.mZygoteOutputWriter.write("1\n--boot-completed\n");
|
||||
state.mZygoteOutputWriter.flush();
|
||||
}
|
||||
} catch (Exception ex) {
|
||||
throw new RuntimeException("Failed to inform zygote of boot_completed", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Push hidden API blacklisting exemptions into the zygote process(es).
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user