107 Commits

Author SHA1 Message Date
Antic1tizen One
4210a9ece0 Speedup plugin search, add quick plugin button (#887)
We are now fully switched to activity-based plugin
start system, so we don't need to start service or
wake activity anymore. Delete relevant part.

If the additiona; information is needed about the
plugin we can dig it out from its broadcast receiver.

Also, add quick "Plugins" button to the full playback
activity so there are only 2 clicks away from any plugin.
2018-12-28 10:17:26 +01:00
Jitnaught
e6df2ed2ba Fix MediaScanner incorrectly handling empty/whitespace title/album/artist/disc number (#886)
* Fixed media scanner not correctly handling empty or whitespace title/album/artist/disc number.

* Moved string unset check to function.
2018-12-28 10:14:55 +01:00
Adrian Ulrich
92a23a09d5 Fix song.hashCode() to work on Android 4.x devices.
Older android releases do not implement java.lang.Long.hashCode.
2018-12-11 20:17:02 +01:00
Adrian Ulrich
17920a5103 do not compare song object by reference 2018-12-10 20:04:35 +01:00
Adrian Ulrich
7fe09ad005 override hashCode and equals for song object 2018-12-10 20:04:25 +01:00
Adrian Ulrich
e997ac9207 Set notifyForDescendants to true.
This is needed for newer api versions to make contentObserver work.
2018-12-03 22:01:55 +01:00
Adrian Ulrich
66bebc8709 move seek bar to bottom 2018-12-03 21:56:00 +01:00
Adrian Ulrich
9e23dfce15 report whether we consumed the event, so we don't need to lie to the parent view 2018-12-03 20:29:11 +01:00
Adrian Ulrich
873674232c do not enforce height on Holo 2018-11-25 17:06:51 +01:00
Adrian Ulrich
7ffd0169b3 patch DragSortListView to support setOnTouchListener calls.
This enables users of a DSLV to call setOnTouchListener without breaking the drag functionality.
2018-11-25 14:42:09 +01:00
Adrian Ulrich
597d704e4e Have the popup menu overlap its parent 2018-11-24 21:12:24 +01:00
Adrian Ulrich
bad663761a fix horizontal calculation 2018-11-24 20:45:03 +01:00
Adrian Ulrich
f8fd73999e improve size calculation 2018-11-24 20:33:09 +01:00
Adrian Ulrich
89b110e5ea Improve listview measurement 2018-11-24 20:14:11 +01:00
Adrian Ulrich
82d8b7cccd use coordclicklistener in all places 2018-11-22 21:15:08 +01:00
Adrian Ulrich
715b80044f Make fancymenu a ListPopupWindow 2018-11-22 21:07:34 +01:00
Dmitri Davydok
eea0e444db Add stop to allowed actions. (#874) 2018-11-21 20:32:42 +01:00
Toby Hsieh
d00b3e4769 Add a Jump to Time dialog (#868)
* Add a Jump to Time dialog

This implements #827 by adding a context menu entry to open a dialog
that allows the user to input a time/position to seek to for the current
song.

* Use callback interface for JumpToTimeDialog position submission

* Automatically show soft keyboard for JumpToTimeDialog

* Automatically move to next EditText in JumpToTimeDialog

* Crash if JumpToTimeDialog is started by wrong activity
2018-11-15 18:28:00 +01:00
Adrian Ulrich
c112925890 Use ViewHolder in item click event 2018-11-12 18:13:57 +01:00
Adrian Ulrich
72710df2c1 Fix fancymenu on Android 4.x 2018-11-12 13:54:29 +01:00
Adrian Ulrich
0c8e81c85d Set title for playlist dialog 2018-11-12 11:03:56 +01:00
Adrian Ulrich
fae1f7207b add fancymanu to playlist activity 2018-11-12 10:57:34 +01:00
Adrian Ulrich
5e39f5ceec Add FancyMenu to ShowQueueFragment 2018-11-12 10:41:23 +01:00
Adrian Ulrich
77f48a00f5 update icons 2018-11-12 09:45:07 +01:00
Adrian Ulrich
0df0328eef Add menu drawables 2018-11-02 20:49:52 +01:00
Adrian Ulrich
5a0fd2b538 Introduce FancyMenu.
A menu-item like menu which gives us better layout control.
2018-11-01 20:55:32 +01:00
Adrian Ulrich
885618ef36 redo text at bottom layout 2018-10-27 19:02:26 +02:00
Adrian Ulrich
2afbfcb90f Avoid crash if empty is label (no genre) 2018-10-27 11:18:34 +02:00
Adrian Ulrich
779d418a9d disable add-to-homescreen for files 2018-10-27 10:50:47 +02:00
Adrian Ulrich
20962e37d0 Reorganise context menu 2018-10-26 22:17:30 +02:00
Adrian Ulrich
4ac874d4de support for legacy devices 2018-10-26 21:24:06 +02:00
Adrian Ulrich
62e498a1a9 initial shortcut support 2018-10-26 20:20:15 +02:00
Adrian Ulrich
1364754980 allow to stort albums by duration 2018-10-24 20:41:15 +02:00
Adrian Ulrich
13fff22d0c Check full native media library if startNormalScan() is called.
Make library scans more agressive, even if we not scan the full filesystem.

This is only invoked by background scheduler scans OR user triggered actions.
The quickscan will still only check the library diff.
2018-10-22 21:15:01 +02:00
Adrian Ulrich
c6fedb9e17 do not index hidden files or folders. 2018-10-22 21:03:24 +02:00
Adrian Ulrich
e3b878e69b fix loading of unindexed files via dispatch.
This is so brittle but the best thing we have - thanks to this patch, it even starts to work (again).
2018-10-22 20:34:32 +02:00
Toby Hsieh
17eea6c868 Display durations in albums tab (#857) 2018-10-22 19:00:33 +02:00
Toby Hsieh
6ab4e137ac Set STYLE_NO_TITLE for TrackDetailsDialog (#855)
This gets rid of the blank title section in the dialog when shown on the
playlist activity and on older versions of Android.
2018-10-19 08:04:51 +02:00
Toby Hsieh
71acc1782d Add context menu for song/track details dialog (#849)
* Add context menu for song/track details dialog

This addresses #506

* Add GPL 3 boilerplate to files

* Refactor track and disc number string for song details
2018-10-17 08:24:53 +02:00
Adrian Ulrich
7339681907 use Long.valueOf 2018-10-14 20:13:54 +02:00
Adrian Ulrich
dd24247fea remove reference to context in static class. 2018-10-14 20:09:59 +02:00
Adrian Ulrich
d1af6dab36 use apply() to store preferences. 2018-10-14 19:54:52 +02:00
Adrian Ulrich
ce9ccd9bd4 Unregister sharedpreferences listener on destroy.
If the playback service is stopped before the main activity gets killed, this would have caused the old class to still get updates.

Sending preference updates to such an orphaned PlaybackService would trigger crashes in some cases (especially when MediaLibrary detects suspicious unregisters).
2018-10-14 19:44:51 +02:00
Antic1tizen One
e2598806ac No smooth scroll if user doesn't see it. Fixes vanilla-music/vanilla#844 (#847)
The change adds interactive check to see if smooth scroll is actually
needed. If user doesn't see the library screen there's no point in
doing smooth scroll.

Besides, for old Android versions (like 4.x)
View.getFirstVisiblePosition, View.getLastVisiblePosition calls are
working only if view is currently visible.
2018-10-13 12:13:57 +02:00
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