summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2014-04-11 18:44:31 +0100
committerNarayan Kamath <narayan@google.com>2014-04-11 19:24:53 +0100
commit2d84a406bfc69eaad952078b01c3d5c76a489b41 (patch)
tree77fa55baad342591568747c791bb27431a1efdb9 /core
parentb093e485bbd790cc4d9678451c8cce4d361c2cf2 (diff)
downloadframeworks_base-2d84a406bfc69eaad952078b01c3d5c76a489b41.zip
frameworks_base-2d84a406bfc69eaad952078b01c3d5c76a489b41.tar.gz
frameworks_base-2d84a406bfc69eaad952078b01c3d5c76a489b41.tar.bz2
Workaround 64 bit devices that don't have zygotes yet.
This can be fixed by tweaking their BoardConfig as well, but that leads to all sorts of other problems. For now, fall back to the primary zygote if the secondary is unavailable. This will fail if shared libraries for the primary zygote ABI are unavailable, but that won't be the case just yet. bug: 13970103 Change-Id: Ifa107e43ca95023d57a0d9c641e4fddaccd9a888
Diffstat (limited to 'core')
-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 10ff27e..96f42cc 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,