am 08edf246: am 9a755e36: Merge "Frameworks/base: Hand fingerprint to ART" into mnc-dev

* commit '08edf246e97b60098a1e7c661b99412577f231f0':
  Frameworks/base: Hand fingerprint to ART
diff --git a/core/jni/AndroidRuntime.cpp b/core/jni/AndroidRuntime.cpp
index bffbab7..bae2cde 100644
--- a/core/jni/AndroidRuntime.cpp
+++ b/core/jni/AndroidRuntime.cpp
@@ -590,6 +590,7 @@
     char cpuAbiListBuf[sizeof("--cpu-abilist=") + PROPERTY_VALUE_MAX];
     char methodTraceFileBuf[sizeof("-Xmethod-trace-file:") + PROPERTY_VALUE_MAX];
     char methodTraceFileSizeBuf[sizeof("-Xmethod-trace-file-size:") + PROPERTY_VALUE_MAX];
+    char fingerprintBuf[sizeof("-Xfingerprint:") + PROPERTY_VALUE_MAX];
 
     bool checkJni = false;
     property_get("dalvik.vm.checkjni", propBuf, "");
@@ -908,6 +909,12 @@
         addOption("--generate-debug-info");
     }
 
+    /*
+     * Retrieve the build fingerprint and provide it to the runtime. That way, ANR dumps will
+     * contain the fingerprint and can be parsed.
+     */
+    parseRuntimeOption("ro.build.fingerprint", fingerprintBuf, "-Xfingerprint:");
+
     initArgs.version = JNI_VERSION_1_4;
     initArgs.options = mOptions.editArray();
     initArgs.nOptions = mOptions.size();