diff options
Diffstat (limited to 'src/de/danoeh/antennapod')
-rw-r--r-- | src/de/danoeh/antennapod/activity/AudioplayerActivity.java | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/de/danoeh/antennapod/activity/AudioplayerActivity.java b/src/de/danoeh/antennapod/activity/AudioplayerActivity.java index 6231e2a22..f88e45305 100644 --- a/src/de/danoeh/antennapod/activity/AudioplayerActivity.java +++ b/src/de/danoeh/antennapod/activity/AudioplayerActivity.java @@ -99,7 +99,8 @@ public class AudioplayerActivity extends MediaplayerActivity { @Override protected void onStop() { super.onStop(); - if (AppConfig.DEBUG) Log.d(TAG, "onStop"); + if (AppConfig.DEBUG) + Log.d(TAG, "onStop"); } @@ -119,9 +120,12 @@ public class AudioplayerActivity extends MediaplayerActivity { @Override protected void onSaveInstanceState(Bundle outState) { + // super.onSaveInstanceState(outState); would cause crash + if (AppConfig.DEBUG) + Log.d(TAG, "onSaveInstanceState"); outState.putInt("selectedPosition", currentlyShownPosition); + savedPosition = currentlyShownPosition; resetFragmentView(); - super.onSaveInstanceState(outState); } @Override @@ -158,6 +162,9 @@ public class AudioplayerActivity extends MediaplayerActivity { true); startService(launchIntent); } + if (savedPosition != -1) { + switchToFragment(savedPosition); + } } @Override |