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

707 Commits

Author SHA1 Message Date
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
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
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
ee854bf7ad Replace deprecated ActionBarActivity by AppCompatActivity 2017-12-09 14:31:40 +01:00
Matthijs Tijink
147d8510d5 Simplify MPRIS callback code
Summary:
Makes sure the MPRIS data is always up-to-date, so requesting updates
separately is never necessary. Also provides a way to remove callbacks.

Test Plan: All information still appears in the MPRIS activity and the controls still work.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Differential Revision: https://phabricator.kde.org/D9084
2017-12-07 17:54:00 +01:00
Matthijs Tijink
044261ceb1 Use material icons in MPRIS activity
Summary: The previous icons were old (pre-Material, maybe even pre-Holo). The recommended practice now is to add the icons directly to your app, so I added the material icons. Note that the vector version is used; these are automatically converted to bitmaps for older android versions.

Reviewers: #kde_connect

Subscribers: apol

Differential Revision: https://phabricator.kde.org/D8955
2017-12-01 21:27:35 +01:00
Matthijs Tijink
cc8330a079 Make the player status a per-player object in the MPRIS plugin
Summary:
This directly fixes a couple of bugs (where the UI was not updated in all cases) and will allow different code parts to use different players without clashing with each other.

This is required for sensible behaviour while using the media control notification (which I plan to work on).

Reviewers: #kde_connect, thomasp, albertvaka

Reviewed By: #kde_connect, thomasp, albertvaka

Subscribers: albertvaka, apol, thomasp

Differential Revision: https://phabricator.kde.org/D8942
2017-12-01 00:36:43 +01:00
Nicolas Fella
9338641a78 Fix bug while refreshing
Summary: Fix bug mentioned in https://phabricator.kde.org/T6583

Reviewers: #kde_connect, jeanv, albertvaka

Reviewed By: #kde_connect, jeanv, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Maniphest Tasks: T6583

Differential Revision: https://phabricator.kde.org/D7372
2017-08-19 13:27:09 +02:00
Albert Vaca
83c8a30a71 Detect data corruption caused by sshfs 3.x and abort transfer 2017-08-06 18:09:55 +02:00
Albert Vaca
1cfddd409d Unused var 2017-08-01 22:24:25 +02:00
Albert Vaca
31e2d0b208 Match desktop buffer size 2017-08-01 22:23:18 +02:00
Albert Vaca
f630ea3e3f Fix progress not being displayed when 0% 2017-08-01 22:22:54 +02:00
Albert Vaca
407ce1ccb0 Make percentage be updated every 1% again, it seems to work. 2017-08-01 22:22:25 +02:00
Albert Vaca
7a097f7b27 Unused var 2017-08-01 22:21:44 +02:00
Nicolas Fella
bea90521c5 Direct Share
Summary:
Support Android 6 direct share.
BUG:362266
BackgroundService is a SIngleton now. This should only be used if strictly necessary.

Test Plan: Pick a random app with a share button, look for device entries in Sharing options (might not be there because other sharing options have higher priority)

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6743
2017-07-29 11:33:45 +02:00
Albert Vaca
2e1c91929e Oops, that was broken 2017-07-25 18:16:10 +02:00
Albert Vaca
df568ccad7 Coding style 2017-07-24 16:39:32 +02:00
Nicolas Fella
2ffeab0c5e Fixed exception while handling notifications
Summary: An exception occurred while processing non-repliable notifications

Test Plan: Send a non-repliable notification, look in log for exception

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: apol, albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6740
2017-07-17 15:26:00 +02:00
Albert Vaca
29108894a2 Announce name changes
BUG: 364150
2017-07-14 03:30:32 +02:00
Albert Vaca
4e6dc31247 Noti never changes to finished if we spam too many noti updates
Can reproduce it 100% on my phone, but seems to work fine on others...
2017-07-14 03:20:12 +02:00
Albert Vaca
5d87675586 Disable animation on tap on the list header 2017-07-14 02:47:46 +02:00
Albert Vaca
9fb3aaa9e0 Oops 2017-07-14 01:45:28 +02:00
Albert Vaca
69249fe408 Merge branch '1.x' 2017-07-14 01:38:54 +02:00
Albert Vaca
5bef181c8f Merge branch '1.x' of git.kde.org:kdeconnect-android into 1.x 2017-07-14 01:38:45 +02:00
Albert Vaca
065d22ebda Merge branch '1.x'
# Conflicts:
#	src/org/kde/kdeconnect/Plugins/TelepathyPlugin/TelepathyPlugin.java
2017-07-14 01:38:37 +02:00
Albert Vaca
a8842b189c Merge branch 'master' into 1.x
# Conflicts:
#	AndroidManifest.xml
#	res/values-es/strings.xml
#	res/values-fr/strings.xml
#	res/values-ru/strings.xml
#	res/values-sr/strings.xml
#	src/org/kde/kdeconnect/Helpers/NetworkHelper.java
#	src/org/kde/kdeconnect/Plugins/SftpPlugin/SftpPlugin.java
#	src/org/kde/kdeconnect/Plugins/TelepathyPlugin/TelepathyPlugin.java
#	src/org/kde/kdeconnect/Plugins/TelephonyPlugin/TelephonyPlugin.java
2017-07-14 01:12:13 +02:00
Nicolas Fella
34c84051c9 Runtime Permissions: optional Permissions
Summary: Added support for optional Permissions. Also provided explanations why the permissions are needed

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6094
2017-07-11 21:42:19 +02:00
Nicolas Fella
45f3311b70 SharePlugin refactoring
Summary:
Some refactoring in the Shareplugin:

Extracted some parts into separate methods
Extracted notification into separate class
Some optical tweaks on notifications

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6613
2017-07-11 10:49:52 +02:00
Albert Vaca
8a7f7231b5 Do not swallow the exception, wrap it and let it crash.
Returning null did make it crash on NPE anyway, and we lost info.
2017-07-09 18:30:20 +02:00
Albert Vaca
37aab9a520 Ignore all exceptions from ContentResolver.query 2017-06-21 03:27:03 +02:00
Albert Vaca
c18dc3b724 Fix crash when trying to stop stfp while it was mounted 2017-06-21 03:23:29 +02:00
Nicolas Fella
5886422d72 Fixed a bug in MousepadPlugin
Summary: Some values in the mousepad plugin had no default values because some strings were translated but shouldn't.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6097
2017-06-08 13:25:06 +02:00
Nicolas Fella
0b83cfe06d Implement Android 6 Runtime Permissions
Differential Revision: https://phabricator.kde.org/D5876
2017-05-31 15:53:31 +02:00
Albert Vaca
e13090066c Update the notification less often
Otherwise, for some reason it stops allowing further updates afterwards
and looks like the download never completed (even though it did).
2017-05-31 15:39:31 +02:00
Albert Vaca
07ec3f2132 Mark the notification as not ongoing when it's done 2017-05-31 15:39:31 +02:00
Albert Vaca
f8bb5d4dd4 Reuse the same builder 2017-05-31 15:39:31 +02:00
Julian Wolff
6d216b2766 reply to notifications
Summary: These changes allow replying to any notifications that offer quick reply text fields (like WhatsApp). Does work for WhatsApp. Does not work for Telegram.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka

Maniphest Tasks: T4674

Differential Revision: https://phabricator.kde.org/D5991
2017-05-31 15:38:14 +02:00
Albert Vaca
05d728b846 Don't lose the stacktrace. 2017-05-31 00:05:26 +02:00
Saikrishna Arcot
981685e926 Avoid NPE when pluginList is still getting updated, by starting the receiving thread after the pluginList is updated.
Also have the pluginList be initialized to an empty map.

REVIEW: 130140
2017-05-25 22:19:08 +02:00
Àlex Fiestas
20455f74ab Add Bluetooth support
This is a ported version of the patch submited in review:
https://git.reviewboard.kde.org/r/128270

It is disabled by default.

REVIEW: 128270
2017-05-25 00:08:29 +02:00
Albert Vaca
124a971a1f Never crash if there is a problem in isOnMobileNetwork 2017-05-24 00:29:33 +02:00
Albert Vaca
82b42fda67 Fix NPE 2017-05-24 00:23:57 +02:00
Albert Vaca
7c02f79c22 Attempt to fix NPE 2017-05-24 00:21:45 +02:00
Albert Vaca
23d54eaedf Fix crash on Android 5.1 when calling registerReceiver(null)
Plus small optimization by re-using the NetworkPackage.
2017-05-24 00:11:43 +02:00
Albert Vaca
7ad141bb6d Revert "Fixing sent SMS not appearing in the SMS app on old phones"
Doesn't seem to actually work.

This reverts commit 40c9b67033.
2017-05-23 23:00:31 +02:00
Albert Vaca
40c9b67033 Fixing sent SMS not appearing in the SMS app on old phones
BUG: 368069
2017-05-17 23:13:33 +02:00
Simon Redman
3f188b5526 Add support for sending and receiving multipart SMSes
Summary:
The SMS protocol does not support sending a message longer than 160 characters. Android's SmsManager.sendTextMessage(..) fails to send in case the message is too long.
Instead of failing, check the message length. If it is longer than 160 characters, break it up and send it as several messages

On receive, collect the list of messages, then combine their bodies

Test Plan:
Send a long message via KDE Connect and verify that it is actually sent
Send a short message via KDE Connect and verify that it can also be sent
Ideally: Test sending a message which is the maximum length for an SMS (160 characters) and verify that it is sent as exactly one SMS (And billed properly)

Receive a long message and verify that it is delivered as a single long message, even though we all know that it was transmitted as a multi-part SMS
Receive a short message and verify that it is correctly delivered

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka

Differential Revision: https://phabricator.kde.org/D5848
2017-05-16 21:03:59 +02:00
Albert Vaca
2d35b04713 Fix IllegalStateException: Fragment not attached to Activity
BUG: 379873
2017-05-16 21:01:45 +02:00