[Android] MediaWrapper: add an "equals" method.
Adrien Maglo
git at videolan.org
Tue Sep 22 22:12:58 CEST 2015
vlc-ports/android | branch: master | Adrien Maglo <magsoft at videolan.org> | Tue Sep 22 22:08:57 2015 +0200| [82dd35201428017817461507067b052e682fb385] | committer: Adrien Maglo
MediaWrapper: add an "equals" method.
Two MediaWrapper are equal if they point to the same media URI.
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=82dd35201428017817461507067b052e682fb385
---
vlc-android/src/org/videolan/vlc/MediaWrapper.java | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/vlc-android/src/org/videolan/vlc/MediaWrapper.java b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
index c14975f..ffa0b70 100644
--- a/vlc-android/src/org/videolan/vlc/MediaWrapper.java
+++ b/vlc-android/src/org/videolan/vlc/MediaWrapper.java
@@ -110,6 +110,13 @@ public class MediaWrapper implements Parcelable {
init(media);
}
+ @Override
+ public boolean equals(Object obj) {
+ if (mUri == ((MediaWrapper)obj).getUri())
+ return true;
+ return false;
+ }
+
private void init(Media media) {
mType = TYPE_ALL;
More information about the Android
mailing list