[Android] Avoid double triggering for executeUpdate()

Geoffrey Métais git at videolan.org
Wed Jan 6 16:47:26 CET 2016


vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jan  6 16:36:55 2016 +0100| [30a681647bb9de437d591c0335e8383059e70f8e] | committer: Geoffrey Métais

Avoid double triggering for executeUpdate()

> https://code.videolan.org/videolan/vlc-android/commit/30a681647bb9de437d591c0335e8383059e70f8e
---

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 093f0a5..5dd0a3d 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1730,20 +1730,23 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
     public void moveItem(int positionStart, int positionEnd) {
         mMediaList.move(positionStart, positionEnd);
         PlaybackService.this.saveMediaList();
-        Log.d(TAG, "moveItem "+positionStart+" -> "+positionEnd);
+        Log.d(TAG, "moveItem " + positionStart + " -> " + positionEnd);
     }
 
+
     @MainThread
     public void remove(int position) {
         mMediaList.remove(position);
-        onMediaListChanged();
+        saveMediaList();
+        determinePrevAndNextIndices();
         Log.d(TAG, "remove "+position);
     }
 
     @MainThread
     public void removeLocation(String location) {
         mMediaList.remove(location);
-        onMediaListChanged();
+        saveMediaList();
+        determinePrevAndNextIndices();
     }
 
     @MainThread



More information about the Android mailing list