Finish current music when Sleep Timer stops (#629)

Implement #329.
This commit adds a CheckBox to dialog_sleep_timer, and a curresponding
option `TIMER_FINISH_MUSIC` in PreferenceUtil.

In MusicService, a new flag `pendingQuit` is to indicate if it should
stop after current music stops. A new action `ACTION_PENDING_QUIT` will
set that flag.

Canceling is a little tricky. I must bind MusicService in Dialog
activity to check if `pendingQuit` is set, and show the corresponding
canceling button.
This commit is contained in:
Peng Guanwen 2019-01-08 10:45:33 +08:00 committed by Eugene
commit 2111c41836
6 changed files with 94 additions and 25 deletions

View file

@ -312,4 +312,5 @@
<string name="sort_order_artist">Artist</string>
<string name="sort_order_album">Album</string>
<string name="sort_order_year">Year</string>
<string name="finish_current_music_sleep_timer">Finish last song</string>
</resources>