diff options
| author | 2009-05-14 14:53:27 -0700 | |
|---|---|---|
| committer | 2009-05-14 14:53:27 -0700 | |
| commit | 1d0ec01729f23e991243acf1b481f8cd9b7d27ef (patch) | |
| tree | 7c412e77bff1f37ceb3140afb70607df3be538ea | |
| parent | 89be15596ce6a360cdbeb16683ac6232934d59db (diff) | |
| parent | f910bd971257a89e4ff2e8baf041197d72f24e04 (diff) | |
am aa642c0c: Merge changes 1591,1596 into donut
Merge commit 'aa642c0cc20293137376d44f8221876c121e5be9'
* commit 'aa642c0cc20293137376d44f8221876c121e5be9':
Get the backup calling through to the file backup helper.
Fix typos.
Add a new feature to android.os.Debug to add the ability to inject only specific fields when calling setFieldsOn().
Fixes #1836075. Adds consistency checks for the View hierarchy. To enable them, you need a debug build and ViewDebug.sConsistencyCheckEnabled set to true in debug.prop. This change also lets you easily enable drawing and layout profiling in ViewRoot by setting ViewRoot.sProfileDrawing, ViewRoot.sProfileLayout and ViewRoot.sShowFps in debug.prop with a debug build.
Add Intent.ACTION_APP_ERROR
| -rw-r--r-- | include/utils/backup_helpers.h | 2 | ||||
| -rw-r--r-- | libs/utils/file_backup_helper.cpp | 15 |
2 files changed, 10 insertions, 7 deletions
diff --git a/include/utils/backup_helpers.h b/include/utils/backup_helpers.h index 61bee340db..137c5f1041 100644 --- a/include/utils/backup_helpers.h +++ b/include/utils/backup_helpers.h @@ -1,7 +1,7 @@ #ifndef _UTILS_BACKUP_HELPERS_H #define _UTILS_BACKUP_HELPERS_H -int back_up_files(int oldSnapshotFD, int newSnapshotFD, int oldDataStream, +int back_up_files(int oldSnapshotFD, int oldDataStream, int newSnapshotFD, char const* fileBase, char const* const* files, int fileCount); #define TEST_BACKUP_HELPERS 0 diff --git a/libs/utils/file_backup_helper.cpp b/libs/utils/file_backup_helper.cpp index 111f88d9f3..453084ace4 100644 --- a/libs/utils/file_backup_helper.cpp +++ b/libs/utils/file_backup_helper.cpp @@ -24,6 +24,9 @@ using namespace android; #define MAGIC0 0x70616e53 // Snap #define MAGIC1 0x656c6946 // File +#define LOGP(x...) LOGD(x) +//#define LOGP(x...) printf(x) + struct SnapshotHeader { int magic0; int fileCount; @@ -159,14 +162,14 @@ write_snapshot_file(int fd, const KeyedVector<String8,FileState>& snapshot) static int write_delete_file(const String8& key) { - printf("write_delete_file %s\n", key.string()); + LOGP("write_delete_file %s\n", key.string()); return 0; } static int write_update_file(const String8& realFilename, const String8& key) { - printf("write_update_file %s (%s)\n", realFilename.string(), key.string()); + LOGP("write_update_file %s (%s)\n", realFilename.string(), key.string()); return 0; } @@ -195,7 +198,7 @@ compute_crc32(const String8& filename) } int -back_up_files(int oldSnapshotFD, int newSnapshotFD, int oldDataStream, +back_up_files(int oldSnapshotFD, int oldDataStream, int newSnapshotFD, char const* fileBase, char const* const* files, int fileCount) { int err; @@ -260,10 +263,10 @@ back_up_files(int oldSnapshotFD, int newSnapshotFD, int oldDataStream, const FileState& f = oldSnapshot.valueAt(n); const FileState& g = newSnapshot.valueAt(m); - printf("%s\n", q.string()); - printf(" new: modTime=%d,%d size=%-3d crc32=0x%08x\n", + LOGP("%s\n", q.string()); + LOGP(" new: modTime=%d,%d size=%-3d crc32=0x%08x\n", f.modTime_sec, f.modTime_nsec, f.size, f.crc32); - printf(" old: modTime=%d,%d size=%-3d crc32=0x%08x\n", + LOGP(" old: modTime=%d,%d size=%-3d crc32=0x%08x\n", g.modTime_sec, g.modTime_nsec, g.size, g.crc32); if (f.modTime_sec != g.modTime_sec || f.modTime_nsec != g.modTime_nsec || f.size != g.size || f.crc32 != g.crc32) { |