[Android] remove useless global variable
Geoffrey Métais
git at videolan.org
Wed Aug 30 17:37:03 CEST 2017
vlc-android | branch: master | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Aug 30 17:33:07 2017 +0200| [b5ec66bf4651311cf0b58d0335c70549c80161d1] | committer: Geoffrey Métais
remove useless global variable
> https://code.videolan.org/videolan/vlc-android/commit/b5ec66bf4651311cf0b58d0335c70549c80161d1
---
.../org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java
index 04e71699b..423d1090a 100644
--- a/vlc-android/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/tv/audioplayer/AudioPlayerActivity.java
@@ -68,7 +68,6 @@ public class AudioPlayerActivity extends BaseTvActivity implements PlaybackServi
private PlaylistAdapter mAdapter;
private LinearLayoutManager mLayoutManager;
private ArrayList<MediaWrapper> mMediaList;
- final private Progress mProgress = new Progress();
//PAD navigation
private static final int JOYSTICK_INPUT_DELAY = 300;
@@ -80,7 +79,7 @@ public class AudioPlayerActivity extends BaseTvActivity implements PlaybackServi
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
mBinding = DataBindingUtil.setContentView(this, R.layout.tv_audio_player);
- mBinding.setProgress(mProgress);
+ mBinding.setProgress(new Progress());
mMediaList = getIntent().getParcelableArrayListExtra(MEDIA_LIST);
mCurrentlyPlaying = getIntent().getIntExtra(MEDIA_POSITION, 0);
@@ -146,7 +145,7 @@ public class AudioPlayerActivity extends BaseTvActivity implements PlaybackServi
}
mBinding.mediaTitle.setText(mService.getTitle());
mBinding.mediaArtist.setText(mService.getArtist());
- mProgress.update(mService.getTime(), mService.getLength());
+ mBinding.getProgress().update(mService.getTime(), mService.getLength());
mCurrentlyPlaying = mService.getCurrentMediaPosition();
selectItem(mCurrentlyPlaying);
final MediaWrapper mw = mService.getCurrentMediaWrapper();
@@ -183,7 +182,7 @@ public class AudioPlayerActivity extends BaseTvActivity implements PlaybackServi
@Override
public void updateProgress() {
if (mService != null)
- mProgress.updateTime(mService.getTime());
+ mBinding.getProgress().updateTime(mService.getTime());
}
@Override
More information about the Android
mailing list