Loading services/core/java/com/android/server/BinaryTransparencyService.java +12 −2 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.Executors; import java.util.stream.Collectors; /** Loading Loading @@ -369,10 +370,13 @@ public class BinaryTransparencyService extends SystemService { // we are only interested in doing things at PHASE_BOOT_COMPLETED if (phase == PHASE_BOOT_COMPLETED) { // due to potentially long computation that holds up boot time, apex sha computations // are deferred to first call Slog.i(TAG, "Boot completed. Getting VBMeta Digest."); getVBMetaDigestInformation(); // due to potentially long computation that may hold up boot time, SHA256 computations // for APEXs and Modules will be executed via threads. Slog.i(TAG, "Executing APEX & Module digest computations"); computeApexAndModuleDigests(); } } Loading @@ -382,6 +386,12 @@ public class BinaryTransparencyService extends SystemService { FrameworkStatsLog.write(FrameworkStatsLog.VBMETA_DIGEST_REPORTED, mVbmetaDigest); } private void computeApexAndModuleDigests() { // using Executors will allow the computations to be done asynchronously, thus not holding // up boot time. Executors.defaultThreadFactory().newThread(() -> updateBinaryMeasurements()).start(); } @NonNull private List<PackageInfo> getInstalledApexs() { List<PackageInfo> results = new ArrayList<PackageInfo>(); Loading Loading
services/core/java/com/android/server/BinaryTransparencyService.java +12 −2 Original line number Diff line number Diff line Loading @@ -45,6 +45,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.concurrent.Executors; import java.util.stream.Collectors; /** Loading Loading @@ -369,10 +370,13 @@ public class BinaryTransparencyService extends SystemService { // we are only interested in doing things at PHASE_BOOT_COMPLETED if (phase == PHASE_BOOT_COMPLETED) { // due to potentially long computation that holds up boot time, apex sha computations // are deferred to first call Slog.i(TAG, "Boot completed. Getting VBMeta Digest."); getVBMetaDigestInformation(); // due to potentially long computation that may hold up boot time, SHA256 computations // for APEXs and Modules will be executed via threads. Slog.i(TAG, "Executing APEX & Module digest computations"); computeApexAndModuleDigests(); } } Loading @@ -382,6 +386,12 @@ public class BinaryTransparencyService extends SystemService { FrameworkStatsLog.write(FrameworkStatsLog.VBMETA_DIGEST_REPORTED, mVbmetaDigest); } private void computeApexAndModuleDigests() { // using Executors will allow the computations to be done asynchronously, thus not holding // up boot time. Executors.defaultThreadFactory().newThread(() -> updateBinaryMeasurements()).start(); } @NonNull private List<PackageInfo> getInstalledApexs() { List<PackageInfo> results = new ArrayList<PackageInfo>(); Loading