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

@ -294,4 +294,5 @@
<string name="sort_order_artist">艺术家</string>
<string name="sort_order_album">专辑</string>
<string name="sort_order_year">年份</string>
<string name="finish_current_music_sleep_timer">播完当前音乐</string>
</resources>