void () { if (myConnected.compareAndSet(false, true)) { Activity activity = StartUpMeasurer.startActivity("connect FSRecords"); applyVfsLogPreferences(); FSRecordsImpl _vfsPeer = FSRecords.connect(); vfsPeer = _vfsPeer; activity.end(); VFSRecoveryInfo recoveryInfo = _vfsPeer.connection().recoveryInfo(); List<VFSInitException> recoveredErrors = recoveryInfo.recoveredErrors; if (!recoveredErrors.isEmpty()) { //if there was recovery, and it took long enough for user to notice: VFSInitializationResult initializationResult = _vfsPeer.initializationResult(); if (app != null && !app.isHeadlessEnvironment() && initializationResult.totalInitializationDurationNs > NOTIFY_OF_RECOVERY_IF_LONGER_NS) { showNotificationAboutLongRecovery(); } //refresh the folders there something was 'recovered': refreshSuspiciousDirectories(recoveryInfo.directoriesIdsToRefresh()); } } }