From 4c3fa27e4959bb8b9463484f6f631619b2936b61 Mon Sep 17 00:00:00 2001 From: Stanislav Zholnin Date: Thu, 20 May 2021 14:37:38 +0100 Subject: [PATCH] Change logs level for "Interaction before persistence initialized" message. For AppOp counters increments change log level to verbose For queries to HistoricalRegistry and test related methods change log level to debug. Test: manually verified Fix: 188388230 Change-Id: I0a6e07c3a27cc9d23be6dd914c1abb394d1b8c83 --- .../android/server/appop/HistoricalRegistry.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/services/core/java/com/android/server/appop/HistoricalRegistry.java b/services/core/java/com/android/server/appop/HistoricalRegistry.java index 0ab6c4a17032c..8b72be78a7f66 100644 --- a/services/core/java/com/android/server/appop/HistoricalRegistry.java +++ b/services/core/java/com/android/server/appop/HistoricalRegistry.java @@ -491,7 +491,7 @@ final class HistoricalRegistry { synchronized (mInMemoryLock) { if (mMode == AppOpsManager.HISTORICAL_MODE_ENABLED_ACTIVE) { if (!isPersistenceInitializedMLocked()) { - Slog.e(LOG_TAG, "Interaction before persistence initialized"); + Slog.v(LOG_TAG, "Interaction before persistence initialized"); return; } getUpdatedPendingHistoricalOpsMLocked( @@ -509,7 +509,7 @@ final class HistoricalRegistry { synchronized (mInMemoryLock) { if (mMode == AppOpsManager.HISTORICAL_MODE_ENABLED_ACTIVE) { if (!isPersistenceInitializedMLocked()) { - Slog.e(LOG_TAG, "Interaction before persistence initialized"); + Slog.v(LOG_TAG, "Interaction before persistence initialized"); return; } getUpdatedPendingHistoricalOpsMLocked( @@ -525,7 +525,7 @@ final class HistoricalRegistry { synchronized (mInMemoryLock) { if (mMode == AppOpsManager.HISTORICAL_MODE_ENABLED_ACTIVE) { if (!isPersistenceInitializedMLocked()) { - Slog.e(LOG_TAG, "Interaction before persistence initialized"); + Slog.v(LOG_TAG, "Interaction before persistence initialized"); return; } getUpdatedPendingHistoricalOpsMLocked( @@ -604,7 +604,7 @@ final class HistoricalRegistry { final List pendingWrites; synchronized (mInMemoryLock) { if (!isPersistenceInitializedMLocked()) { - Slog.e(LOG_TAG, "Interaction before persistence initialized"); + Slog.d(LOG_TAG, "Interaction before persistence initialized"); return; } // The history files start from mBaseSnapshotInterval - take this into account. @@ -623,7 +623,7 @@ final class HistoricalRegistry { void resetHistoryParameters() { if (!isPersistenceInitializedMLocked()) { - Slog.e(LOG_TAG, "Interaction before persistence initialized"); + Slog.d(LOG_TAG, "Interaction before persistence initialized"); return; } setHistoryParameters(DEFAULT_MODE, DEFAULT_SNAPSHOT_INTERVAL_MILLIS, @@ -635,7 +635,7 @@ final class HistoricalRegistry { synchronized (mOnDiskLock) { synchronized (mInMemoryLock) { if (!isPersistenceInitializedMLocked()) { - Slog.e(LOG_TAG, "Interaction before persistence initialized"); + Slog.d(LOG_TAG, "Interaction before persistence initialized"); return; } if (mMode != AppOpsManager.HISTORICAL_MODE_ENABLED_ACTIVE) { @@ -668,7 +668,7 @@ final class HistoricalRegistry { synchronized (mOnDiskLock) { synchronized (mInMemoryLock) { if (!isPersistenceInitializedMLocked()) { - Slog.e(LOG_TAG, "Interaction before persistence initialized"); + Slog.d(LOG_TAG, "Interaction before persistence initialized"); return; } clearHistoryOnDiskDLocked();