[Android] Remove redundant calls
Geoffrey Métais
git at videolan.org
Tue Jan 17 11:20:11 CET 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Tue Jan 17 11:06:22 2017 +0100| [d59cab8176731a5b8a612767f2153b43a1c3d4e5] | committer: Geoffrey Métais
Remove redundant calls
> https://code.videolan.org/videolan/vlc-android/commit/d59cab8176731a5b8a612767f2153b43a1c3d4e5
---
vlc-android/src/org/videolan/vlc/gui/audio/PlaylistAdapter.java | 5 -----
vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java | 3 ++-
2 files changed, 2 insertions(+), 6 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/PlaylistAdapter.java b/vlc-android/src/org/videolan/vlc/gui/audio/PlaylistAdapter.java
index ad8c013..27caf18 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/PlaylistAdapter.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/PlaylistAdapter.java
@@ -148,8 +148,6 @@ public class PlaylistAdapter extends BaseAdapter<PlaylistAdapter.ViewHolder> imp
return;
if (acquireDatasetLock()) {
mService.remove(position);
- mDataSet.remove(position);
- notifyItemRemoved(position);
releaseDatasetLock();
}
}
@@ -191,8 +189,6 @@ public class PlaylistAdapter extends BaseAdapter<PlaylistAdapter.ViewHolder> imp
@Override
public void run() {
if (acquireDatasetLock()) {
- mDataSet.add(position, media);
- notifyItemInserted(position);
mService.insertItem(position, media);
releaseDatasetLock();
}
@@ -281,7 +277,6 @@ public class PlaylistAdapter extends BaseAdapter<PlaylistAdapter.ViewHolder> imp
++to;
service.moveItem(from, to);
from = to = -1;
- getOwner().mAudioPlayer.updateList();
break;
}
}
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
index ced654d..7bf8af5 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoPlayerActivity.java
@@ -1544,6 +1544,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
@Override
public void update() {
+ updateList();
}
@Override
@@ -2328,7 +2329,7 @@ public class VideoPlayerActivity extends AppCompatActivity implements IVLCVout.C
@Override
public void updateList() {
- if (mService == null)
+ if (mService == null || mPlaylistAdapter == null)
return;
mPlaylistAdapter.dispatchUpdate(mService.getMedias());
More information about the Android
mailing list