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

Commit 916368df authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "BinaryTransparencyService: Log new atom to Westworld."

parents 45d095b8 00001111
Loading
Loading
Loading
Loading
+10 −10
Original line number Diff line number Diff line
@@ -310,18 +310,19 @@ public class BinaryTransparencyService extends SystemService {
                Bundle packageMeasurement = measurePackage(packageInfo);
                results.add(packageMeasurement);

                if (record) {
                if (record && (mba_status == MBA_STATUS_UPDATED_PRELOAD)) {
                    // compute digests of signing info
                    String[] signerDigestHexStrings = computePackageSignerSha256Digests(
                            packageInfo.signingInfo);

                    // now we should have all the bits for the atom
                    /*  TODO: Uncomment and test after merging new atom definition.
                    byte[] cDigest = packageMeasurement.getByteArray(BUNDLE_CONTENT_DIGEST);
                    FrameworkStatsLog.write(FrameworkStatsLog.MOBILE_BUNDLED_APP_INFO_GATHERED,
                            packageInfo.packageName,
                            packageInfo.getLongVersionCode(),
                            HexEncoding.encodeToString(packageMeasurement.getByteArray(
                                    BUNDLE_CONTENT_DIGEST), false),
                            (cDigest != null) ? HexEncoding.encodeToString(
                                    packageMeasurement.getByteArray(BUNDLE_CONTENT_DIGEST),
                                    false) : null,
                            packageMeasurement.getInt(BUNDLE_CONTENT_DIGEST_ALGORITHM),
                            signerDigestHexStrings, // signer_cert_digest
                            mba_status,             // mba_status
@@ -330,7 +331,6 @@ public class BinaryTransparencyService extends SystemService {
                            null,                   // installer
                            null                    // originator
                    );
                     */
                }
            }
            if (DEBUG) {
@@ -377,12 +377,13 @@ public class BinaryTransparencyService extends SystemService {
                    }

                    // we should now have all the info needed for the atom
                    /*  TODO: Uncomment and test after merging new atom definition.
                    byte[] cDigest = packageMeasurement.getByteArray(BUNDLE_CONTENT_DIGEST);
                    FrameworkStatsLog.write(FrameworkStatsLog.MOBILE_BUNDLED_APP_INFO_GATHERED,
                            packageInfo.packageName,
                            packageInfo.getLongVersionCode(),
                            HexEncoding.encodeToString(packageMeasurement.getByteArray(
                                    BUNDLE_CONTENT_DIGEST), false),
                            (cDigest != null) ? HexEncoding.encodeToString(
                                    packageMeasurement.getByteArray(BUNDLE_CONTENT_DIGEST),
                                    false) : null,
                            packageMeasurement.getInt(BUNDLE_CONTENT_DIGEST_ALGORITHM),
                            signerDigestHexStrings,
                            MBA_STATUS_NEW_INSTALL,   // mba_status
@@ -391,7 +392,6 @@ public class BinaryTransparencyService extends SystemService {
                            installer,
                            originator
                    );
                     */
                }
            }
            if (DEBUG) {