[Android] Remove current playlist smoothscroll

Geoffrey Métais git at videolan.org
Wed Jun 14 16:26:38 CEST 2017


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jun 14 16:25:33 2017 +0200| [34ece746a885d726bea080c903d5f02f5cc5248a] | committer: Geoffrey Métais

Remove current playlist smoothscroll

Causes crash when swithing to album cover

Close #247

> https://code.videolan.org/videolan/vlc-android/commit/34ece746a885d726bea080c903d5f02f5cc5248a
---

 vlc-android/res/xml/preferences_audio.xml                   | 5 -----
 vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java | 7 +------
 2 files changed, 1 insertion(+), 11 deletions(-)

diff --git a/vlc-android/res/xml/preferences_audio.xml b/vlc-android/res/xml/preferences_audio.xml
index 213adca42..a6d704a20 100644
--- a/vlc-android/res/xml/preferences_audio.xml
+++ b/vlc-android/res/xml/preferences_audio.xml
@@ -14,11 +14,6 @@
         android:key="audio_save_repeat"
         android:summary="@string/audio_save_repeat_summary"
         android:title="@string/audio_save_repeat_title" />
-    <CheckBoxPreference
-        android:defaultValue="true"
-        android:key="animate_playlist_scroll"
-        android:summary="@string/playlist_animate_scroll_summary"
-        android:title="@string/playlist_animate_scroll_title" />
     <ListPreference
         android:defaultValue="0"
         android:entries="@array/audio_title_alignment_list"
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 774caf41e..82e2378cf 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayer.java
@@ -103,7 +103,6 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
     private final ConstraintSet playlistConstraintSet = AndroidUtil.isICSOrLater ? new ConstraintSet() : null;
 
     SharedPreferences mSettings;
-    private boolean mAnimateScroll;
 
     // Tips
     private static final String PREF_PLAYLIST_TIPS_SHOWN = "playlist_tips_shown";
@@ -163,7 +162,6 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
     @Override
     public void onStart() {
         super.onStart();
-        mAnimateScroll = mSettings.getBoolean("animate_playlist_scroll", true);
     }
 
     public void onPopupMenu(View anchor, final int position) {
@@ -358,10 +356,7 @@ public class AudioPlayer extends PlaybackServiceFragment implements PlaybackServ
     @Override
     public void onSelectionSet(int position) {
         if (mPlayerState != BottomSheetBehavior.STATE_COLLAPSED && mPlayerState != BottomSheetBehavior.STATE_HIDDEN) {
-            if (mAnimateScroll)
-                mBinding.songsList.smoothScrollToPosition(position);
-            else
-                mBinding.songsList.scrollToPosition(position);
+            mBinding.songsList.scrollToPosition(position);
         }
     }
 



More information about the Android mailing list