Snap for 6373393 from 83ba0672a19643a420183cb9940c13eec3e9d3e1 to qt-qpr3-release

Change-Id: Ia39bfc0db4f5b19884a183045f46c9df6006db8c
diff --git a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PackageDeviceInfo.java b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PackageDeviceInfo.java
index 5fc72f0..65b8d75 100644
--- a/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PackageDeviceInfo.java
+++ b/common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PackageDeviceInfo.java
@@ -22,6 +22,7 @@
 import android.os.Build;
 import android.os.Process;
 import com.android.compatibility.common.util.DeviceInfoStore;
+import com.android.compatibility.common.util.PackageUtil;
 
 import java.io.IOException;
 import java.util.ArrayList;
@@ -52,6 +53,7 @@
     private static final String SHARES_INSTALL_PERMISSION = "shares_install_packages_permission";
     private static final String INSTALL_PACKAGES_PERMISSION = "android.permission.INSTALL_PACKAGES";
 
+    private static final String SHA256_CERT = "sha256_cert";
 
     @Override
     protected void collectDeviceInfo(DeviceInfoStore store) throws Exception {
@@ -96,6 +98,8 @@
                 final boolean canInstall = sharesUidWithInstallerPackage(pm, appInfo.uid);
                 store.addResult(SHARES_INSTALL_PERMISSION, canInstall);
             }
+            String sha256_cert = PackageUtil.computePackageSignatureDigest(pkg.packageName);
+            store.addResult(SHA256_CERT, sha256_cert);
             store.endGroup();
         }
         store.endArray(); // "package"