Only works for old-school (not-Storage Access Framework) paths, so we have
to keep track of the fact that we are using one or the other.
Also this requires the permission DOWNLOAD_WITHOUT_NOTIFICATION, but
hopefully the play store won't make users confirm this one.
This behaviour is enabled by default.
This was very poorly implemented and can't stay as it is right now:
- Every second or so the art image was being loaded from disk, scaled,
base64 encoded and sent over the freakin network!
- The Android interface didn't take into account small screens, and
adding the image would cut stuff out of the screen.
- Didn't manage "edge cases" like playing a song without cover after one
with cover (previous image was still being shown) or changing players.
This reverts commit 24c404400f6e5092d38d4e26a948777c1545ca2b.
# Conflicts:
# src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java
# src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisPlugin.java
- Refactored the code to separate reading the file, sending it and
updating the notification. This last part it's now done in a standalone
sendPackage callback class.
- Added a non-async sendPacakge function to device, so we can properly
wait for a file to finish before sending the next one without using
recursive callbacks as before.
- Fixed bug that made it impossible to share more than one file from
certain apps. This was caused because we can't access content resolvers
any longer after closing the activity that was launched to "share" to.
Now we do the content resolutions first and once for all files.
- When sending more than one file, do not spam one notification for each.
- There is no need to update the notifications from the UI thread, now
we do it from a background thread instead.