2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-28 12:47:43 +00:00

133 Commits

Author SHA1 Message Date
Matthijs Tijink
66aa6696cc Use a queue of unsent packets instead of threads
This also allows "unsending" packets (if they're still in the queue).
This patch does that for mouse move packets, so they get accumulated
together (sending less stuff over a congested link).
2019-07-20 20:21:44 +00:00
Albert Vaca Cintora
bdcefe4a2b Merge branch 'albertvaka/presenter-pointer'
# Conflicts:
#	res/values/strings.xml
#	src/org/kde/kdeconnect/Plugins/PresenterPlugin/PresenterActivity.java
2019-07-19 23:02:39 +02:00
Albert Vaca Cintora
2595d97fad Use capabilities to enable presenter pointer 2019-07-19 22:58:59 +02:00
Albert Vaca
47c2483d53 Remove gui counters logic
It had bugs and was never used. I've left in the Discovery Mode logic
because we might want to expose that somehow like GSConnect does.
2019-06-27 10:48:33 -04:00
Nicolas Fella
71b034a025 Fix packet loss after connection 2019-06-13 17:33:21 +00:00
Nicolas Fella
d7c8f61c80 Unify coding style 2019-04-19 23:47:18 +02:00
Albert Vaca Cintora
168b16527c Remove compat with protocol 6 with RSA encryption
Since we already removed compat with protocol 7 ^.^u
2019-04-18 19:52:30 +02:00
Nicolas Fella
f1194e88c2 Use Log.e instead of printStackTrace 2019-03-31 20:09:44 +02:00
Nicolas Fella
d03520ce70 Fix lost packets after connecting 2019-03-21 16:36:00 +00:00
Albert Vaca Cintora
6250b67985 Notifications plugin now shows as "without permission" instead of "failed"
Removed the concept of "failed" plugins
2019-02-12 13:21:59 +01:00
Albert Vaca Cintora
78b38b5a00 Use ClassIndex to create a list of plugins in compile time
Instead of manually initializing a map statically.
2019-02-11 20:08:18 +01:00
Erik Duisters
4173338974 Make tapping on a pair notification work again
Summary:
The Simplify pairing from notification patch D16518 broke the functionality that
tapping on the notification provided

This patch makes tapping on the pairing notification work again as expected

Test Plan:
Before applying this patch initiate a pairing from kde
On android tap on the notification (not the action buttons) and notice that nothing happens

Apply the path and repeat the above test. Now the DeviceFragment should be displayed allowing
the the pairing to be accepted or rejected

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17886
2019-01-06 13:11:27 +01:00
Erik Duisters
f684fbe8ef Migrate from android support libraries to androidx
Summary: Use the new AndroidX libraries instead of the legacy support libraries

Test Plan: Apply patch and verify everything works as before

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: shubham, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17818
2018-12-27 16:43:34 +01:00
Nicolas Fella
e1096f5bc8 Make final where possible 2018-10-27 00:01:30 +02:00
Nicolas Fella
a49a145d69 Only use required access modifiers 2018-10-26 23:59:20 +02:00
Albert Vaca
a7a5beb7e8 Added a separate channel so notification in Oreo can be hidden 2018-05-20 23:32:08 +02:00
Nicolas Fella
73bf3e6fa1 Add channel to notifications.
Summary:
Oreo requires that each notification has a channel assigned. This patch uses a common channel for all. Individual channels for different notifications (Notifications plugin, pairing notifications, share plugin) could be done, but
since in our case notifications are not a critical part of the UX it does not seem necessary to me. Setting the channel on NotificationCompat.Builder requires version 26 of the support library, the implications of this were
discussed in D8966.

Reviewers: #kde_connect

Subscribers: mtijink, albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9514
2018-05-20 23:32:08 +02:00
Yoann Laissus
5463be96a4 Add detection of Android TV devices with a proper icon
KDE app :  https://phabricator.kde.org/D12802

Test Plan: Tested with an Android TV device (Nvidia Shield)

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: tfella, nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12803
2018-05-10 17:02:45 +02:00
Nicolas Fella
e712c69e15 Use lambdas where possible
Summary: Let Android Studio replace anonymous types with lambdas. No manual code change.

Test Plan: Compile and superficial behaviour test

Reviewers: #kde_connect, philipc

Reviewed By: #kde_connect, philipc

Subscribers: philipc, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12229
2018-05-09 14:03:08 +02:00
Albert Vaca
9b70e1e61f Rename NetworkPackage -> NetworkPacket
Summary: KDE Connect, now with correct naming!

Test Plan: It still builds.

Reviewers: #kde_connect, apol, nicolasfella

Reviewed By: #kde_connect, apol, nicolasfella

Subscribers: nicolasfella, apol

Differential Revision: https://phabricator.kde.org/D11035
2018-03-05 20:07:29 +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
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
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
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
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
0b83cfe06d Implement Android 6 Runtime Permissions
Differential Revision: https://phabricator.kde.org/D5876
2017-05-31 15:53:31 +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
Okoko Michaels
89ecdfc363 Accept or reject pair requests from the notification 2017-02-05 15:20:36 +01:00
Albert Vaca
ed4c0d24df Introduced NotificationHelper 2016-12-08 20:50:49 +01:00
Albert Vaca
e6bc78f013 Some refactoring on sendpackage to reduce allocations of empty callbacks 2016-12-08 20:50:49 +01:00
Albert Vaca
901440f78a Don't return an empty list of supported plugins
If we don't know it yet return them all.
2016-09-06 10:53:24 +02:00
Albert Vaca
a8838b57bb What XML file? 2016-08-29 11:49:25 +02:00
Albert Vaca
e49ab67e26 Oops, still one place was missing. 2016-07-14 14:43:39 +02:00
Albert Vaca
edc3075763 Reintroduced hack as we broke compatibility with devices using version 0.9
And bumped version to release
2016-07-14 07:13:50 +02:00
Albert Vaca
c5456fd84e Fixed issues detected in static analysis by Coverity 2016-07-07 17:45:04 +02:00
Albert Vaca
de81a20f82 Made capabilities static like in /r/128386/ 2016-07-06 17:45:12 +02:00
Saikrishna Arcot
7981d952ec Allow any type of list to be passed into NetworkPackage
And change return types to use List interface as well.

REVIEW: 128287
2016-06-28 21:53:26 +02:00
Albert Vaca
2d1dbd124c Fixed NPE if playerList was received null (which was due to a bug).
Maybe np.has(key) should return false if the key is set but null?
2016-06-26 17:07:57 +02:00
Albert Vaca
1a04bfbbea Fixed simple issues detected by lint 2016-06-21 16:44:21 +02:00
Albert Vaca
f6c4084746 error -> warning for some logs 2016-06-21 13:38:21 +02:00
Albert Vaca
010c960680 Check for trusted only once 2016-06-17 09:59:31 +02:00
Albert Vaca
24685348cf Moved hardcoded protocol version numbers to constants 2016-06-14 17:39:20 +02:00
Albert Vaca
0836453c35 Project-wise optimize imports 2016-06-09 13:42:54 +02:00
Albert Vaca
e9e93423f1 Don't complain about our own packet types 2016-06-06 23:56:01 +02:00
Albert Vaca
8c86edcf33 Don't log an empty list 2016-06-06 18:05:48 +02:00
Albert Vaca
3f20af445a Renaming a package type was a bad call 2016-06-03 00:46:18 +02:00
Albert Vaca
e433ad8bce These logs are useless if we have no capabilities 2016-06-02 16:14:52 +02:00
Albert Vaca
53ca2a392c Hack got hackier 2016-06-02 15:57:12 +02:00