protected void runInitAndMaintenance() {
        synchronized (initializedMutex) {
            if (initialized) {
                return;
            }
            initialized = true;
        }
        try (ContextLogger cLog = new ContextLogger(Log.LogLevel.DEBUG, "AbstractBottomNavigationActivity.runInitAndMaintenance")) {

            //check database
            final String errorMsg = DataStore.initAndCheck();
            if (errorMsg != null) {
                DebugUtils.askUserToReportProblem(this, "Fatal DB error: " + errorMsg);
            }
            cLog.add("ds");

            Log.i("Starting " + getPackageName() + ' ' + Version.getVersionCode(this) + " a.k.a " + Version.getVersionName(this));

            final LocationDataProvider locationDataProvider = LocationDataProvider.getInstance();
            locationDataProvider.initialize();
            // Attempt to acquire an initial location before any real activity happens.
            locationDataProvider.geoDataObservable(true).subscribeOn(AndroidRxUtils.looperCallbacksScheduler).take(1).subscribe();
            cLog.add("ph");

            checkRestore();

            DataStore.cleanIfNeeded(this);

            LocalStorage.initGeocacheDataDir();
            if (LocalStorage.isRunningLowOnDiskSpace()) {
                SimpleDialog.of(this).setTitle(R.string.init_low_disk_space).setMessage(R.string.init_low_disk_space_message).show();
            }
            cLog.add("ls");

            confirmDebug();

            //do file migrations if necessary
            LocalStorage.migrateLocalStorage(this);
            cLog.add("mls");

            //sync map Theme folder
            RenderThemeHelper.resynchronizeOrDeleteMapThemeFolder();
            cLog.add("rth");

            // automated backup check
            if (Settings.automaticBackupDue()) {
                new BackupUtils(this, null).backup(() -> Settings.setAutomaticBackupLastCheck(false), true);
            }
            cLog.add("ab");

            // check for finished, but unreceived downloads
            DownloaderUtils.checkPendingDownloads(this);

            // check for notifications permission on migration (API 33+ only)
            if (InstallWizardActivity.needsNotificationsPermission()) {
                Dialogs.basicOneTimeMessage(this, OneTimeDialogs.DialogType.NOTIFICATION_PERMISSION, () -> startActivity(new Intent(this, InstallWizardActivity.class)));
            }

        }
    }
detect whether c:geo is unable to log in
main/src/main/java/cgeo/geocaching/activity/AbstractNavigationBarActivity.java