Merge "Add boot/shutdown timing to sync detailed logging" into oc-dr1-dev
This commit is contained in:
committed by
Android (Google) Code Review
commit
09e1fae73f
@@ -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
|
@Override
|
||||||
public void onCleanupUser(int userHandle) {
|
public void onCleanupUser(int userHandle) {
|
||||||
synchronized (mService.mCache) {
|
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
|
@Override
|
||||||
protected synchronized void dump(FileDescriptor fd, PrintWriter pw_, String[] args) {
|
protected synchronized void dump(FileDescriptor fd, PrintWriter pw_, String[] args) {
|
||||||
if (!DumpUtils.checkDumpAndUsageStatsPermission(mContext, TAG, pw_)) return;
|
if (!DumpUtils.checkDumpAndUsageStatsPermission(mContext, TAG, pw_)) return;
|
||||||
|
|||||||
@@ -405,6 +405,7 @@ public class SyncManager {
|
|||||||
public void onReceive(Context context, Intent intent) {
|
public void onReceive(Context context, Intent intent) {
|
||||||
Log.w(TAG, "Writing sync state before shutdown...");
|
Log.w(TAG, "Writing sync state before shutdown...");
|
||||||
getSyncStorageEngine().writeAllState();
|
getSyncStorageEngine().writeAllState();
|
||||||
|
mLogger.log("Shutting down.");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -674,8 +675,23 @@ public class SyncManager {
|
|||||||
// before we started checking for account access because they already know
|
// 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.
|
// the account (they run before) which is the genie is out of the bottle.
|
||||||
whiteListExistingSyncAdaptersIfNeeded();
|
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() {
|
private void whiteListExistingSyncAdaptersIfNeeded() {
|
||||||
if (!mSyncStorageEngine.shouldGrantSyncAdaptersAccountAccess()) {
|
if (!mSyncStorageEngine.shouldGrantSyncAdaptersAccountAccess()) {
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user