thibseisel / android-odeon

A simple but efficient music player on Android.
Apache License 2.0
69 stars 9 forks source link

[Bug] Service is restarted in inconsistent state after being killed by the system #19

Open thibseisel opened 3 years ago

thibseisel commented 3 years ago

Version: 2.1.0

Summary After playback has been started and paused for a long time, service may be killed by the Android system to reclaim memory. Some random time after being killed, the service is restarted and displays a notification for the last played media ; it incorrectly marks the player as being playing ; clicking buttons on the notification does nothing.

Reproducible steps

  1. Open the app.
  2. Select a track to play or resume last played queue. Playback should start.
  3. Close the app by swiping it out from recents. Playback should continue in the background.
  4. Pause playback using "pause" button of the notification.
  5. In a terminal on the development machine, run adb shell am kill fr.nihilus.music to simulate system killing the app process.
  6. Current notification should disappear, then another notification should pop in for the track that was playing, but with a "pause" button instead of "play". The notification is not responsive.