public boolean syncStarted(boolean notifyUser){
synchronized (myLock) {
    if (mySyncInProgress) {
      LOG.info(String.format("Sync already in progress for project '%1$s'.",myProject.getName()));
      return false;
    }
    mySyncInProgress=true;
  }
  LOG.info(String.format("Started sync with Gradle for project '%1$s'.",myProject.getName()));
  addInfoToEventLog("Gradle sync started");
  cleanUpProjectPreferences();
  if (notifyUser) {
    notifyUser();
  }
  syncPublisher(null);
  trackSyncEvent(ACTION_GRADLE_SYNC_STARTED);
  return true;
}

public boolean syncStarted ( boolean notifyUser ) { synchronized ( myLock ) { if ( mySyncInProgress ) { LOG . info ( String . format ( "Sync already in progress for project '%1$s'." , myProject . getName ( ) ) ) ; return false ; } mySyncInProgress = true ; } LOG . info ( String . format ( "Started sync with Gradle for project '%1$s'." , myProject . getName ( ) ) ) ; addInfoToEventLog ( "Gradle sync started" ) ; cleanUpProjectPreferences ( ) ; if ( notifyUser ) { notifyUser ( ) ; } syncPublisher ( null ) ; trackSyncEvent ( ACTION_GRADLE_SYNC_STARTED ) ; return true ; }
notification that a sync has started .
