From f13e473ee1eedc36acf60b0ea9e79e81d1df2a69 Mon Sep 17 00:00:00 2001 From: Andreas Gampe Date: Tue, 1 May 2018 12:10:54 -0700 Subject: [PATCH] Framework: Restrict warning message Only print the message of the cache wasn't pruned. Bug: 26978865 Test: manual Change-Id: I564ecddf6c8fafcc9699ec6bfbd622214edf79c8 --- .../com/android/server/am/ActivityManagerService.java | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/services/core/java/com/android/server/am/ActivityManagerService.java b/services/core/java/com/android/server/am/ActivityManagerService.java index 7cfc8af600df7..7da3adb684a2a 100644 --- a/services/core/java/com/android/server/am/ActivityManagerService.java +++ b/services/core/java/com/android/server/am/ActivityManagerService.java @@ -7290,8 +7290,13 @@ public class ActivityManagerService extends IActivityManager.Stub try { mInstaller.markBootComplete(VMRuntime.getInstructionSet(abi)); } catch (InstallerException e) { - Slog.w(TAG, "Unable to mark boot complete for abi: " + abi + " (" + - e.getMessage() +")"); + if (!VMRuntime.didPruneDalvikCache()) { + // This is technically not the right filter, as different zygotes may + // have made different pruning decisions. But the log is best effort, + // anyways. + Slog.w(TAG, "Unable to mark boot complete for abi: " + abi + " (" + + e.getMessage() +")"); + } } completedIsas.add(instructionSet); }