[Android] remove some useless members
Sébastien Toque
git at videolan.org
Sun Feb 10 19:05:32 CET 2013
vlc-ports/android | branch: master | Sébastien Toque <xilasz at gmail.com> | Sun Feb 10 18:03:43 2013 +0100| [42860fe2053a2084ce653d79b00ee1db63a2c30d] | committer: Sébastien Toque
remove some useless members
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=42860fe2053a2084ce653d79b00ee1db63a2c30d
---
.../org/videolan/vlc/gui/audio/AudioPlayerActivity.java | 4 +---
.../org/videolan/vlc/gui/video/VideoGridFragment.java | 15 +++++----------
2 files changed, 6 insertions(+), 13 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
index 4623e75..9223c99 100644
--- a/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
+++ b/vlc-android/src/org/videolan/vlc/gui/audio/AudioPlayerActivity.java
@@ -78,7 +78,6 @@ public class AudioPlayerActivity extends Activity implements IAudioPlayer {
private SeekBar mTimeline;
private AudioServiceController mAudioController;
- private boolean mIsTracking = false;
private boolean mShowRemainingTime = false;
private String lastTitle;
@@ -212,8 +211,7 @@ public class AudioPlayerActivity extends Activity implements IAudioPlayer {
mTime.setText(Util.millisToString(mShowRemainingTime ? time-length : time));
mLength.setText(Util.millisToString(length));
mTimeline.setMax(length);
- if (!mIsTracking)
- mTimeline.setProgress(time);
+ mTimeline.setProgress(time);
if (mAudioController.isPlaying()) {
mPlayPause.setImageResource(R.drawable.ic_pause);
mPlayPause.setContentDescription(getString(R.string.pause));
diff --git a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
index e0a2f89..33aabb7 100644
--- a/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
+++ b/vlc-android/src/org/videolan/vlc/gui/video/VideoGridFragment.java
@@ -94,9 +94,6 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
private ThumbnailerManager mThumbnailerManager;
private VideoGridAnimator mAnimator;
- // Play video from start or not
- public boolean mFromStart = false;
-
/* All subclasses of Fragment must include a public empty constructor. */
public VideoGridFragment() { }
@@ -157,7 +154,6 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
mMediaLibrary.addUpdateHandler(mHandler);
updateViewMode();
mAnimator.animate();
- mFromStart = false;
}
@Override
@@ -237,24 +233,23 @@ public class VideoGridFragment extends SherlockGridFragment implements ISortable
@Override
public void onGridItemClick(GridView l, View v, int position, long id) {
- playVideo(position);
+ playVideo(position, false);
super.onGridItemClick(l, v, position, id);
}
- protected void playVideo(int position) {
+ protected void playVideo(int position, boolean fromStart) {
Media item = (Media) getListAdapter().getItem(position);
- VideoPlayerActivity.start(getActivity(), item.getLocation(), mFromStart);
+ VideoPlayerActivity.start(getActivity(), item.getLocation(), fromStart);
}
private boolean handleContextItemSelected(MenuItem menu, int position) {
switch (menu.getItemId())
{
case R.id.video_list_play:
- playVideo(position);
+ playVideo(position, false);
return true;
case R.id.video_list_play_from_start:
- mFromStart = true;
- playVideo(position);
+ playVideo(position, true);
return true;
case R.id.video_list_info:
Intent intent = new Intent(getActivity(), MediaInfoActivity.class);
More information about the Android
mailing list