*/
public class PackageManagerBackupAgent extends BackupAgent {
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
// is stored using the package name as a key)
byte[] sigs = flattenSignatureArray(info.signatures);
- // !!! TODO: take out this debugging
if (DEBUG) {
Log.v(TAG, "+ metadata for " + packName
+ " version=" + info.versionCode
// mentioned in the saved state file, but appear to no longer be present
// on the device. Write a deletion entity for them.
for (String app : mExisting) {
- // !!! TODO: take out this msg
if (DEBUG) Log.v(TAG, "- removing metadata for deleted pkg " + app);
try {
data.writeEntityHeader(app, -1);
mStoredSdkVersion = storedSdkVersion;
mStoredIncrementalVersion = in.readUTF();
mHasMetadata = true;
- // !!! TODO: remove this debugging output
if (DEBUG) {
Log.i(TAG, "Restore set version " + storedSystemVersion
+ " is compatible with OS version " + Build.VERSION.SDK_INT
// it's a file metadata record
int versionCode = in.readInt();
Signature[] sigs = unflattenSignatureArray(in);
-// !!! TODO: take out this debugging
if (DEBUG) {
Log.i(TAG, " restored metadata for " + key
+ " dataSize=" + dataSize
try {
int num = in.readInt();
- Log.v(TAG, " ... unflatten read " + num);
+ if (DEBUG) Log.v(TAG, " ... unflatten read " + num);
// Sensical?
if (num > 20) {
Log.w(TAG, "Empty signature block found");
}
} catch (IOException e) {
- Log.d(TAG, "Unable to unflatten sigs");
+ Log.e(TAG, "Unable to unflatten sigs");
return null;
}