diff --git a/app/src/main/java/com/nutomic/syncthingandroid/activities/FirstStartActivity.java b/app/src/main/java/com/nutomic/syncthingandroid/activities/FirstStartActivity.java index 68343d80..4af42d50 100644 --- a/app/src/main/java/com/nutomic/syncthingandroid/activities/FirstStartActivity.java +++ b/app/src/main/java/com/nutomic/syncthingandroid/activities/FirstStartActivity.java @@ -462,7 +462,7 @@ public class FirstStartActivity extends Activity { /** * Sets up the initial configuration and generates secure keys. */ - private static class KeyGenerationTask extends AsyncTask { + private static class KeyGenerationTask extends AsyncTask { private WeakReference refFirstStartActivity; ConfigXml configXml; @@ -480,13 +480,25 @@ public class FirstStartActivity extends Activity { try { configXml = new ConfigXml(firstStartActivity); } catch (ConfigXml.OpenConfigException e) { - TextView keygenStatus = firstStartActivity.findViewById(R.id.key_generation_status); - keygenStatus.setText(firstStartActivity.getString(R.string.config_create_failed)); + publishProgress(firstStartActivity.getString(R.string.config_create_failed)); cancel(true); } return null; } + @Override + protected void onProgressUpdate(String... values) { + super.onProgressUpdate(values); + if (values != null && values.length > 0) { + FirstStartActivity firstStartActivity = refFirstStartActivity.get(); + if (firstStartActivity == null) { + return; + } + TextView keygenStatus = firstStartActivity.findViewById(R.id.key_generation_status); + keygenStatus.setText(values[0]); + } + } + @Override protected void onPostExecute(Void aVoid) { // Get a reference to the activity if it is still there. diff --git a/app/src/main/res/values-de/strings.xml b/app/src/main/res/values-de/strings.xml index d7860f7c..777e69ab 100644 --- a/app/src/main/res/values-de/strings.xml +++ b/app/src/main/res/values-de/strings.xml @@ -641,7 +641,7 @@ Bitte melden Sie auftretende Probleme via GitHub. Syncthing wurde beendet - Erstellen der Konfigurationsdatei fehlgeschalgen + Erstellen der Konfiguration fehlgeschlagen. Pruefe die logcat-Ausgabe! Fehler beim Lesen der Konfiguration. Sichere gegebenenfalls Daten aus deinen Sync-Ordnern zu sichern, lösche über die Android-Einstellungen die App-Daten und starte von vorn. diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index 3d60b4a3..6e7a7090 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -649,7 +649,7 @@ Please report any problems you encounter via Github. Syncthing was terminated - Failed to create configuration. + Failed to create configuration. Check logcat output. Failed to read configuration. Consider backing up data from your sync folders, then clear this app\'s data from Android settings and launch it again.