[Android] Revert "MediaList: signal events"
Adrien Maglo
git at videolan.org
Thu Jan 23 22:27:07 CET 2014
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Thu Jan 23 22:20:10 2014 +0100| [42e7c351cf8b7983a9dec96fad6d1756d2862018] | committer: Adrien Maglo
Revert "MediaList: signal events"
This reverts commit d8391ce90038093fc33c406de6ba2cbe05c196d9.
This commit breaks the playlist item reordering functionality. Indeed, an item move does not correspond to an addition and a deletion. If needed, a specific signal should be added for playlist moves.
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=42e7c351cf8b7983a9dec96fad6d1756d2862018
---
vlc-android/src/org/videolan/libvlc/MediaList.java | 9 ++-------
1 file changed, 2 insertions(+), 7 deletions(-)
diff --git a/vlc-android/src/org/videolan/libvlc/MediaList.java b/vlc-android/src/org/videolan/libvlc/MediaList.java
index 83162c8..f6b86b5 100644
--- a/vlc-android/src/org/videolan/libvlc/MediaList.java
+++ b/vlc-android/src/org/videolan/libvlc/MediaList.java
@@ -146,16 +146,11 @@ public class MediaList {
throw new IndexOutOfBoundsException("Indexes out of range");
MediaHolder toMove = mInternalList.get(startPosition);
- String l = toMove.m.getLocation();
mInternalList.remove(startPosition);
- signal_list_event(EventHandler.CustomMediaListItemDeleted, startPosition, l);
- if(startPosition >= endPosition) {
+ if (startPosition >= endPosition)
mInternalList.add(endPosition, toMove);
- signal_list_event(EventHandler.CustomMediaListItemAdded, endPosition, l);
- } else {
+ else
mInternalList.add(endPosition - 1, toMove);
- signal_list_event(EventHandler.CustomMediaListItemAdded, endPosition - 1, l);
- }
}
public void remove(int position) {
More information about the Android
mailing list