2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 06:05:12 +00:00
Commit Graph

1361 Commits

Author SHA1 Message Date
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
Albert Vaca
1b62a5ae32 Use stringbuilder 2018-01-17 00:05:57 +01:00
Albert Vaca
4b21d67da0 Increased minor version to release v1.7.1 2018-01-16 22:53:49 +01:00
Philip Cohn-Cort
5c3fcb1423 Prevent Android 8.1 crash
Summary:
The SSL/TLS handshake code in LanLinkProvider is normally invoked in parallel, so that multiple incoming messages can be read at once. However, this logic causes an unusual crash in Android 8.1's native openssl library.

Sample logcat of crash is available at https://paste.kde.org/ptolqcpya

This patch mitigates the issue by making the `addLink` function in that class synchronized. I recommend future work to determine whether there are any other thread-safety concerns in the handshake code.

Test Plan:
1. Designate a test wi-fi network
2. Disconnect all KDE Connect devices from that network
3. Install build on disconnected Android 8.1 device
4. Clear KDE Connect app data (if present) on 8.1 device
5. Connect 8.1 device to test wi-fi network
6. Connect any other KDE Connect device to test wi-fi network

Reviewers: albertvaka

Reviewed By: albertvaka

Differential Revision: https://phabricator.kde.org/D9739
2018-01-16 20:08:16 +01:00
l10n daemon script
79a58e12a1 GIT_SILENT made messages (after extraction) 2018-01-08 03:04:36 +01:00
Albert Vaca
92300a7d63 Create destination directory in case it doesn't exist 2018-01-07 16:52:57 +01:00
Nicolas Fella
e94959f9c3 Show notifications that are present when pairing
Summary:
When the plugin is created all current notifications are sent to the other device. When the NotificationListener is not ready at that time this is delayed until it is. This was intended before, but did not work because the
requestAnswer flag was set on the network packages. The desktop ignored those packages. I see no purpose for the requestAnswer flag so I removed it.

Depends on D9622

Test Plan: Create some notifications. Restart the desktop or the app and look for the notifications on the desktop

Reviewers: #kde_connect, mtijink, albertvaka

Reviewed By: #kde_connect, mtijink, albertvaka

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9558
2018-01-06 16:06:57 +01:00
Nicolas Fella
45bac893d9 Use getString instead of getCharsequence().toString()
Summary: Depends on D9621

Reviewers: #kde_connect, mtijink, albertvaka

Reviewed By: #kde_connect, mtijink, albertvaka

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9622
2018-01-06 16:05:48 +01:00
Nicolas Fella
fdaa632a39 Delete general_preferences.xml
Summary: It doesnt seems to be useful any more

Test Plan: Android Studios Safe delete found no usage

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9623
2018-01-06 16:04:03 +01:00
Nicolas Fella
22696f7c97 Restrict access modifiers to the necessary
Summary:
Set access to (package) private where possible
Depends on D9620

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9621
2018-01-03 21:09:28 +01:00
Nicolas Fella
7155042da0 Remove dead code
Summary:
Removed some dead code.

Depends on D9548

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9620
2018-01-03 20:54:14 +01:00
Nicolas Fella
d218a10004 Use minSdk in NotificationsPlugin
Summary:
Depends on D9546
Depends on D9619

Make use of the new minSdk feature.

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9548
2018-01-03 20:52:49 +01:00
Nicolas Fella
c9ca1f4906 Per Plugin minSdk Level
Summary:
Each plugin gets a minSdk level assigned. If this level isn't available the plugin doesn't get loaded. This can simplifie the plugin code by removing reccuring Sdk version checks.
Should we let the user know that a plugin is not available due to that or should it fail silently?

Actual Plugin adaptions come in follow-up patches.

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9546
2018-01-03 20:50:02 +01:00
Matthijs Tijink
ea9a5459fd Remove minimum and target API versions from manifest.
Summary: They are provided by the gradle build file.

Test Plan: I checked the generated merged manifest file.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Differential Revision: https://phabricator.kde.org/D9562
2018-01-03 20:40:53 +01:00
Nicolas Fella
9eda5bf072 Run Reformat Code on the notifications plugin
Summary: Bring law and order to the coding style

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9619
2018-01-03 20:21:35 +01:00
l10n daemon script
8052994232 GIT_SILENT made messages (after extraction) 2018-01-03 04:54:08 +01:00
Nicolas Fella
8e2757ecf3 Fix context in layout files
Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9524
2018-01-02 18:18:31 +01:00
Nicolas Fella
52f2067e55 Silence a warning in preference_with_button.xml
Summary: Using @android:id instead of @+android:id silences two Code Inspection errors

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9523
2018-01-02 18:17:21 +01:00
Matthijs Tijink
56fc69b3de Add new encryption cipher for Android 2.3 (API 9+) support
Summary:
Arch linux recently updated libraries which dropped support for RC4, used for connections to Android before Android 3 Honeycomb. Other distributions may also be affected (or will be affected in the future).

This adds a new cipher, supported by Android API 9+.

Test Plan: With this change (and corresponding desktop change) the app can connect again.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Differential Revision: https://phabricator.kde.org/D9449
2017-12-22 13:26:19 +01:00
Matthijs Tijink
8538121ed2 Receive MPRIS title, artist and album information
Summary: Receives the title, artist and album information from MPRIS, instead of a single "artist - title". The desktop counterpart is in D8957.

Test Plan: Works for me, both with and without D8957.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella

Differential Revision: https://phabricator.kde.org/D9083
2017-12-20 17:56:01 +01:00
Matthijs Tijink
c6746e38a0 Allow opening files shared to android using the notification
Summary:
Since Android Nougat, the previous way to open a file shared to android did not work anymore (using `file://` urls), as marked with a TODO.

This diff implements the new way of opening files: a content provider url (`content://`) allows opening files through the KDE Connect app. As an added benefit, apps without external files permission can now open files received by KDE Connect.

Test Plan: Works for me.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, nicolasfella

Differential Revision: https://phabricator.kde.org/D9331
2017-12-20 17:53:35 +01:00
Albert Vaca
90f03555c5 Updates for Android Studio 3.0 2017-12-09 15:36:21 +01:00
Albert Vaca
e9be9b9c87 Use appcompat libraries from maven instead of locally installed 2017-12-09 14:46:12 +01:00
Albert Vaca
ee854bf7ad Replace deprecated ActionBarActivity by AppCompatActivity 2017-12-09 14:31:40 +01:00
Albert Vaca
71106a3de3 Merge branch '1.x'
# Conflicts:
#	AndroidManifest.xml
#	res/values-da/strings.xml
#	res/values-eu/strings.xml
#	res/values-zh-rCN/strings.xml
2017-12-09 14:21:02 +01:00