2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 21:27:40 +00:00

1535 Commits

Author SHA1 Message Date
Nicolas Fella
8d9681a05d Avoid empty XML tags
Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11006
2018-03-04 13:16:22 +01:00
Matthijs Tijink
59f72f658a Change mpris play/pause button color instead of removing it
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
2018-03-04 11:54:40 +01:00
l10n daemon script
f42993d03f GIT_SILENT made messages (after extraction) 2018-03-04 03:17:22 +01:00
Nicolas Fella
e72e0f61dd Rename MaterialActivity to MainActivity
Summary: Its more descriptive

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10951
2018-03-03 19:35:29 +01:00
Nicolas Fella
889251ed94 Avoid deprecated API
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
2018-03-03 16:28:35 +01:00
Nicolas Fella
93c19cbb76 Convert fields to local variables
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
2018-03-03 16:26:53 +01:00
Nicolas Fella
1456026bfc Simplify switch to if statement
Summary: Depends on D10946

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10947
2018-03-03 16:24:17 +01:00
Nicolas Fella
b54d4948d7 Remove commented code for real 2018-03-03 16:22:28 +01:00
Nicolas Fella
cfb7da7fd3 Merge branch 'master' of git://anongit.kde.org/kdeconnect-android 2018-03-03 16:18:00 +01:00
Nicolas Fella
ee952b0b3a Remove commented code
Summary: Depends on D10905

Test Plan: Compiles

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10907
2018-03-03 16:15:41 +01:00
Nicolas Fella
60049dab2a Apply coding style to whole project
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
2018-03-03 16:14:42 +01:00
Nicolas Fella
c2e9edc09c Remove unnecessary semicolons
Summary: Depends on D10905

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10946
2018-03-03 16:11:27 +01:00
Nicolas Fella
fa5a37c472 Apply coding style to whole project
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
2018-03-03 16:09:52 +01:00
Nicolas Fella
0a08cd43cb Inline more variables
Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10945
2018-03-03 15:56:32 +01:00
Nicolas Fella
49021b87af Remove unused imports
Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10948
2018-03-03 15:50:40 +01:00
Nicolas Fella
959c7c7220 Correctly handle changing canPlay, canPause, canGoNext and canGoPrevious
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
2018-03-03 15:26:49 +01:00
Nicolas Fella
6aa75a2e7e Format AndroidManifest.xml
Summary: Format it properly, replace empty bodies with sef-closing tag and remove commented tags

Test Plan: Runs

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10969
2018-03-03 15:25:20 +01:00
Kai Dombrowe
0b0b90f778 Fix stuck notifications in the share plugin
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
2018-03-03 15:17:27 +01:00
Matthijs Tijink
702977a01d Fix album art url canonicalization 2018-03-03 14:45:26 +01:00
l10n daemon script
6d84f5dd86 GIT_SILENT made messages (after extraction) 2018-03-01 03:24:15 +01:00
Nicolas Fella
79a933708e Remove unneded return 2018-03-01 02:45:21 +01:00
l10n daemon script
e8f9e2daf0 GIT_SILENT made messages (after extraction) 2018-02-28 03:17:07 +01:00
Tobias Fella
7130421624 Make encryption info available while not paired
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
2018-02-26 19:40:08 +01:00
l10n daemon script
6ccae1ca45 GIT_SILENT made messages (after extraction) 2018-02-26 03:15:09 +01:00
Matthijs Tijink
f280e8f44e Prefer selecting the playing player in the MPRIS activity
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
2018-02-25 16:42:24 +01:00
Matthijs Tijink
abc5526252 Put keyboard button in navigation bar when possible
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
2018-02-25 16:41:34 +01:00
Matthijs Tijink
63349d3643 Use small notification icons when available
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
2018-02-25 11:43:28 +01:00
l10n daemon script
d931820d09 GIT_SILENT made messages (after extraction) 2018-02-25 03:17:21 +01:00
Matthijs Tijink
2f127b3047 Add MPRIS media control notification
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
2018-02-24 17:01:08 +01:00
Matthijs Tijink
0d00b8aa4a Add album cover art support.
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
2018-02-24 16:21:11 +01:00
Nicolas Fella
e9a35d3bb2 Allow to blacklist numbers in the telephony plugin
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
2018-02-24 15:53:56 +01:00
l10n daemon script
101918f323 GIT_SILENT made messages (after extraction) 2018-02-24 03:16:06 +01:00
l10n daemon script
d8c0b40b9c GIT_SILENT made messages (after extraction) 2018-02-23 03:22:19 +01:00
Nicolas Fella
4d5d744920 Allow choosing a ringtone for FindMyPhone
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
2018-02-22 00:50:32 +01:00
Nicolas Fella
82db080a51 Apply some coding style to TelephonyPlugin
Summary: Unify coding style, remove commented code

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10519
2018-02-22 00:49:04 +01:00
l10n daemon script
97d69c674a GIT_SILENT made messages (after extraction) 2018-02-19 03:09:08 +01:00
Albert Vaca
7dd4583a24 Increased version number to release v1.7.2 2018-02-17 10:07:57 +01:00
Nicolas Fella
c05f13afac Loop ringtone in FindMyPhonePlugin
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
2018-02-01 11:47:45 +01:00
Nicolas Fella
de7d944230 Get rid of MaxWidthImageButton
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
2018-02-01 11:45:28 +01:00
l10n daemon script
b1daf1af0c GIT_SILENT made messages (after extraction) 2018-01-30 03:15:19 +01:00
l10n daemon script
baeec6afbf GIT_SILENT made messages (after extraction) 2018-01-29 03:17:09 +01:00
l10n daemon script
2187b273b9 GIT_SILENT made messages (after extraction) 2018-01-28 03:16:00 +01:00
l10n daemon script
1fa0585100 GIT_SILENT made messages (after extraction) 2018-01-27 03:15:25 +01:00
l10n daemon script
4e2460bf37 GIT_SILENT made messages (after extraction) 2018-01-25 03:18:02 +01:00
l10n daemon script
5e3e32d289 GIT_SILENT made messages (after extraction) 2018-01-23 03:18:45 +01:00
Albert Vaca
167f86affa Fix gradle deprecation warnings 2018-01-23 00:41:33 +01:00
Albert Vaca
53dfb299a7 Fix build from gradle's cli 2018-01-23 00:41:33 +01:00
l10n daemon script
c4e6c66809 GIT_SILENT made messages (after extraction) 2018-01-22 03:09:49 +01:00
l10n daemon script
1703276f37 GIT_SILENT made messages (after extraction) 2018-01-21 03:12:07 +01:00
Chris Holland
91ade6a846 Mention 2 fingers to scroll in mousepad_info
BUG: 389185

Differential Revision: https://phabricator.kde.org/D9977
2018-01-19 01:03:00 -05:00