[Android] Reduce scope of size variable

Geoffrey Métais git at videolan.org
Wed Jun 15 13:59:20 CEST 2016


vlc-android | branch: 2.0.x | Geoffrey Métais <geoffrey.metais at gmail.com> | Wed Jun 15 12:37:37 2016 +0200| [59920fccc2c85715efcc91827c70577114271046] | committer: Geoffrey Métais

Reduce scope of size variable

(cherry picked from commit 029158cd4e5bbe3fbdb94061d00466f398089785)

> https://code.videolan.org/videolan/vlc-android/commit/59920fccc2c85715efcc91827c70577114271046
---

 vlc-android/src/org/videolan/vlc/PlaybackService.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/vlc-android/src/org/videolan/vlc/PlaybackService.java b/vlc-android/src/org/videolan/vlc/PlaybackService.java
index 4fa13f9..e791181 100644
--- a/vlc-android/src/org/videolan/vlc/PlaybackService.java
+++ b/vlc-android/src/org/videolan/vlc/PlaybackService.java
@@ -1224,9 +1224,9 @@ public class PlaybackService extends Service implements IVLCVout.Callback {
 
     @MainThread
     public void previous() {
-        int size = mMediaList.size();
         if (hasPrevious() && mCurrentIndex > 0 &&
                 (!mMediaPlayer.isSeekable() || mMediaPlayer.getTime() < 2000l)) {
+            int size = mMediaList.size();
             mCurrentIndex = mPrevIndex;
             if (mPrevious.size() > 0)
                 mPrevious.pop();



More information about the Android mailing list