63 Commits

Author SHA1 Message Date
Adrian Ulrich
12824fd47b make enterSleepState() synchronized.
There are a few crashes in the play store where the framework complains that we are underlocked.
Maybe this races with onDestroy() in some rare cases.
2018-10-13 09:42:52 +02:00
Antic1tizen One
45b6063515 Update plugin waking code, fix crash on Oreo devices (#840)
* Update plugin waking code, fix crash on Oreo devices

In Android Oreo we can't use services without bringing them to the
foreground, i.e. showing icon and following specified lifecycle.

After some consideration the new way was implemented for plugin system.
Plugins will no longer have bound service and instead will do everything
required from within their activities. All background logic that
previously resided in services will now be performed before the activity
has even shown its window. This greatly reduces complexity and cost
associated with bringing service model in accordance with Oreo
guidelines. The only downside to this approach is small flickering
or pause in emulators as activities still expect to show themselves
on start instead of disappearing again.

* Move value to class-level constant
2018-09-29 10:47:47 +02:00
Adrian Ulrich
4bd4fb700a Really fix file picker. 2018-08-26 16:47:22 +02:00
Dmitri Davydok
3f0c7bb7a3 Implement some of the features present in Google Play Music: (#804)
report the current song's position in the queue to the remote control;
report the current song's playback position to the remote control.
2018-08-21 21:04:06 +02:00
Antic1tizen One
2fdac736b3 Scroll the queue only when the requested song is not on screen (#812)
Now if the option "scroll to the queue position" is enabled and
a user is selecting a song in queue it immediately disappears from under
the finger and jumps to the top of currently visible list.

This patch fixes this behaviour - only scroll if next (or previous) song
falls out of list view visible range. I.e. sudden scrolling will never
happen if user clicks an item in queue as it's currently visible.
2018-08-20 21:23:55 +02:00
Adrian Ulrich
e07fcc768b Fix file picker
We swapped the 'recursive' flag, shamecube.
2018-08-20 21:21:36 +02:00
Adrian Ulrich
d0fbb0eed0 Add minor PlaylistObserver bugfixes.
* use mHandler.quit() on lower API versions
* do not trust filesystem version of playlists if folder is not writable
* disable debug logger
2018-08-11 10:14:10 +02:00
Adrian Ulrich
480df8e99a use setSong() callback in scrolling 2018-08-06 19:49:38 +02:00
minus
a44d959716 Add option to scroll to new track on song change (#802)
Adds a new setting to scroll the queue to the new song after a song
change. The new song will be at the top of the view.
2018-08-05 11:01:46 +02:00
Adrian Ulrich
0a9297a16c disable playlist sync by default 2018-08-04 08:55:46 +02:00
Ub1Catcrush
317641bc30 A patch to add support for covers stored in the media files ID3Tag. (#796)
* A patch to add support for covers stored in the media files IDTag.

* implement some suggested changes

* implement review comments
2018-07-21 17:53:20 +02:00
Adrian Ulrich
4e3c440f80 Make playlist folder a config option 2018-07-15 21:01:41 +02:00
Adrian Ulrich
a8f84d85b4 Add dependency support to ListPreferenceSummary.
Disable dependent views if value is "0".
2018-07-15 20:36:08 +02:00
Adrian Ulrich
068352505c Do not import M3U if no metadata exists 2018-07-15 19:45:07 +02:00
Adrian Ulrich
b6fc1b8e31 Do not write EXTM3U 2018-07-09 19:40:22 +02:00
Adrian Ulrich
6992342f15 Make buildFileQuery more flexible.
Add 'recursive' parameter, giving the caller the choice between an exact or recursive match.
2018-07-09 19:38:37 +02:00
Thomas Hines
2354f7ee3a Included song title, ablum and artist in broadcast even when there is no Android media ID for the track. (#791) 2018-07-07 11:14:30 +02:00
Adrian Ulrich
b957b49e72 Add new PlaylistObserver which deprecates PlaylistBridge 2018-07-07 11:13:16 +02:00
Adrian Ulrich
92c4273a5e Add PLAYLIST_SYNC_MODE pref keys 2018-07-07 10:46:57 +02:00
Adrian Ulrich
5fbad4b5dd add M3U debug-dump function 2018-07-06 22:40:48 +02:00
Adrian Ulrich
629f0e0b8d Add LibraryObserver.Values.* 2018-07-06 22:18:39 +02:00
Adrian Ulrich
474402c119 fix NPE in DraggableRow
line1 might be null for whatever reason (playlist with deleted songs during scan) - use placeholder text
for line1 if it is not a string object.
2018-07-06 21:05:08 +02:00
Adrian Ulrich
f48ed019c7 Report affected playlists in removeFromPlaylist 2018-07-06 21:00:51 +02:00
Adrian Ulrich
e01117fb55 introduce playlist-observer metadata 2018-07-03 12:29:08 +02:00
Adrian Ulrich
4715bd3c31 implement simple m3u writer 2018-07-02 20:49:28 +02:00
Adrian Ulrich
eba6acabc2 introduce PlaylistObserver 2018-06-30 10:32:21 +02:00
Adrian Ulrich
0c51c89d22 share Paint between onDraw calls 2018-06-28 22:05:56 +02:00
Adrian Ulrich
f1f656ebb8 remove hardcoded /sdcard reference 2018-06-28 21:41:20 +02:00
Adrian Ulrich
11dde262ee Replace ContentObserver with own LibraryObserver class 2018-06-25 20:49:12 +02:00
Adrian Ulrich
8035b6c6fc make expand_or_play_all the default library action 2018-06-21 08:12:09 +02:00
Adrian Ulrich
bd9676c139 fix back button behavior 2018-06-16 16:08:33 +02:00
Adrian Ulrich
54414e1a4f Fix menu in portrait mode.
SlidingView can now report why it is expanded, so the code is able to judge whether or not any UI elements are overlayd by the slide
2018-06-16 15:44:51 +02:00
Adrian Ulrich
ef0d852b05 Add horizontal layout 2018-06-04 21:18:05 +02:00
Comarch Technologies
32f0df170d Fix duplicated shuffle active mode. (#784) 2018-05-30 21:24:19 +02:00
Adrian Ulrich
0f82821e29 Use v4 support library
Our APK size stays at 1.1MB with minification enabled - which doesn't seem to break us anymore.
And ant is dead, so... let's obey gradle.
2018-05-28 20:20:36 +02:00
Loosefish
47dc655ccb Add library action expand or play all. (#776)
Like with the expand action it will first try to expand a selected
item. If the item can't be expanded it will use play all instead of play.
2018-05-21 14:10:47 +02:00
Adrian Ulrich
9d12df990f add db dump option 2018-05-21 14:01:12 +02:00
Adrian Ulrich
9ec67e28bf move MENU_GO_HOME control to onPrepareOptionsMenu.
This is a special-snowflake menu entry which is only visible in one specific adapter.
Let onPrepareOptionsMenu fully manage it to avoid clashes with SlidingPlaybackView's menu entry hider.
2018-05-13 18:11:43 +02:00
Adrian Ulrich
a77b0a5952 format duration in fastscroller 2018-05-06 20:56:41 +02:00
Adrian Ulrich
5ff7f8eddb Handle destroied PlaybackService instances.
ShowQueueFragment used to keep a reference to PlaybackService - which may get stale at some point (if the service is re-created), causing the fragment to lose any functionality.

This commit gets rid of the long lived reference.
(Note that the Adapter still has a semi-long-lived reference. Thats not nice but okay as it only needs to access the SongTimeline)
2018-05-05 12:06:33 +02:00
Adrian Ulrich
d2b751e841 make refreshSongQueueList private. 2018-05-05 10:26:03 +02:00
Adrian Ulrich
4dd50014b3 Restyle sort dialog, make it somewhat nicer 2018-04-24 22:11:30 +02:00
Adrian Ulrich
a1bcb87c31 Add option to sort tracks by duration 2018-04-24 21:32:38 +02:00
Adrian Ulrich
5686a9b3f1 also display artist and album in playlist view 2018-04-22 15:54:58 +02:00
Adrian Ulrich
428ae19d7c display duration in bottom right corner 2018-04-18 21:51:42 +02:00
Adrian Ulrich
383120edcc remove superfluent file.getName() call 2018-04-18 21:41:51 +02:00
Adrian Ulrich
1fb95734b5 Get rid of getTextView() and provide setText methods for DraggableRow. 2018-04-18 21:38:36 +02:00
Adrian Ulrich
89237188b0 use NAME_SORT to sort playlists 2018-04-16 16:22:02 +02:00
Adrian Ulrich
cb96508d97 update DB to 20180416
This adds name_sort to our playlist code
2018-04-16 16:17:29 +02:00
Adrian Ulrich
5367d74692 also show duration in track list 2018-04-16 15:07:04 +02:00