summaryrefslogtreecommitdiff
path: root/core/java
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-04-11 18:33:00 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-11 18:33:00 +0000
commit97953b308f9159a73061ae047e368eac503c1931 (patch)
tree3f9c7963157ce28899d1de082cf9405bf4c76419 /core/java
parent70bba904fc50f44cb4a695cf76e423534c835cf6 (diff)
parent4f4892d00aab13975a8aed000f84ae0320355fd7 (diff)
am 4f4892d0: Merge "Workaround 64 bit devices that don\'t have zygotes yet."
* commit '4f4892d00aab13975a8aed000f84ae0320355fd7': Workaround 64 bit devices that don't have zygotes yet.
Diffstat (limited to 'core/java')
-rw-r--r--core/java/android/os/Process.java12
1 files changed, 11 insertions, 1 deletions
diff --git a/core/java/android/os/Process.java b/core/java/android/os/Process.java
index 10ff27eb38f8..96f42ccdeaa7 100644
--- a/core/java/android/os/Process.java
+++ b/core/java/android/os/Process.java
@@ -372,7 +372,7 @@ public class Process {
for (int i = 0; i < tries; i++) {
if (i > 0) {
try {
- Log.i("Zygote", "Zygote not up yet, sleeping...");
+ Log.i(LOG_TAG, "Zygote not up yet, sleeping...");
Thread.sleep(ZYGOTE_RETRY_MILLIS);
} catch (InterruptedException ex) {
throw new ZygoteStartFailedEx(ex);
@@ -707,6 +707,16 @@ public class Process {
return primaryZygoteState;
}
+ // TODO: Get rid of this. This is a temporary workaround until all the
+ // compilation related pieces for the dual zygote stack are ready.
+ // b/3647418.
+ if (System.getenv("ANDROID_SOCKET_" + SECONDARY_ZYGOTE_SOCKET) == null) {
+ Log.e(LOG_TAG, "Forcing app to primary zygote, secondary unavailable (ABI= " + abi + ")");
+ // Should be :
+ // throw new ZygoteStartFailedEx("Unsupported zygote ABI: " + abi);
+ return primaryZygoteState;
+ }
+
// The primary zygote didn't match. Try the secondary.
if (secondaryZygoteState == null || secondaryZygoteState.isClosed()) {
secondaryZygoteState = ZygoteState.connect(SECONDARY_ZYGOTE_SOCKET,