From 2beddb880765882ab598c6cc885759465c2969fd Mon Sep 17 00:00:00 2001 From: Andreas Schildbach Date: Sat, 26 Oct 2019 01:29:23 +0200 Subject: [PATCH] AboutFragment: Fix BadTokenException when trying to view the changelog. --- oeffi/src/de/schildbach/oeffi/preference/AboutFragment.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oeffi/src/de/schildbach/oeffi/preference/AboutFragment.java b/oeffi/src/de/schildbach/oeffi/preference/AboutFragment.java index 789ef7b..f13aef7 100644 --- a/oeffi/src/de/schildbach/oeffi/preference/AboutFragment.java +++ b/oeffi/src/de/schildbach/oeffi/preference/AboutFragment.java @@ -34,11 +34,13 @@ public class AboutFragment extends PreferenceFragment { private static final String KEY_ABOUT_MARKET_APP = "about_market_app"; private static final String KEY_ABOUT_CHANGELOG = "about_changelog"; + private Activity activity; private Application application; @Override public void onAttach(final Activity activity) { super.onAttach(activity); + this.activity = activity; this.application = (Application) activity.getApplication(); } @@ -54,7 +56,7 @@ public class AboutFragment extends PreferenceFragment { findPreference(KEY_ABOUT_CHANGELOG).setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() { @Override public boolean onPreferenceClick(Preference preference) { - ChangelogDialogBuilder.get(application, Application.versionCode(application), null, + ChangelogDialogBuilder.get(activity, Application.versionCode(application), null, Application.versionFlavor(application), 0, null).show(); return true; }