Removed the fade in/out on play/pause option because it caused bugs with the audiofocus and complicated the development. -> Fixed the audiofocus problem where the music wont start playing again when gaining focus back.

This commit is contained in:
Karim Abou Zeid 2015-06-28 23:18:04 +02:00
commit 593211bd2b
6 changed files with 30 additions and 106 deletions

View file

@ -59,7 +59,7 @@ public class MusicPlayerRemote {
public static void pauseSong() {
if (musicService != null) {
musicService.pause(false);
musicService.pause();
}
}
@ -82,12 +82,12 @@ public class MusicPlayerRemote {
}
public static boolean isPlaying() {
return musicService != null && musicService.isPlayingAndNotFadingDown();
return musicService != null && musicService.isPlaying();
}
public static void resumePlaying() {
if (musicService != null) {
musicService.play(false);
musicService.play();
}
}

View file

@ -90,7 +90,7 @@ public class PlayingNotificationHelper {
}
this.isColored = isColored;
currentSong = song;
this.isPlaying = service.isPlayingAndNotFadingDown();
this.isPlaying = service.isPlaying();
if (!isReceiverRegistered)
service.registerReceiver(notificationColorPreferenceChangedReceiver, intentFilter);
isReceiverRegistered = true;