am 436344ae: Turn off most of the backup-related debug logging
Merge commit '436344ae12c819f58306ceb94241a266141e1218' into eclair-plus-aosp * commit '436344ae12c819f58306ceb94241a266141e1218': 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);
|
||||
|
||||
@@ -107,7 +107,7 @@ BackupDataWriter::WriteEntityHeader(const String8& key, size_t dataSize)
|
||||
} else {
|
||||
k = key;
|
||||
}
|
||||
if (true) {
|
||||
if (false) {
|
||||
LOGD("Writing entity: prefix='%s' key='%s' dataSize=%d", m_keyPrefix.string(), key.string(),
|
||||
dataSize);
|
||||
}
|
||||
|
||||
@@ -51,7 +51,7 @@ import android.util.Log;
|
||||
*/
|
||||
public class SettingsBackupAgent extends BackupHelperAgent {
|
||||
// STOPSHIP: set DEBUG to false
|
||||
private static final boolean DEBUG = true;
|
||||
private static final boolean DEBUG = false;
|
||||
|
||||
private static final String KEY_SYSTEM = "system";
|
||||
private static final String KEY_SECURE = "secure";
|
||||
|
||||
@@ -140,7 +140,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
static final boolean DEBUG_PROVIDER = localLOGV || false;
|
||||
static final boolean DEBUG_USER_LEAVING = localLOGV || false;
|
||||
static final boolean DEBUG_RESULTS = localLOGV || false;
|
||||
static final boolean DEBUG_BACKUP = localLOGV || true;
|
||||
static final boolean DEBUG_BACKUP = localLOGV || false;
|
||||
static final boolean DEBUG_CONFIGURATION = localLOGV || false;
|
||||
static final boolean VALIDATE_TOKENS = false;
|
||||
static final boolean SHOW_ACTIVITY_START_TIME = true;
|
||||
@@ -11375,8 +11375,7 @@ public final class ActivityManagerService extends ActivityManagerNative implemen
|
||||
try {
|
||||
proc.thread.scheduleCreateBackupAgent(app, backupMode);
|
||||
} catch (RemoteException e) {
|
||||
// !!! TODO: notify the backup manager that we crashed, or rely on
|
||||
// death notices, or...?
|
||||
// Will time out on the backup manager side
|
||||
}
|
||||
} else {
|
||||
if (DEBUG_BACKUP) Log.v(TAG, "Agent proc not running, waiting for attach");
|
||||
|
||||
Reference in New Issue
Block a user