[Android] AudioService: cosmetics
Jean-Baptiste Kempf
git at videolan.org
Sat May 23 17:21:26 CEST 2015
vlc-ports/android | branch: master | Jean-Baptiste Kempf <jb at videolan.org> | Sat May 23 17:21:16 2015 +0200| [7dd5cc7ad26bdd6f399fbbf30ea685937931ed90] | committer: Jean-Baptiste Kempf
AudioService: cosmetics
> http://git.videolan.org/gitweb.cgi/vlc-ports/android.git/?a=commit;h=7dd5cc7ad26bdd6f399fbbf30ea685937931ed90
---
.../src/org/videolan/vlc/audio/AudioService.java | 17 +++++------------
1 file changed, 5 insertions(+), 12 deletions(-)
diff --git a/vlc-android/src/org/videolan/vlc/audio/AudioService.java b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
index e2934e2..2c6dd0a 100644
--- a/vlc-android/src/org/videolan/vlc/audio/AudioService.java
+++ b/vlc-android/src/org/videolan/vlc/audio/AudioService.java
@@ -720,9 +720,9 @@ public class AudioService extends Service {
break;
}
}
- };
+ }
- @TargetApi(Build.VERSION_CODES.JELLY_BEAN)
+ @TargetApi(Build.VERSION_CODES.LOLLIPOP)
private void showNotification() {
try {
MediaWrapper media = getCurrentMedia();
@@ -1428,18 +1428,12 @@ public class AudioService extends Service {
@Override
public boolean hasNext() throws RemoteException {
- if (mNextIndex != -1)
- return true;
- else
- return false;
+ return mNextIndex != -1;
}
@Override
public boolean hasPrevious() throws RemoteException {
- if (mPrevIndex != -1)
- return true;
- else
- return false;
+ return mPrevIndex != -1;
}
@Override
@@ -1502,8 +1496,7 @@ public class AudioService extends Service {
// no more than one widget update for each 1/50 of the song
long timestamp = Calendar.getInstance().getTimeInMillis();
if (!hasCurrentMedia()
- || timestamp - mWidgetPositionTimestamp < getCurrentMedia()
- .getLength() / 50)
+ || timestamp - mWidgetPositionTimestamp < getCurrentMedia().getLength() / 50)
return;
updateWidgetState(context);
More information about the Android
mailing list