diff --git a/oeffi/res/values-de/strings.xml b/oeffi/res/values-de/strings.xml
index 7dc1164..c1ed37c 100644
--- a/oeffi/res/values-de/strings.xml
+++ b/oeffi/res/values-de/strings.xml
@@ -36,8 +36,6 @@
Allgemein
Verkehrsnetz
Verkehrsnetz wählen.
- Änderungen zeigen
- Nach Aktualisierung auf eine neue Version von Öffi Änderungen zeigen.
Tipps zeigen
Hin und wieder einen nützlichen Tipp anzeigen.
Standorteinstellungen
@@ -321,9 +319,6 @@
Netzwerk-Probleme?
Kann Daten nicht laden.
Nochmal versuchen
- Willkommen zu Öffi Version %s!
- Folgendes ist neu:
- Weiter
Weiter
App-Update
Öffi ist letztens abgestürzt
diff --git a/oeffi/res/values/strings.xml b/oeffi/res/values/strings.xml
index 88b13f5..6b0e9ff 100644
--- a/oeffi/res/values/strings.xml
+++ b/oeffi/res/values/strings.xml
@@ -36,8 +36,6 @@
Common
Transport network
Pick transportation network.
- Show changes
- Show Offi\'s changelog after each upgrade to a new version.
Show hints
Show useful hints now and then.
Location settings
@@ -322,9 +320,6 @@
Network problems?
Could not fetch data.
Retry
- Welcome to Offi version %s!
- Here is what\'s new:
- Dismiss
Dismiss
Update app
Previous crash detected
diff --git a/oeffi/res/xml/preference_common.xml b/oeffi/res/xml/preference_common.xml
index 3ad6bf2..3d32c3f 100644
--- a/oeffi/res/xml/preference_common.xml
+++ b/oeffi/res/xml/preference_common.xml
@@ -10,11 +10,6 @@
android:targetPackage="de.schildbach.oeffi"
android:targetClass="de.schildbach.oeffi.network.NetworkPickerActivity" />
-
lastVersionCode) {
- if (lastVersionCode > 0 && prefs.getBoolean(Constants.PREFS_KEY_SHOW_CHANGELOG, true))
- showDialog(DIALOG_NEW_VERSION);
- }
} else {
downloadAndProcessMessages(prefsGetNetwork());
}
@@ -349,9 +342,6 @@ public abstract class OeffiMainActivity extends OeffiActivity {
@Override
protected Dialog onCreateDialog(final int id, final Bundle bundle) {
switch (id) {
- case DIALOG_NEW_VERSION:
- return ChangelogDialogBuilder.get(this, versionCode, applicationVersionName(), applicationVersionFlavor(),
- lastVersionCode, taskName()).create();
case DIALOG_MESSAGE:
return messageDialog(bundle);
}
diff --git a/oeffi/src/de/schildbach/oeffi/preference/AboutFragment.java b/oeffi/src/de/schildbach/oeffi/preference/AboutFragment.java
index 3e9c557..c3f411d 100644
--- a/oeffi/src/de/schildbach/oeffi/preference/AboutFragment.java
+++ b/oeffi/src/de/schildbach/oeffi/preference/AboutFragment.java
@@ -26,7 +26,6 @@ import androidx.annotation.Nullable;
import de.schildbach.oeffi.Application;
import de.schildbach.oeffi.Constants;
import de.schildbach.oeffi.R;
-import de.schildbach.oeffi.util.ChangelogDialogBuilder;
public class AboutFragment extends PreferenceFragment {
private static final String KEY_ABOUT_VERSION = "about_version";
@@ -52,10 +51,8 @@ public class AboutFragment extends PreferenceFragment {
final Uri marketUri = Uri.parse(String.format(Constants.MARKET_APP_URL, application.getPackageName()));
findPreference(KEY_ABOUT_MARKET_APP).setSummary(marketUri.toString());
findPreference(KEY_ABOUT_MARKET_APP).setIntent(new Intent(Intent.ACTION_VIEW, marketUri));
- findPreference(KEY_ABOUT_CHANGELOG).setOnPreferenceClickListener(preference -> {
- ChangelogDialogBuilder.get(activity, Application.versionCode(application), null,
- Application.versionFlavor(application), 0, null).show();
- return true;
- });
+ final Uri changelogUri = Uri.parse(activity.getString(R.string.about_changelog_summary));
+ findPreference(KEY_ABOUT_CHANGELOG).setSummary(changelogUri.toString());
+ findPreference(KEY_ABOUT_CHANGELOG).setIntent(new Intent(Intent.ACTION_VIEW, changelogUri));
}
}
diff --git a/oeffi/src/de/schildbach/oeffi/util/ChangelogDialogBuilder.java b/oeffi/src/de/schildbach/oeffi/util/ChangelogDialogBuilder.java
deleted file mode 100644
index 75bec35..0000000
--- a/oeffi/src/de/schildbach/oeffi/util/ChangelogDialogBuilder.java
+++ /dev/null
@@ -1,80 +0,0 @@
-/*
- * Copyright the original author or authors.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see .
- */
-
-package de.schildbach.oeffi.util;
-
-import android.app.AlertDialog;
-import android.content.Context;
-import android.os.Build;
-import android.view.LayoutInflater;
-import android.view.View;
-import android.webkit.WebChromeClient;
-import android.webkit.WebSettings;
-import android.webkit.WebView;
-import androidx.annotation.Nullable;
-import de.schildbach.oeffi.Constants;
-import de.schildbach.oeffi.R;
-import okhttp3.HttpUrl;
-
-public class ChangelogDialogBuilder extends AlertDialog.Builder {
- public static ChangelogDialogBuilder get(final Context context, final int versionCode, final String versionName,
- final String versionFlavor, final int lastVersionCode, @Nullable final String task) {
- return new ChangelogDialogBuilder(context, Constants.ALERT_DIALOG_THEME, versionCode, versionName,
- versionFlavor, lastVersionCode, task);
- }
-
- private ChangelogDialogBuilder(final Context context, final int theme, final int versionCode,
- final String versionName, final String versionFlavor, final int lastVersionCode,
- @Nullable final String task) {
- super(context, theme);
- init(context, versionCode, versionName, versionFlavor, lastVersionCode, task);
- }
-
- private void init(final Context context, final int versionCode, final String versionName,
- final String versionFlavor, final int lastVersionCode, @Nullable final String task) {
- final LayoutInflater inflater = LayoutInflater.from(context);
-
- final View view = inflater.inflate(R.layout.changelog_dialog, null);
- final View progressView = view.findViewById(R.id.changelog_dialog_progress);
- final WebView webView = (WebView) view.findViewById(R.id.changelog_dialog_webview);
- webView.setWebChromeClient(new WebChromeClient() {
- @Override
- public void onProgressChanged(final WebView view, final int progress) {
- if (progress == 100)
- progressView.setVisibility(View.GONE);
- }
- });
- webView.getSettings().setCacheMode(WebSettings.LOAD_NO_CACHE);
- final HttpUrl.Builder url = HttpUrl.parse(context.getString(R.string.about_changelog_summary)).newBuilder();
- url.addQueryParameter("version", Integer.toString(versionCode));
- if (lastVersionCode > 0)
- url.addQueryParameter("lastVersion", Integer.toString(lastVersionCode));
- if (versionFlavor != null)
- url.addEncodedQueryParameter("flavor", versionFlavor);
- url.addQueryParameter("sdk", Integer.toString(Build.VERSION.SDK_INT));
- if (task != null)
- url.addEncodedQueryParameter("task", task);
- webView.loadUrl(url.build().toString());
-
- setIcon(R.mipmap.ic_oeffi_stations_color_48dp);
- setTitle((versionName != null ? context.getString(R.string.changelog_dialog_title_version, versionName) + '\n'
- : "") + context.getString(R.string.changelog_dialog_title));
- setView(view);
- setPositiveButton(context.getString(R.string.changelog_dialog_button_dismiss),
- (dialog, id) -> dialog.dismiss());
- }
-}