[Android] Use isVisible instead of isResumed in audio player
Geoffrey Métais
git at videolan.org
Fri Mar 10 16:45:24 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Fri Mar 10 16:44:47 2017 +0100| [f842cca11e4f8bd1ed91e469f7b9ab3d06035ba7] | committer: Geoffrey Métais
Use isVisible instead of isResumed in audio player
> https://code.videolan.org/videolan/vlc-android/commit/f842cca11e4f8bd1ed91e469f7b9ab3d06035ba7
---
vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
index 47702c7..e2a9ea1 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
@@ -192,7 +192,7 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
if (mService.hasMedia() && !mService.isVideoPlaying()) {
SharedPreferences mSettings= PreferenceManager.getDefaultSharedPreferences(getActivity());
//Check fragment resumed to not restore video on device turning off
- if (isResumed() && mSettings.getBoolean(PreferencesActivity.VIDEO_RESTORE, false)) {
+ if (isVisible() && mSettings.getBoolean(PreferencesActivity.VIDEO_RESTORE, false)) {
mSettings.edit().putBoolean(PreferencesActivity.VIDEO_RESTORE, false).apply();
mService.getCurrentMediaWrapper().removeFlags(MediaWrapper.MEDIA_FORCE_AUDIO);
mService.switchToVideo();
@@ -427,8 +427,9 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
}
}
+
public void showAdvancedOptions(View v) {
- if (!isResumed())
+ if (!isVisible())
return;
FragmentManager fm = getActivity().getSupportFragmentManager();
AdvOptionsDialog advOptionsDialog = new AdvOptionsDialog();
More information about the Android
mailing list