From 22b60d8fd055171d7abe6be60a24ea8ac1af25b0 Mon Sep 17 00:00:00 2001 From: Christopher Tate Date: Tue, 7 Jul 2009 16:36:02 -0700 Subject: [PATCH] Remove a lot of debug-log verbosity We now log in dataChanged() only when an app is added to the backup set (and *not* if it redundantly asks to be added after it's already there) and on error. --- .../android/server/BackupManagerService.java | 21 ++++++++----------- 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/services/java/com/android/server/BackupManagerService.java b/services/java/com/android/server/BackupManagerService.java index 1fd36d28a6cce..3b82284c0c4bc 100644 --- a/services/java/com/android/server/BackupManagerService.java +++ b/services/java/com/android/server/BackupManagerService.java @@ -1181,8 +1181,6 @@ class BackupManagerService extends IBackupManager.Stub { // may share a uid, we need to note all candidates within that uid and schedule // a backup pass for each of them. - Log.d(TAG, "dataChanged packageName=" + packageName); - // If the caller does not hold the BACKUP permission, it can only request a // backup of its own data. HashSet targets; @@ -1192,7 +1190,6 @@ class BackupManagerService extends IBackupManager.Stub { } else { // a caller with full permission can ask to back up any participating app // !!! TODO: allow backup of ANY app? - if (DEBUG) Log.v(TAG, "Privileged caller, allowing backup of other apps"); targets = new HashSet(); int N = mBackupParticipants.size(); for (int i = 0; i < N; i++) { @@ -1217,20 +1214,20 @@ class BackupManagerService extends IBackupManager.Stub { // operation returned null when this package was not already // in the set; we want to avoid touching the disk redundantly. writeToJournalLocked(packageName); - } - } - } - if (DEBUG) { - int numKeys = mPendingBackups.size(); - Log.d(TAG, "Now awaiting backup for " + numKeys + " participants:"); - for (BackupRequest b : mPendingBackups.values()) { - Log.d(TAG, " + " + b + " agent=" + b.appInfo.backupAgentName); + if (DEBUG) { + int numKeys = mPendingBackups.size(); + Log.d(TAG, "Now awaiting backup for " + numKeys + " participants:"); + for (BackupRequest b : mPendingBackups.values()) { + Log.d(TAG, " + " + b + " agent=" + b.appInfo.backupAgentName); + } + } + } } } } } else { - Log.w(TAG, "dataChanged but no participant pkg " + packageName); + Log.w(TAG, "dataChanged but no participant pkg='" + packageName + "'"); } }