[Android] TV Audio Player : Remove unnecessary code
Alexandre Perraud
git at videolan.org
Tue Dec 22 10:44:11 CET 2015
vlc-android | branch: 1.7.x | Alexandre Perraud <4leyx4ndre at gmail.com> | Thu Dec 17 14:59:15 2015 +0100| [8320e5f677d1d8119988c0783d615133786dbdc8] | committer: Geoffrey Métais
TV Audio Player : Remove unnecessary code
(cherry picked from commit bda07296a7bcd9263c6221c37aa5113dc709618d)
Signed-off-by: Geoffrey Métais <geoffrey.metais at gmail.com>
> https://code.videolan.org/videolan/vlc-android/commit/8320e5f677d1d8119988c0783d615133786dbdc8
---
.../videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java | 12 +++---------
1 file changed, 3 insertions(+), 9 deletions(-)
diff --git a/vlc-android/flavors/tv/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java b/vlc-android/flavors/tv/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java
index c6010aa..ef81606 100644
--- a/vlc-android/flavors/tv/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java
+++ b/vlc-android/flavors/tv/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java
@@ -135,8 +135,6 @@ public class AudioPlayerActivity extends BaseTvActivity implements PlaybackServi
mRecyclerView.setAdapter(mAdapter);
}
- selectItem(mCurrentlyPlaying);
-
}
@Override
@@ -173,6 +171,9 @@ public class AudioPlayerActivity extends BaseTvActivity implements PlaybackServi
mCover.setImageResource(R.drawable.ic_tv_icon_big);
else
mCover.setImageBitmap(cover);
+
+ mCurrentlyPlaying=mService.getCurrentMediaPosition();
+ selectItem(mCurrentlyPlaying);
}
}
@@ -357,14 +358,12 @@ public class AudioPlayerActivity extends BaseTvActivity implements PlaybackServi
private void goPrevious() {
if (mService != null && mService.hasPrevious()) {
mService.previous();
- selectItem(--mCurrentlyPlaying);
}
}
private void goNext() {
if (mService != null && mService.hasNext()){
mService.next();
- selectItem(++mCurrentlyPlaying);
}
}
@@ -377,11 +376,6 @@ public class AudioPlayerActivity extends BaseTvActivity implements PlaybackServi
mService.play();
}
- private void pause() {
- if (mService != null && mService.isPlaying())
- mService.pause();
- }
-
private void selectNext() {
if (mAdapter.getmSelectedItem() >= mAdapter.getItemCount()-1) {
mProgressBar.requestFocus();
More information about the Android
mailing list