summaryrefslogtreecommitdiff
path: root/libartservice
diff options
context:
space:
mode:
author Martin Stjernholm <mast@google.com> 2024-09-20 20:23:58 +0100
committer Treehugger Robot <android-test-infra-autosubmit@system.gserviceaccount.com> 2024-10-01 11:53:09 +0000
commitc4064f4d533d7808d34f275a9e4a3048a3f9f591 (patch)
tree62b86a747b3c8d107cf175dcba81731feb13b898 /libartservice
parentbc9bac28de1c16a7e8e2b44dfed09fdcb720005c (diff)
Add some logging to help debug pre-reboot dexopt.
Test: `atest ArtOtaPreRebootDexoptTest` with ag/29425344 Bug: 292998825 Change-Id: Id79cb35950e964e19a276722b0f9c26c7d15a9ab
Diffstat (limited to 'libartservice')
-rw-r--r--libartservice/service/java/com/android/server/art/ArtManagerLocal.java11
1 files changed, 11 insertions, 0 deletions
diff --git a/libartservice/service/java/com/android/server/art/ArtManagerLocal.java b/libartservice/service/java/com/android/server/art/ArtManagerLocal.java
index 8436fd1095..9442037890 100644
--- a/libartservice/service/java/com/android/server/art/ArtManagerLocal.java
+++ b/libartservice/service/java/com/android/server/art/ArtManagerLocal.java
@@ -881,6 +881,7 @@ public final class ArtManagerLocal {
public void onBoot(@NonNull @BootReason String bootReason,
@Nullable @CallbackExecutor Executor progressCallbackExecutor,
@Nullable Consumer<OperationProgress> progressCallback) {
+ AsLog.d("onBoot: reason=" + bootReason);
try (var snapshot = mInjector.getPackageManagerLocal().withFilteredSnapshot()) {
if ((bootReason.equals(ReasonMapping.REASON_BOOT_AFTER_OTA)
|| bootReason.equals(ReasonMapping.REASON_BOOT_AFTER_MAINLINE_UPDATE))
@@ -910,10 +911,13 @@ public final class ArtManagerLocal {
*/
@RequiresApi(Build.VERSION_CODES.UPSIDE_DOWN_CAKE)
void systemReady() {
+ AsLog.d("systemReady: mShouldCommitPreRebootStagedFiles="
+ + mShouldCommitPreRebootStagedFiles);
if (mShouldCommitPreRebootStagedFiles) {
mInjector.getContext().registerReceiver(new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
+ AsLog.d("systemReady.onReceive");
context.unregisterReceiver(this);
if (!SdkLevel.isAtLeastV()) {
throw new IllegalStateException("Broadcast receiver unexpectedly called");
@@ -923,6 +927,8 @@ public final class ArtManagerLocal {
}
mStatsAfterRebootSession.reportAsync();
mStatsAfterRebootSession = null;
+ // OtaPreRebootDexoptTest looks for this log message.
+ AsLog.d("Pre-reboot staged files committed");
}
}, new IntentFilter(Intent.ACTION_BOOT_COMPLETED));
}
@@ -942,6 +948,7 @@ public final class ArtManagerLocal {
*/
@RequiresApi(Build.VERSION_CODES.VANILLA_ICE_CREAM)
public void onApexStaged(@NonNull String[] stagedApexModuleNames) {
+ AsLog.d("onApexStaged");
mInjector.getPreRebootDexoptJob().onUpdateReady(null /* otaSlot */);
}
@@ -1126,6 +1133,10 @@ public final class ArtManagerLocal {
if (!Utils.canDexoptPackage(pkgState, null /* appHibernationManager */)) {
continue;
}
+
+ AsLog.d("commitPreRebootStagedFiles " + (forSecondary ? "secondary" : "primary")
+ + " for " + pkgState.getPackageName());
+
AndroidPackage pkg = Utils.getPackageOrThrow(pkgState);
var options = ArtFileManager.Options.builder()
.setForPrimaryDex(!forSecondary)