[Android] TV Audio Player : Remove unnecessary code
Alexandre Perraud
git at videolan.org
Thu Dec 17 16:30:17 CET 2015
vlc-android | branch: master | Alexandre Perraud <4leyx4ndre at gmail.com> | Thu Dec 17 14:59:15 2015 +0100| [bda07296a7bcd9263c6221c37aa5113dc709618d] | committer: Alexandre Perraud
TV Audio Player : Remove unnecessary code
> https://code.videolan.org/videolan/vlc-android/commit/bda07296a7bcd9263c6221c37aa5113dc709618d
---
.../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