Merge "Remove "required" prefix from ABI fields."
diff --git a/cmds/app_process/Android.mk b/cmds/app_process/Android.mk
index 7c25354..74a2f7b 100644
--- a/cmds/app_process/Android.mk
+++ b/cmds/app_process/Android.mk
@@ -1,6 +1,5 @@
 LOCAL_PATH:= $(call my-dir)
 
-# 32-bit app_process
 include $(CLEAR_VARS)
 
 LOCAL_SRC_FILES:= \
@@ -15,10 +14,14 @@
 
 LOCAL_MODULE:= app_process
 LOCAL_MULTILIB := both
-LOCAL_MODULE_STEM_32 := app_process
+LOCAL_MODULE_STEM_32 := app_process32
 LOCAL_MODULE_STEM_64 := app_process64
 include $(BUILD_EXECUTABLE)
 
+# Create a symlink from app_process to app_process32 or 64
+# depending on the target configuration.
+include  $(BUILD_SYSTEM)/executable_prefer_symlink.mk
+
 # Build a variant of app_process binary linked with ASan runtime.
 # ARM-only at the moment.
 ifeq ($(TARGET_ARCH),arm)
diff --git a/core/java/android/os/Build.java b/core/java/android/os/Build.java
index 1bddc7a..a61c4f3 100644
--- a/core/java/android/os/Build.java
+++ b/core/java/android/os/Build.java
@@ -83,7 +83,8 @@
      *
      * @hide
      */
-    public static final String[] SUPPORTED_ABIS = getString("ro.product.cpu.abilist").split(",");
+    public static final String[] SUPPORTED_ABIS = SystemProperties.get("ro.product.cpu.abilist")
+            .split(",");
 
     /**
      * An ordered list of <b>32 bit</b> ABIs supported by this device. The most preferred ABI
@@ -93,8 +94,8 @@
      *
      * @hide
      */
-    public static final String[] SUPPORTED_32_BIT_ABIS = getString("ro.product.cpu.abilist32")
-            .split(",");
+    public static final String[] SUPPORTED_32_BIT_ABIS =
+            SystemProperties.get("ro.product.cpu.abilist32").split(",");
 
     /**
      * An ordered list of <b>64 bit</b> ABIs supported by this device. The most preferred ABI
@@ -104,8 +105,8 @@
      *
      * @hide
      */
-    public static final String[] SUPPORTED_64_BIT_ABIS = getString("ro.product.cpu.abilist64")
-            .split(",");
+    public static final String[] SUPPORTED_64_BIT_ABIS =
+            SystemProperties.get("ro.product.cpu.abilist64").split(",");
 
 
     /** Various version strings. */
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index 362a54e..fc6cc81 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -467,6 +467,7 @@
     char heapminfreeOptsBuf[sizeof("-XX:HeapMinFree=")-1 + PROPERTY_VALUE_MAX];
     char heapmaxfreeOptsBuf[sizeof("-XX:HeapMaxFree=")-1 + PROPERTY_VALUE_MAX];
     char gctypeOptsBuf[sizeof("-Xgc:")-1 + PROPERTY_VALUE_MAX];
+    char backgroundgcOptsBuf[sizeof("-XX:BackgroundGC=")-1 + PROPERTY_VALUE_MAX];
     char heaptargetutilizationOptsBuf[sizeof("-XX:HeapTargetUtilization=")-1 + PROPERTY_VALUE_MAX];
     char jitcodecachesizeOptsBuf[sizeof("-Xjitcodecachesize:")-1 + PROPERTY_VALUE_MAX];
     char dalvikVmLibBuf[PROPERTY_VALUE_MAX];
@@ -620,6 +621,13 @@
         mOptions.add(opt);
     }
 
+    strcpy(backgroundgcOptsBuf, "-XX:BackgroundGC=");
+    property_get("dalvik.vm.backgroundgctype", backgroundgcOptsBuf+sizeof("-XX:BackgroundGC=")-1, "");
+    if (backgroundgcOptsBuf[sizeof("-XX:BackgroundGC=")-1] != '\0') {
+        opt.optionString = backgroundgcOptsBuf;
+        mOptions.add(opt);
+    }
+
     /*
      * Enable or disable dexopt features, such as bytecode verification and
      * calculation of register maps for precise GC.
diff --git a/graphics/java/android/graphics/Rect.java b/graphics/java/android/graphics/Rect.java
index 8b5609f..437d2f4 100644
--- a/graphics/java/android/graphics/Rect.java
+++ b/graphics/java/android/graphics/Rect.java
@@ -36,9 +36,21 @@
     public int right;
     public int bottom;
 
-    private static final Pattern FLATTENED_PATTERN = Pattern.compile(
+    /**
+     * A helper class for flattened rectange pattern recognition. A separate
+     * class to avoid an initialization dependency on a regular expression
+     * causing Rect to not be initializable with an ahead-of-time compilation
+     * scheme.
+     */
+    private static final class UnflattenHelper {
+        private static final Pattern FLATTENED_PATTERN = Pattern.compile(
             "(-?\\d+) (-?\\d+) (-?\\d+) (-?\\d+)");
 
+        static Matcher getMatcher(String str) {
+            return FLATTENED_PATTERN.matcher(str);
+        }
+    }
+
     /**
      * Create a new empty Rect. All coordinates are initialized to 0.
      */
@@ -152,7 +164,7 @@
      * or null if the string is not of that form.
      */
     public static Rect unflattenFromString(String str) {
-        Matcher matcher = FLATTENED_PATTERN.matcher(str);
+        Matcher matcher = UnflattenHelper.getMatcher(str);
         if (!matcher.matches()) {
             return null;
         }