Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 436344ae authored by Christopher Tate's avatar Christopher Tate
Browse files

Turn off most of the backup-related debug logging

The core logging in BackupManagerService and in the Google backup transport are
still enabled at this point.

Change-Id: I10abfa565bbd1097dd3631051b6aca163e4af33a
parent 7e1af37c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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(";");
+3 −2
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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);
+2 −2
Original line number Diff line number Diff line
@@ -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);
+3 −2
Original line number Diff line number Diff line
@@ -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);
Loading