Collect ro.build.reference.fingerprint

Change-Id: I5967e7f9d4b6afaba1d7e3c2345ab8adb7b93650
diff --git a/tools/device-setup/TestDeviceSetup/Android.mk b/tools/device-setup/TestDeviceSetup/Android.mk
index 02c20d4..edb85d2 100644
--- a/tools/device-setup/TestDeviceSetup/Android.mk
+++ b/tools/device-setup/TestDeviceSetup/Android.mk
@@ -25,7 +25,8 @@
 LOCAL_DEX_PREOPT := false
 LOCAL_PROGUARD_ENABLED := disabled
 
-LOCAL_SDK_VERSION := current
+# uncomment when b/13282254 is fixed
+#LOCAL_SDK_VERSION := current
 
 LOCAL_PACKAGE_NAME := TestDeviceSetup
 
diff --git a/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoConstants.java b/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoConstants.java
index 856ba0f..c336d3c 100644
--- a/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoConstants.java
+++ b/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoConstants.java
@@ -76,4 +76,6 @@
     public static final String MEMORY_CLASS = "memory_class";
     public static final String LARGE_MEMORY_CLASS = "large_memory_class";
     public static final String TOTAL_MEMORY = "total_memory";
+    public static final String REFERENCE_BUILD_FINGERPRINT =
+            "reference_build_fingerprint";
 }
diff --git a/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoInstrument.java b/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoInstrument.java
index e565770..37f8558 100644
--- a/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoInstrument.java
+++ b/tools/device-setup/TestDeviceSetup/src/android/tests/getinfo/DeviceInfoInstrument.java
@@ -29,6 +29,7 @@
 import android.os.Bundle;
 import android.os.Environment;
 import android.os.UserManager;
+import android.os.SystemProperties;
 import android.telephony.TelephonyManager;
 import android.text.TextUtils;
 import android.util.DisplayMetrics;
@@ -80,6 +81,9 @@
         addResult(BUILD_ABIS_64, TextUtils.join(",", Build.SUPPORTED_64_BIT_ABIS));
         addResult(SERIAL_NUMBER, Build.SERIAL);
 
+        addResult(REFERENCE_BUILD_FINGERPRINT,
+            SystemProperties.get("ro.build.reference.fingerprint", ""));
+
         addResult(VERSION_RELEASE, Build.VERSION.RELEASE);
         addResult(VERSION_SDK, Build.VERSION.SDK);
         addResult(VERSION_BASE_OS, Build.VERSION.BASE_OS);
@@ -457,7 +461,7 @@
     private String getTotalMemory() {
         ActivityManager activityManager = (ActivityManager) getContext()
                 .getSystemService(Context.ACTIVITY_SERVICE);
-        
+
         MemoryInfo memoryInfo = new MemoryInfo();
         activityManager.getMemoryInfo(memoryInfo);
         return String.valueOf(memoryInfo.totalMem);