Merge commit '6678aeccec58f5ff306fb93ad4411208ed6227db' * commit '6678aeccec58f5ff306fb93ad4411208ed6227db': Turn off most of the backup-related debug logging
This commit is contained in:
@@ -122,7 +122,7 @@ public final class ActivityThread {
|
||||
private static final boolean localLOGV = DEBUG ? Config.LOGD : Config.LOGV;
|
||||
private static final boolean DEBUG_BROADCAST = false;
|
||||
private static final boolean DEBUG_RESULTS = false;
|
||||
private static final boolean DEBUG_BACKUP = true;
|
||||
private static final boolean DEBUG_BACKUP = false;
|
||||
private static final boolean DEBUG_CONFIGURATION = false;
|
||||
private static final long MIN_TIME_BETWEEN_GCS = 5*1000;
|
||||
private static final Pattern PATTERN_SEMICOLON = Pattern.compile(";");
|
||||
|
||||
@@ -36,6 +36,7 @@ import java.io.IOException;
|
||||
*/
|
||||
public abstract class BackupAgent extends ContextWrapper {
|
||||
private static final String TAG = "BackupAgent";
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
public BackupAgent() {
|
||||
super(null);
|
||||
@@ -116,7 +117,7 @@ public abstract class BackupAgent extends ContextWrapper {
|
||||
ParcelFileDescriptor data,
|
||||
ParcelFileDescriptor newState) throws RemoteException {
|
||||
// !!! TODO - real implementation; for now just invoke the callbacks directly
|
||||
Log.v(TAG, "doBackup() invoked");
|
||||
if (DEBUG) Log.v(TAG, "doBackup() invoked");
|
||||
BackupDataOutput output = new BackupDataOutput(data.getFileDescriptor());
|
||||
try {
|
||||
BackupAgent.this.onBackup(oldState, output, newState);
|
||||
@@ -132,7 +133,7 @@ public abstract class BackupAgent extends ContextWrapper {
|
||||
public void doRestore(ParcelFileDescriptor data, int appVersionCode,
|
||||
ParcelFileDescriptor newState) throws RemoteException {
|
||||
// !!! TODO - real implementation; for now just invoke the callbacks directly
|
||||
Log.v(TAG, "doRestore() invoked");
|
||||
if (DEBUG) Log.v(TAG, "doRestore() invoked");
|
||||
BackupDataInput input = new BackupDataInput(data.getFileDescriptor());
|
||||
try {
|
||||
BackupAgent.this.onRestore(input, appVersionCode, newState);
|
||||
|
||||
@@ -31,6 +31,7 @@ import java.io.FileDescriptor;
|
||||
*/
|
||||
public class AbsoluteFileBackupHelper extends FileBackupHelperBase implements BackupHelper {
|
||||
private static final String TAG = "AbsoluteFileBackupHelper";
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
Context mContext;
|
||||
String[] mFiles;
|
||||
@@ -54,8 +55,7 @@ public class AbsoluteFileBackupHelper extends FileBackupHelperBase implements Ba
|
||||
}
|
||||
|
||||
public void restoreEntity(BackupDataInputStream data) {
|
||||
// TODO: turn this off before ship
|
||||
Log.d(TAG, "got entity '" + data.getKey() + "' size=" + data.size());
|
||||
if (DEBUG) Log.d(TAG, "got entity '" + data.getKey() + "' size=" + data.size());
|
||||
String key = data.getKey();
|
||||
if (isKeyInList(key, mFiles)) {
|
||||
File f = new File(key);
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.io.FileDescriptor;
|
||||
/** @hide */
|
||||
public class FileBackupHelper extends FileBackupHelperBase implements BackupHelper {
|
||||
private static final String TAG = "FileBackupHelper";
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
Context mContext;
|
||||
File mFilesDir;
|
||||
@@ -60,8 +61,7 @@ public class FileBackupHelper extends FileBackupHelperBase implements BackupHelp
|
||||
}
|
||||
|
||||
public void restoreEntity(BackupDataInputStream data) {
|
||||
// TODO: turn this off before ship
|
||||
Log.d(TAG, "got entity '" + data.getKey() + "' size=" + data.size());
|
||||
if (DEBUG) Log.d(TAG, "got entity '" + data.getKey() + "' size=" + data.size());
|
||||
String key = data.getKey();
|
||||
if (isKeyInList(key, mFiles)) {
|
||||
File f = new File(mFilesDir, key);
|
||||
|
||||
@@ -26,6 +26,7 @@ import java.io.FileDescriptor;
|
||||
/** @hide */
|
||||
public class SharedPreferencesBackupHelper extends FileBackupHelperBase implements BackupHelper {
|
||||
private static final String TAG = "SharedPreferencesBackupHelper";
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
private Context mContext;
|
||||
private String[] mPrefGroups;
|
||||
@@ -56,9 +57,9 @@ public class SharedPreferencesBackupHelper extends FileBackupHelperBase implemen
|
||||
public void restoreEntity(BackupDataInputStream data) {
|
||||
Context context = mContext;
|
||||
|
||||
// TODO: turn this off before ship
|
||||
Log.d(TAG, "got entity '" + data.getKey() + "' size=" + data.size());
|
||||
String key = data.getKey();
|
||||
if (DEBUG) Log.d(TAG, "got entity '" + key + "' size=" + data.size());
|
||||
|
||||
if (isKeyInList(key, mPrefGroups)) {
|
||||
File f = context.getSharedPrefsFile(key).getAbsoluteFile();
|
||||
writeFile(f, data);
|
||||
|
||||
Reference in New Issue
Block a user