Summary:
This prevents issues with buttons jumping around when canPlay/canPause is false, as some mpris players do not report consistent values.
Additionally, gives the play/pause button a bit more attention when enabled. What do you think?
When playing/pausing is enabled (i.e. nearly always):
{F5728047}
When disabled:
{F5728048}
Reviewers: #kde_connect, #vdg, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, nicolasfella
Differential Revision: https://phabricator.kde.org/D10796
Summary:
Depends on D10905
Use proper API
Test Plan: Pairing a device and using the drawer is still possible.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10934
Summary:
Depends on D10905
Convert to local variables where Android Studio suggested
Test Plan: Compiles
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10911
Summary: Sorry for the huge diff, but all I did was applying Android Studio's 'Reformat Code' to all files. If everyone does that before submitting a patch we can keep it clean easily.
Test Plan: Compiles
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, sredman, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10905
Summary: Sorry for the huge diff, but all I did was applying Android Studio's 'Reformat Code' to all files. If everyone does that before submitting a patch we can keep it clean easily.
Test Plan: Compiles
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, sredman, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10905
Summary:
Gwenview is adding MPRIS support in D10972. I tested it and noticed that it was quite buggy. Turns out,
Gwenviews implementation is (almost) fine, the problem was on our side. Unlike pure music players like
Spotify Gwenview changes canPlay, canPause, canGoNext and canGoPrevious when needed, but those updates
didn't reach our UI. The packages containing those updates were not parsed because they didn't contain
several fields.
Test Plan: Controlling Spotify and Gwenview (patched to support playPause) works fine now.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10981
Summary:
Android has a rate limit for updating notifications which was reduced
from 50 to 10 updates/sec since Nougat.
The share plugin updates the progress every time the percentage changes.
The final notification update which makes the notification removable,
is ignored if this happens more than 10 times in a second.
This patch reduces the progress updates to a maximum of 10 times per second.
BUG: 391059
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10976
Summary:
BUG:385796
Make encryption info available while there is no device paired. Previously, the menu option to show it was hidden when not connected.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Maniphest Tasks: T7212
Differential Revision: https://phabricator.kde.org/D10841
Summary: Previously, the MPRIS activity just showed the first player in the list when you opened the activity. Now it shows a playing player, when possible.
Test Plan: Tested with zero, one and multiple players, and with both playing and not playing players.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Differential Revision: https://phabricator.kde.org/D10821
Summary:
In the remote input activity, the keyboard button was in the overflow menu, even though it fit on the navigation bar. The previous code used the wrong namespace, so this fixes it.
BUG: 390640
Before:
{F5729325}
After:
{F5729326}
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: nicolasfella
Differential Revision: https://phabricator.kde.org/D10827
Summary:
The notification plugin now sends small notification icons, if the large
icon is not available.
Before patch, with icon:
{F5698607}
{F5698608}
Before patch, without icon:
{F5698612}
{F5698613}
After patch, without icon:
{F5698614}
{F5698616}
Test Plan: I tested notifications with small icons and those with large icons, and it works as expected.
Reviewers: #kde_connect, #vdg, fabianr, albertvaka
Reviewed By: #kde_connect, #vdg, fabianr, albertvaka
Subscribers: albertvaka, mmustac, fabianr, apol, nicolasfella
Differential Revision: https://phabricator.kde.org/D10165
Summary:
BUG: 337485
Adds a notification to show and control mpris players. It shows the title, artist etc. (so depends on D9083, but can easily be adapted to work without it, but that leads to less features).
The notification appears as soon as one of your connected devices plays music. If multiple devices/players are playing, it shows the information and controls for only one of these. If it stops playing, it tries to switch to another playing device/player. If those do not exist, it shows the same player, but allows starting it again.
Dismissing the notification is only possible if the showed player is paused (as effect, only when all players are paused). It automatically closes if the device or player disappears or disconnects and no other players are playing. I think this behaviour is intuitive, other native android music players have similar behaviour.
About the implementation: there are two parts to this: the notification and the media session control API. The first shows the notification and its controls. The second allows lock screen controls on older Android versions and control using e.g. headphone buttons. Since nearly all code is shared between the two parts, and the rest is mostly straightforward, I put them in the same diff.
Test Plan:
Tested on Android Nougat 7.1 (shows the notification with buttons, as expected; no lock screen controls, as expected) and Android Gingerbread 2.3 (shows a notification without buttons, lock screen controls work, so as expected).
I am not able to test with multiple desktops, so testing that would be appreciated.
Disabling buttons when not available should work, but all players I tested always allowed next/previous/play/pause.
Reviewers: #kde_connect, nicolasfella
Reviewed By: #kde_connect, nicolasfella
Subscribers: apol, albertvaka, nicolasfella
Tags: #kde_connect
Maniphest Tasks: T6512
Differential Revision: https://phabricator.kde.org/D9266
Summary:
Fetches http(s) album art urls, as supplied by MPRIS, to display as album art. Fetched urls and failed fetches are cached to prevent unneccessary network activity.
The bulk of the code is in the fetching+caching class `AlbumArtCache`.
Takes the comments from d52be10 into account:
- The images (HTTP(S) only for now) are cached. This is limited to 5 MB on disk or 10 entries in memory.
- The image gets viewing space depending on the remaining screen space. Thus, controls should never be pushed off-screen.
- "Edge cases" like going from cover art to no cover art is handled correctly (actually a result of earlier mpris code changes).
Additionally, it adds a landscape mode to the MPRIS activity, which shows the cover art and controls side by side.
Desktop part is in D9563.
FEATURE: 345015
Test Plan: Works both with/without album art. Switching players and tracks correctly changes the album art.
Reviewers: #kde_connect, #vdg, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: albertvaka, ngraham, nicolasfella, apol
Differential Revision: https://phabricator.kde.org/D9564
Summary:
Depends on D10519
Allow to specify a newline separated list of blocked numbers. This can be useful for 2FA/TAN that could be leaked to the desktop.
The protection is incomplete because the notification might be leaked trough the notificationsplugin anyway (T6651).
Test Plan:
Block my number, send SMS to self -> only notification from Notificationsplugin is shown.
Unblock it again -> both notifications are shown
Reviewers: #kde_connect, albertvaka, mtijink
Reviewed By: #kde_connect, albertvaka, mtijink
Subscribers: mtijink, albertvaka, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10520
Summary:
BUG: 379023
Let users choose a ring tone in the settings.
Test Plan: Open settings, choose a ringtone, search for device.
Reviewers: #kde_connect, albertvaka
Reviewed By: #kde_connect, albertvaka
Subscribers: mtijink, andyholmes, albertvaka, apol, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D10332
Summary:
BUG: 368089
FindMyPhone does not loop ringtones, which makes problems with short ringtones. Additionally, it depends on the volume of the alarm channel, so if the alarms are muted, no
sound can be heard. This patch raises the alarm volume to max when the activity gets started and restores the previous value when it stops.
Test Plan: Trigger findmyphone, hear sound looping. Set alarm volume to zero and check if it gets restored.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: mtijink, #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9947
Summary: There is no need to implement a custom view for that. It is only used in MPRIS Activity, which looks almost the same now, except that the play button aligns with the buttons beneath, which is better IMHO.
Reviewers: #kde_connect, mtijink
Reviewed By: #kde_connect, mtijink
Subscribers: #kde_connect
Tags: #kde_connect
Differential Revision: https://phabricator.kde.org/D9520