Add boot/shutdown timing to sync detailed logging
Bug 63136907 Test: manual test Change-Id: I141f32f90579e2676af616f21254774d64a37c31
This commit is contained in:
@@ -102,6 +102,22 @@ public final class ContentService extends IContentService.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void onStartUser(int userHandle) {
|
||||
mService.onStartUser(userHandle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onUnlockUser(int userHandle) {
|
||||
mService.onUnlockUser(userHandle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onStopUser(int userHandle) {
|
||||
mService.onStopUser(userHandle);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onCleanupUser(int userHandle) {
|
||||
synchronized (mService.mCache) {
|
||||
@@ -162,6 +178,18 @@ public final class ContentService extends IContentService.Stub {
|
||||
}
|
||||
}
|
||||
|
||||
void onStartUser(int userHandle) {
|
||||
if (mSyncManager != null) mSyncManager.onStartUser(userHandle);
|
||||
}
|
||||
|
||||
void onUnlockUser(int userHandle) {
|
||||
if (mSyncManager != null) mSyncManager.onUnlockUser(userHandle);
|
||||
}
|
||||
|
||||
void onStopUser(int userHandle) {
|
||||
if (mSyncManager != null) mSyncManager.onStopUser(userHandle);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected synchronized void dump(FileDescriptor fd, PrintWriter pw_, String[] args) {
|
||||
if (!DumpUtils.checkDumpAndUsageStatsPermission(mContext, TAG, pw_)) return;
|
||||
|
||||
@@ -405,6 +405,7 @@ public class SyncManager {
|
||||
public void onReceive(Context context, Intent intent) {
|
||||
Log.w(TAG, "Writing sync state before shutdown...");
|
||||
getSyncStorageEngine().writeAllState();
|
||||
mLogger.log("Shutting down.");
|
||||
}
|
||||
};
|
||||
|
||||
@@ -674,8 +675,23 @@ public class SyncManager {
|
||||
// before we started checking for account access because they already know
|
||||
// the account (they run before) which is the genie is out of the bottle.
|
||||
whiteListExistingSyncAdaptersIfNeeded();
|
||||
|
||||
mLogger.log("Sync manager initialized.");
|
||||
}
|
||||
|
||||
public void onStartUser(int userHandle) {
|
||||
mLogger.log("onStartUser: user=", userHandle);
|
||||
}
|
||||
|
||||
public void onUnlockUser(int userHandle) {
|
||||
mLogger.log("onUnlockUser: user=", userHandle);
|
||||
}
|
||||
|
||||
public void onStopUser(int userHandle) {
|
||||
mLogger.log("onStopUser: user=", userHandle);
|
||||
}
|
||||
|
||||
|
||||
private void whiteListExistingSyncAdaptersIfNeeded() {
|
||||
if (!mSyncStorageEngine.shouldGrantSyncAdaptersAccountAccess()) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user