2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-27 04:19:17 +00:00

154 Commits

Author SHA1 Message Date
Albert Vaca Cintora
01f44f524a package -> packet typo fixes 2023-03-17 18:57:02 +01:00
Albert Vaca Cintora
d9e641ae28 Update comments 2023-03-17 18:35:27 +01:00
Albert Vaca Cintora
cef68db2a6 Make linter happy: keep nullable/nonnull annotations 2023-03-06 00:01:47 +01:00
Albert Vaca Cintora
6fbd923c60 Bump dependencies and targetSdkVersion
Motivation: We can't publish to the Play Store with a targetSdkVersion < 31

The new targetSdk required two changes:

* Specifying when activities, services and receivers should be exported or
  not to other apps. For the ones I wasn't sure of what we want, I made
  them exported to not break something.
* Specifying when a PendingIntent should be mutable or immutable. I made
  them all mutable for now.
2022-12-27 23:53:13 +01:00
Nicolas Fella
77d0b4aec9 Check plugin permissions before calling onCreate
Otherwise if we call something in onCreate for which we don't (yet) have permission we get a permission violation
2021-05-06 11:58:16 +00:00
Maxim Leshchenko
8ddb28c001 Small redesign
Changes:
1. In the menu, the design of the selected item was changed, the icon of the current device was added and the image was removed
2. Changed the accent color to orange
3. Separators have been removed from almost all lists
4. The design of the selected item was changed in the menu, the icon of the current device was added and the image was removed
4. Changed the color of the toolbar to white or black (depending on the theme)
2021-03-07 10:55:47 +00:00
Albert Vaca Cintora
d09ad45e11 Add a verification key that's displayed when pairing
The key is a sha256 of both devices' certificates. Both should generate the
same key, so hey user can check they are pairing against the right device.

Thanks Matthias Gerstner <mgerstner@suse.de> for reporting this.
2020-11-26 11:30:53 +01:00
Philip Cohn-Cort
e9215b1bd0 Disable BigscreenPlugin's microphone permission on non-TV links. 2020-08-24 06:33:22 +00:00
Nicolas Fella
b3b74f25f4 Convert license headers to SPDX 2020-08-17 16:17:20 +02:00
Isira Seneviratne
b520291ccd Use StringUtils.defaultString(). 2020-07-26 21:50:10 +00:00
Albert Vaca Cintora
0cea53540e incomingCapabilities can be null 2020-07-18 23:55:43 +02:00
Albert Vaca Cintora
bc7d3ebf3c Protocol version in devicehelper 2020-07-18 23:55:43 +02:00
Isira Seneviratne
144d5d431d Use MultiValuedMap in NotificationsPlugin and Device. 2020-07-10 11:15:00 +00:00
Isira Seneviratne
0ed8d5e62e Replace accept and reject PNGs with vector drawables. 2020-07-09 14:35:10 +00:00
Isira Seneviratne
46070aa6bf Replace the device PNGs with vector drawables. 2020-07-09 14:35:10 +00:00
Isira Seneviratne
52aafe6b8c Use ContextCompat.getSystemService() to retrieve system services without casting. 2020-07-07 16:47:39 +05:30
Nicolas Fella
96f00d4604 Hide plugins if onCreate fails 2020-04-24 16:18:02 +02:00
Erik Duisters
4d8e7cadde Use a prefences file per device/plugin combo
Cleanup global plugin preferences after migration to per device preferences
2020-03-20 20:30:58 +00:00
Albert Vaca Cintora
5907517d91 Fix NPE
Apparently removeLink can be called when there are no links already
2019-11-24 22:52:47 +01:00
Philip Cohn-Cort
79e4f62605 Document (in brief) SharePlugin.java, Device.java and BackgroundJobHandler.java 2019-07-21 11:32:07 -04:00
Philip Cohn-Cort
9937be4791 Add threading annotations to various ::sendPacket methods
Summary:
The methods in Device.java can be used from any thread, while
the methods in BaseLink (and its subclasses) should only run
on a background thread. These annotations are picked up by Lint
to show warnings and have no effect at runtime.
2019-07-21 07:09:28 -04:00
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