diff options
author | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-07 23:06:04 +0000 |
---|---|---|
committer | android-build-team Robot <android-build-team-robot@google.com> | 2020-04-07 23:06:04 +0000 |
commit | f584af3e891a3fac14ece3f38337c4e9d087e0b1 (patch) | |
tree | 754ea6747d45cdabdd0627e11c2ed578ebf4e976 | |
parent | 7a719b39ca1cd63acce3473fb3c485c01ee55fc6 (diff) | |
parent | 83ba0672a19643a420183cb9940c13eec3e9d3e1 (diff) | |
download | cts-android10-qpr3-release.tar.gz |
Snap for 6373393 from 83ba0672a19643a420183cb9940c13eec3e9d3e1 to qt-qpr3-releaseandroid-10.0.0_r41android-10.0.0_r40android-10.0.0_r39android-10.0.0_r38android-10.0.0_r37android10-qpr3-s1-releaseandroid10-qpr3-release
Change-Id: Ia39bfc0db4f5b19884a183045f46c9df6006db8c
-rw-r--r-- | common/device-side/device-info/src/com/android/compatibility/common/deviceinfo/PackageDeviceInfo.java | 4 |
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" |