1384 Commits

Author SHA1 Message Date
Adrian Ulrich
4b06348059 fix notifications for android 8 2017-08-27 20:47:34 +02:00
Adrian Ulrich
d3b0436554 Sync FileProvider.java with android-7.0.0_r33 2017-08-27 19:41:52 +02:00
Adrian Ulrich
a104b68201 Use FileProvider to implement share function. 2017-08-27 19:21:22 +02:00
Adrian Ulrich
39168bc561 Add FileProvider.java (103998f0f71ce45147449044f57a6ba2618225a9) 2017-08-27 18:52:26 +02:00
Adrian Ulrich
1ad2a6fb8b Use postInvalidate instead of postInvalidateOnAnimation.
We still support android 4.0, which does not implement postInvalidateOnAnimation.
2017-08-26 09:50:18 +02:00
Adrian Ulrich
fa65bc393b add previous button to small notification 2017-08-22 21:34:26 +02:00
Adrian Ulrich
2b36ff3114 Add 'shortcuts' support 2017-08-11 21:49:31 +02:00
Adrian Ulrich
1b9bb0596d minor cover tweaks 2017-08-11 20:08:26 +02:00
Adrian Ulrich
caf24d645c improve cover artwork scaling 2017-08-10 12:39:27 +02:00
Adrian Ulrich
a44dca0d1b PlaylistDialog can handle LibraryAdapters, no need to cast to MediaAdapter 2017-08-10 10:59:14 +02:00
Adrian Ulrich
5d57fbea5b generateBitmap() doesn't like null songs.
But we may have to set a bitmap to null - just skip creating the cover if it would be null anyway.
2017-08-06 12:16:18 +02:00
Adrian Ulrich
34ad6a24b4 add help fragment 2017-08-05 13:02:56 +02:00
Adrian Ulrich
6bc3976dbb use context.getApplicationContext in MediaLibrary.
This ensures that we are not handing an Activity to our children
2017-08-05 12:28:48 +02:00
Adrian Ulrich
6bbc3800c2 Re-implement CoverView.
This implementation should hopefully drop less frames.
2017-08-03 20:35:56 +02:00
Adrian Ulrich
b308b97880 pick up ADTS files 2017-08-03 20:28:16 +02:00
Adrian Ulrich
5ccd9cb9a6 Always update album entries with new data 2017-07-16 19:32:45 +02:00
Dennis Guse
cab1dc8fdd Mark notifications showing media content as private. (#627)
* Mark notifications showing media content as private.

* Removed unnecessary setting of private/public for notifications
2017-07-05 18:52:44 +02:00
Adrian Ulrich
df853b06c3 increase precision in dpi calculation
Some devices have a density like 2.7, so we should use a float to do the calculation
2017-07-03 10:48:47 +02:00
Adrian Ulrich
53f097b469 sync with bastp 2017-07-03 10:03:05 +02:00
Adrian Ulrich
2666afd234 Wrap mirror links result in try/catch.
This seems to be racy on the receiver side and i have no real way to test it :-/
2017-07-03 09:21:25 +02:00
Adrian Ulrich
cd03f0b1f5 calculate cover sizes dynamically 2017-07-02 16:10:44 +02:00
Adrian Ulrich
0d4c8685ae handle NULLs in fastscroll alphabet.
Display a question mark if the value was NULL, this enables the fastscroller to scroll to NULL columns.
2017-07-02 15:41:13 +02:00
Adrian Ulrich
753410bbef rename getQueuePositionForSong into getQueuePositionForSongId() 2017-07-02 14:26:23 +02:00
Antic1tizen One
117572eb7c Jump to song in queue if picked just one (#624)
* Bump gradle versions needed for build

Android Studio already refuses to build it as-is,
so alter the versions required.

* Rename mode -> action for better readability

* Fix incorrect description on getByPos from timeline

* Jump to song in queue if picked one. Implements #604
2017-07-02 14:24:11 +02:00
Adrian Ulrich
023f0ef37f Workaround for samsung devices.
Looks like Samsunb broke getExternalMediaDirs() on 5.x as it tends to return a null File sometimes.

This code checks for it and falls back to the old case on total failure.
2017-06-26 19:38:06 +02:00
Adrian Ulrich
f88f96d615 default to Notification.PRIORITY_HIGH 2017-06-24 13:05:02 +02:00
Adrian Ulrich
ab91bda772 convert unixtime to string 2017-06-21 21:53:10 +02:00
Adrian Ulrich
345e45533c handle KEYCODE_SEARCH in FullPlaybackActivity 2017-06-21 21:00:11 +02:00
Adrian Ulrich
94b7566881 Handle KEYCODE_SEARCH 2017-06-19 19:07:11 +02:00
Adrian Ulrich
b9f0d2db88 force use of index on left joins to song-contributors.
SQLite versions on Android 4.x fail to pick up the index, resulting in a full table scan which is pretty horrible for performance.
We therefore change the views to force sqlite using the index.
2017-06-19 18:55:29 +02:00
Adrian Ulrich
7612febbab improve media dirs detection on newer android releases.
use getExternalMediaDirs() if available instead of guessing the path to the sd-card.
2017-06-18 18:23:08 +02:00
Adrian Ulrich
012b53e1ea also blacklist .tmp and .bin files 2017-06-10 12:38:01 +02:00
Adrian Ulrich
3481503633 Support for adding any content:// style URI 2017-06-10 12:31:26 +02:00
Adrian Ulrich
efb107b063 Fix context menues inside SlidingView for Android 7.x 2017-06-09 23:13:49 +02:00
Adrian Ulrich
c2ed38f0af Fix out of bounds error.
We might call timeline.add() with an invalid position if we skipped a song due to being unfilled.
Use 'added' instead of 'j' to calculate the queue position.
2017-06-09 09:37:03 +02:00
Adrian Ulrich
e74180f62b Display total amount of play time in stats. 2017-06-08 15:13:38 +02:00
Adrian Ulrich
db02f11963 Minor design tweaks. 2017-06-08 14:56:07 +02:00
Adrian Ulrich
a1252fd2d6 bump DB version and trigger a full clean 2017-06-08 14:01:57 +02:00
Adrian Ulrich
d6b1da50fb Fix renames
We failed to fully remove any orphaned artists, albums references, this could result in duplicate items showing up in the songs view.
2017-06-08 11:18:02 +02:00
Adrian Ulrich
981b22764f Nuke invalid song references
If a song somehow ends up with multiple artist, album entries, the view will show the song multiple times (each possible combination).

This is - confusing - and such a song should not exist. We are now deleting such entries during cleanups.
2017-06-07 21:53:38 +02:00
Adrian Ulrich
57992bad25 Add background circle to play button 2017-06-07 14:41:08 +02:00
Adrian Ulrich
f980395e3b Allow newlines in tags 2017-06-07 12:27:05 +02:00
Adrian Ulrich
3a421e7a39 Add missing cursor != null check.
Samsung seems to return a null cursor instead of throwing a SecurityException.
2017-05-31 18:37:59 +02:00
Adrian Ulrich
e0b0232621 draw note as default cover 2017-05-10 21:46:37 +02:00
Adrian Ulrich
dce63a6473 Sort by disc,track for mtime and playcount
Songs with the same mtime are likely in the same album, so sorting by disc and track doesn't hurt, especially as we sort by disc,track by default anyway when returning songs.
We also do the same for playcount sortings because we can.
2017-05-01 09:20:51 +02:00
Adrian Ulrich
6096bed5e6 fix shuffle for 'play as next'
The old code did not use the correct offsets, we now make sure to
pass the correct (= changed) range to the shuffle function.
2017-04-24 19:49:36 +02:00
Adrian Ulrich
303f9d2375 implement KEEP_SCREEN_ON 2017-04-24 19:16:43 +02:00
Adrian Ulrich
b792afcd7b Do not show dragger for filesystem view.
The icon already indicates the purpose of the row
2017-04-24 19:02:57 +02:00
Adrian Ulrich
f04a2f1186 Catch strange SecurityException.
No idea how people manage to hit this, but it seems to be a thing on Samsung phones.

Sample stacktrace:
java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider uri content://media/external/audio/media from pid=12655, uid=10269 requires android.permission.READ_EXTERNAL_STORAGE, or grantUriPermission()
	at android.os.Parcel.readException(Parcel.java:1620)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
	at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
	at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)
	at android.content.ContentResolver.query(ContentResolver.java:502)
	at android.content.ContentResolver.query(ContentResolver.java:445)
	at ch.blinkenlights.android.vanilla.MediaUtils.getAndroidMediaIds(MediaUtils.java:591)
	at ch.blinkenlights.android.vanilla.PlaybackService.scrobbleBroadcast(PlaybackService.java:1108)
	at ch.blinkenlights.android.vanilla.PlaybackService.broadcastChange(PlaybackService.java:1064)
	at ch.blinkenlights.android.vanilla.PlaybackService.handleMessage(PlaybackService.java:1543)
	at android.os.Handler.dispatchMessage(Handler.java:98)
	at android.os.Looper.loop(Looper.java:148)
	at android.os.HandlerThread.run(HandlerThread.java:61)

Note that this happens WHILE we play a song - so claiming to not have READ_EXTERNAL_STORAGE privileges seems to be - strange.
2017-04-22 18:37:35 +02:00
Adrian Ulrich
df49dd1a49 fix possible NPE
We register ourselfs as a callback receiver BEFORE the adapter has been created.
This crash is unlikely but happens once in a while according to the play store.
2017-04-22 18:30:25 +02:00