summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorandroid-build-team Robot <android-build-team-robot@google.com>2020-04-07 23:06:04 +0000
committerandroid-build-team Robot <android-build-team-robot@google.com>2020-04-07 23:06:04 +0000
commitf584af3e891a3fac14ece3f38337c4e9d087e0b1 (patch)
tree754ea6747d45cdabdd0627e11c2ed578ebf4e976
parent7a719b39ca1cd63acce3473fb3c485c01ee55fc6 (diff)
parent83ba0672a19643a420183cb9940c13eec3e9d3e1 (diff)
downloadcts-android10-qpr3-release.tar.gz
Change-Id: Ia39bfc0db4f5b19884a183045f46c9df6006db8c
-rw-r--r--common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PackageDeviceInfo.java4
1 files changed, 4 insertions, 0 deletions
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 5fc72f05fb1..65b8d7507cf 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.content.pm.PermissionInfo;
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 @@ public class PackageDeviceInfo extends DeviceInfo {
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 @@ public class PackageDeviceInfo extends DeviceInfo {
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"