Add metadata hash to LocalTransport logs
e.g https://paste.googleplex.com/5891511475503104 Bug:268471749 Test: 1. Turn on logging of the events to logcat (adb shell settings put secure backup_local_transport_parameters "log_agent_results=true") 2. Run backup for wallpaper (adb shell bmgr backupnow com.android.wallpaperbackup) 3. Verify metadata hash is included in logcat (adb logcat -s LocalTransport) Change-Id: I256e9cead21f01ea9f68a18e5262326d4b4a1f07
This commit is contained in:
@@ -21,7 +21,6 @@ import android.app.backup.BackupAgent;
|
||||
import android.app.backup.BackupDataInput;
|
||||
import android.app.backup.BackupDataOutput;
|
||||
import android.app.backup.BackupManagerMonitor;
|
||||
import android.app.backup.BackupRestoreEventLogger;
|
||||
import android.app.backup.BackupRestoreEventLogger.DataTypeResult;
|
||||
import android.app.backup.BackupTransport;
|
||||
import android.app.backup.RestoreDescription;
|
||||
@@ -48,6 +47,7 @@ import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
|
||||
/**
|
||||
@@ -915,6 +915,7 @@ public class LocalTransport extends BackupTransport {
|
||||
Log.i(TAG, "\tdataType: " + result.getDataType());
|
||||
Log.i(TAG, "\tsuccessCount: " + result.getSuccessCount());
|
||||
Log.i(TAG, "\tfailCount: " + result.getFailCount());
|
||||
Log.i(TAG, "\tmetadataHash: " + Arrays.toString(result.getMetadataHash()));
|
||||
|
||||
if (!result.getErrors().isEmpty()) {
|
||||
Log.i(TAG, "\terrors {");
|
||||
|
||||
Reference in New Issue
Block a user