5555import android .util .EventLog ;
5656import android .util .Log ;
5757import android .util .Pair ;
58+ import android .util .Slog ;
5859
5960import com .android .internal .R ;
6061import com .android .internal .util .IndentingPrintWriter ;
@@ -311,13 +312,10 @@ public void onReceive(Context context, Intent intent) {
311312 if (userId == UserHandle .USER_NULL ) return ;
312313
313314 if (Intent .ACTION_USER_REMOVED .equals (action )) {
314- Log .i (TAG , "User removed: u" + userId );
315315 onUserRemoved (userId );
316316 } else if (Intent .ACTION_USER_STARTING .equals (action )) {
317- Log .i (TAG , "User starting: u" + userId );
318317 onUserStarting (userId );
319318 } else if (Intent .ACTION_USER_STOPPING .equals (action )) {
320- Log .i (TAG , "User stopping: u" + userId );
321319 onUserStopping (userId );
322320 }
323321 }
@@ -338,6 +336,10 @@ private ConnectivityManager getConnectivityManager() {
338336 }
339337 }
340338
339+ /**
340+ * Should only be created after {@link ContentService#systemReady()} so that
341+ * {@link PackageManager} is ready to query.
342+ */
341343 public SyncManager (Context context , boolean factoryTest ) {
342344 // Initialize the SyncStorageEngine first, before registering observers
343345 // and creating threads and so on; it may fail if the disk is full.
@@ -441,9 +443,6 @@ public void onStatusChanged(int which) {
441443 UserHandle .ALL ,
442444 new IntentFilter (AccountManager .LOGIN_ACCOUNTS_CHANGED_ACTION ),
443445 null , null );
444-
445- // do this synchronously to ensure we have the accounts before this call returns
446- onUserStarting (UserHandle .USER_OWNER );
447446 }
448447
449448 // Pick a random second in a day to seed all periodic syncs
0 commit comments