Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit be112773 authored by George Chan's avatar George Chan Committed by Android (Google) Code Review
Browse files

Merge "Updated collectAppInfo to handle case where Android package removed...

Merge "Updated collectAppInfo to handle case where Android package removed uninstalled before BTS has a chance to measure the package split." into main
parents accd8333 0f0ecabf
Loading
Loading
Loading
Loading
+20 −9
Original line number Diff line number Diff line
@@ -228,6 +228,7 @@ public class BinaryTransparencyService extends SystemService {
                    computePackageSignerSha256Digests(packageState.getSigningInfo());

            AndroidPackage pkg = packageState.getAndroidPackage();
            if(pkg != null) {
                for (AndroidPackageSplit split : pkg.getSplits()) {
                    var appInfo = new IBinaryTransparencyService.AppInfo();
                    appInfo.packageName = packageName;
@@ -244,6 +245,16 @@ public class BinaryTransparencyService extends SystemService {

                    results.add(appInfo);
                }
            } else {
                Slog.w(TAG, packageName + " APK file is not physically present,"
                    + " skipping split and digest measurement");
                var appInfo = new IBinaryTransparencyService.AppInfo();
                appInfo.packageName = packageName;
                appInfo.longVersion = versionCode;
                appInfo.signerDigests = signerDigests;
                appInfo.mbaStatus = mbaStatus;
                results.add(appInfo);
            }

            // InstallSourceInfo is only available per package name, so store it only on the base
            // APK. It's not current currently available in PackageState (there's a TODO), to we