aboutsummaryrefslogtreecommitdiff
path: root/subsonic-android/src
diff options
context:
space:
mode:
authorScott Jackson <daneren2005@gmail.com>2013-04-06 11:35:14 -0700
committerScott Jackson <daneren2005@gmail.com>2013-04-06 11:35:14 -0700
commit43ae5d455bc2cbeab5b2518c36f383b1e65d83b0 (patch)
tree0d724271199db2ae94f9681f0a9f0191ffd59233 /subsonic-android/src
parent3a9360b3196c5b90fca77f34cccdac26f2e8d6e5 (diff)
parente9686ffb317fa42339bdb9b22df4e5c45ce857c8 (diff)
downloaddsub-43ae5d455bc2cbeab5b2518c36f383b1e65d83b0.tar.gz
dsub-43ae5d455bc2cbeab5b2518c36f383b1e65d83b0.tar.bz2
dsub-43ae5d455bc2cbeab5b2518c36f383b1e65d83b0.zip
Merge branch 'master' of https://github.com/daneren2005/Subsonic.git
Diffstat (limited to 'subsonic-android/src')
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java4
-rw-r--r--subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java13
2 files changed, 9 insertions, 8 deletions
diff --git a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
index fd2f31d4..36a8d17d 100644
--- a/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
+++ b/subsonic-android/src/github/daneren2005/dsub/activity/MainActivity.java
@@ -343,7 +343,7 @@ public class MainActivity extends SubsonicTabActivity {
protected void done(File logcat) {
Intent email = new Intent(android.content.Intent.ACTION_SEND);
email.setType("text/plain");
- email.putExtra(Intent.EXTRA_EMAIL, new String[] {"daneren2005@gmail.com"});
+ email.putExtra(Intent.EXTRA_EMAIL, new String[] {"dsub.android@gmail.com"});
email.putExtra(Intent.EXTRA_SUBJECT, "DSub " + version + " Error Logs");
email.putExtra(Intent.EXTRA_TEXT, "Describe the problem here");
Uri attachment = Uri.fromFile(logcat);
@@ -353,4 +353,4 @@ public class MainActivity extends SubsonicTabActivity {
}.execute();
} catch(Exception e) {}
}
-} \ No newline at end of file
+}
diff --git a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
index dbac97bc..661b9503 100644
--- a/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
+++ b/subsonic-android/src/github/daneren2005/dsub/service/DownloadServiceImpl.java
@@ -537,16 +537,16 @@ public class DownloadServiceImpl extends Service implements DownloadService {
}
nextSetup = false;
+ if(nextPlayingTask != null) {
+ nextPlayingTask.cancel();
+ nextPlayingTask = null;
+ }
if(index < size() && index != -1) {
nextPlaying = downloadList.get(index);
nextPlayingTask = new CheckCompletionTask(nextPlaying);
nextPlayingTask.start();
} else {
nextPlaying = null;
- if(nextPlayingTask != null) {
- nextPlayingTask.cancel();
- }
- nextPlayingTask = null;
setNextPlayerState(IDLE);
}
}
@@ -608,6 +608,7 @@ public class DownloadServiceImpl extends Service implements DownloadService {
} else {
if(nextPlayingTask != null) {
nextPlayingTask.cancel();
+ nextPlayingTask = null;
}
setCurrentPlaying(index, start);
if (start) {
@@ -1103,12 +1104,12 @@ public class DownloadServiceImpl extends Service implements DownloadService {
mediaPlayer.setOnCompletionListener(new MediaPlayer.OnCompletionListener() {
@Override
public void onCompletion(MediaPlayer mediaPlayer) {
- setPlayerStateCompleted();
-
// Acquire a temporary wakelock, since when we return from
// this callback the MediaPlayer will release its wakelock
// and allow the device to go to sleep.
wakeLock.acquire(60000);
+
+ setPlayerStateCompleted();
int pos = cachedPosition;
Log.i(TAG, "Ending position " + pos + " of " + duration);