am 49de6949: Merge change Ia75da053 into eclair
Merge commit '49de69498f6814e93939a0a0a357ac56697ef4ff' into eclair-plus-aosp * commit '49de69498f6814e93939a0a0a357ac56697ef4ff': Remove DEBUG-only logging in metadata backup agent
This commit is contained in:
@@ -51,7 +51,7 @@ import java.util.List;
|
|||||||
*/
|
*/
|
||||||
public class PackageManagerBackupAgent extends BackupAgent {
|
public class PackageManagerBackupAgent extends BackupAgent {
|
||||||
private static final String TAG = "PMBA";
|
private static final String TAG = "PMBA";
|
||||||
private static final boolean DEBUG = true;
|
private static final boolean DEBUG = false;
|
||||||
|
|
||||||
// key under which we store global metadata (individual app metadata
|
// key under which we store global metadata (individual app metadata
|
||||||
// is stored using the package name as a key)
|
// is stored using the package name as a key)
|
||||||
@@ -195,7 +195,6 @@ public class PackageManagerBackupAgent extends BackupAgent {
|
|||||||
|
|
||||||
byte[] sigs = flattenSignatureArray(info.signatures);
|
byte[] sigs = flattenSignatureArray(info.signatures);
|
||||||
|
|
||||||
// !!! TODO: take out this debugging
|
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.v(TAG, "+ metadata for " + packName
|
Log.v(TAG, "+ metadata for " + packName
|
||||||
+ " version=" + info.versionCode
|
+ " version=" + info.versionCode
|
||||||
@@ -214,7 +213,6 @@ public class PackageManagerBackupAgent extends BackupAgent {
|
|||||||
// mentioned in the saved state file, but appear to no longer be present
|
// mentioned in the saved state file, but appear to no longer be present
|
||||||
// on the device. Write a deletion entity for them.
|
// on the device. Write a deletion entity for them.
|
||||||
for (String app : mExisting) {
|
for (String app : mExisting) {
|
||||||
// !!! TODO: take out this msg
|
|
||||||
if (DEBUG) Log.v(TAG, "- removing metadata for deleted pkg " + app);
|
if (DEBUG) Log.v(TAG, "- removing metadata for deleted pkg " + app);
|
||||||
try {
|
try {
|
||||||
data.writeEntityHeader(app, -1);
|
data.writeEntityHeader(app, -1);
|
||||||
@@ -266,7 +264,6 @@ public class PackageManagerBackupAgent extends BackupAgent {
|
|||||||
mStoredSdkVersion = storedSdkVersion;
|
mStoredSdkVersion = storedSdkVersion;
|
||||||
mStoredIncrementalVersion = in.readUTF();
|
mStoredIncrementalVersion = in.readUTF();
|
||||||
mHasMetadata = true;
|
mHasMetadata = true;
|
||||||
// !!! TODO: remove this debugging output
|
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.i(TAG, "Restore set version " + storedSystemVersion
|
Log.i(TAG, "Restore set version " + storedSystemVersion
|
||||||
+ " is compatible with OS version " + Build.VERSION.SDK_INT
|
+ " is compatible with OS version " + Build.VERSION.SDK_INT
|
||||||
@@ -277,7 +274,6 @@ public class PackageManagerBackupAgent extends BackupAgent {
|
|||||||
// it's a file metadata record
|
// it's a file metadata record
|
||||||
int versionCode = in.readInt();
|
int versionCode = in.readInt();
|
||||||
Signature[] sigs = unflattenSignatureArray(in);
|
Signature[] sigs = unflattenSignatureArray(in);
|
||||||
// !!! TODO: take out this debugging
|
|
||||||
if (DEBUG) {
|
if (DEBUG) {
|
||||||
Log.i(TAG, " restored metadata for " + key
|
Log.i(TAG, " restored metadata for " + key
|
||||||
+ " dataSize=" + dataSize
|
+ " dataSize=" + dataSize
|
||||||
@@ -326,7 +322,7 @@ public class PackageManagerBackupAgent extends BackupAgent {
|
|||||||
|
|
||||||
try {
|
try {
|
||||||
int num = in.readInt();
|
int num = in.readInt();
|
||||||
Log.v(TAG, " ... unflatten read " + num);
|
if (DEBUG) Log.v(TAG, " ... unflatten read " + num);
|
||||||
|
|
||||||
// Sensical?
|
// Sensical?
|
||||||
if (num > 20) {
|
if (num > 20) {
|
||||||
@@ -347,7 +343,7 @@ public class PackageManagerBackupAgent extends BackupAgent {
|
|||||||
Log.w(TAG, "Empty signature block found");
|
Log.w(TAG, "Empty signature block found");
|
||||||
}
|
}
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
Log.d(TAG, "Unable to unflatten sigs");
|
Log.e(TAG, "Unable to unflatten sigs");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user