[Android] AudioService: organize variables a bit
Edward Wang
git at videolan.org
Thu Jul 10 16:16:51 CEST 2014
vlc-ports/android | branch: master | Edward Wang <edward.c.wang at compdigitec.com> | Thu Jul 10 10:08:30 2014 -0400| [ac18965d106043ba411b8179decfceaedc3d5991] | committer: Edward Wang
AudioService: organize variables a bit
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=ac18965d106043ba411b8179decfceaedc3d5991
---
.../src/org/videolan/vlc/audio/AudioService.java | 25 +++++++++++++-------
1 file changed, 16 insertions(+), 9 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/audio/AudioService.java b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
index c914b89..c5adb11 100644
--- a/vlc-android/src/org/videolan/vlc/audio/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
@@ -113,29 +113,36 @@ public class AudioService extends Service {
public static final int NEXT_ITEM = 3;
private LibVLC mLibVLC;
- private Stack<Integer> mPrevious; // Stack of previously played indexes, used in shuffle mode
- private int mCurrentIndex; // Set to -1 if there is no currently loaded media
- private int mPrevIndex; // Set to -1 if no previous media
- private int mNextIndex; // Set to -1 if no next media
private HashMap<IAudioServiceCallback, Integer> mCallback;
private EventHandler mEventHandler;
- private boolean mShuffling = false;
- private RepeatType mRepeating = RepeatType.None;
- private boolean mDetectHeadset = true;
private OnAudioFocusChangeListener audioFocusListener;
- private ComponentName mRemoteControlClientReceiverComponent;
+ private boolean mDetectHeadset = true;
private PowerManager.WakeLock mWakeLock;
+ // Index management
+ /**
+ * Stack of previously played indexes, used in shuffle mode
+ */
+ private Stack<Integer> mPrevious;
+ private int mCurrentIndex; // Set to -1 if no media is currently loaded
+ private int mPrevIndex; // Set to -1 if no previous media
+ private int mNextIndex; // Set to -1 if no next media
+
+ // Playback management
+ private boolean mShuffling = false;
+ private RepeatType mRepeating = RepeatType.None;
+
+ // RemoteControlClient-related
/**
* RemoteControlClient is for lock screen playback control.
*/
private RemoteControlClient mRemoteControlClient = null;
private RemoteControlClientReceiver mRemoteControlClientReceiver = null;
-
/**
* Last widget position update timestamp
*/
private long mWidgetPositionTimestamp = Calendar.getInstance().getTimeInMillis();
+ private ComponentName mRemoteControlClientReceiverComponent;
@Override
public void onCreate() {
More information about the Android
mailing list