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

23 Commits

Author SHA1 Message Date
Albert Vaca Cintora
0f3ad63ee3 Make sending the payloads async
Fixes the bug described in !359. Since we made sending packets sequential
in !90 (including the payload part of the packet) we could be blocking the
queue for up to 10 seconds if the other end didn't fetch our payload.

This makes the payload part async by default but keeps the option to make
it sync, since we want that behavior in CompositeUploadFileJob.
2023-05-25 16:09:09 +00:00
Albert Vaca Cintora
00f3fc43d0 Make linter happy: add final 2023-03-05 23:47:42 +01:00
Albert Vaca Cintora
0f4643e502 Project-wide optimize imports 2023-03-05 22:11:58 +01:00
Albert Vaca Cintora
5b73c2bac2 Remove checks for SDK versions older than our target SDK
Removes conditional code for older Android versions (IceCreamSandwitch, JellyBean, KitKat, Lollipop) since we no longer support Android older than Lollipop (5.0).

This doesn't remove KitKat support in the SFTP plugin since it's a bit more convoluted. It will be done in a separate MR.
2023-03-05 16:14:01 +00:00
Philip Cohn-Cort
a63d549739 Remove some unused imports
## Summary

Very basic maintenance MR to remove unused imports from code files.
2022-11-07 23:15:06 +00:00
Wojciech Matuszewski
70d70dcb33 Use a common thread pool instead of creating new threads manually
## Summary

Spawning new threads in Java is costly. This MR aims to use a common thread pool instead.

I've replaced all cases where a new thread is started just to perform a task in the background. This does not include cases where a reference to the newly created thread is kept as a part of application logic – this is probably a problem in itself, but it exceeds the scope of this quick optimization. ;) 

There was a couple of cases where a new thread was spawned just to sleep for a while an then change the state on a View on the main thread. I've replaced those with posting those deferred tasks to the View's message queue.

## Test Plan

Everything should work the same as it has before, just a bit faster and easier on the memory.
2022-10-31 20:59:17 +00:00
Albert Vaca Cintora
6cf0ef79b2 Small tweaks suggested by static code analyzer 2022-01-24 01:56:10 +01:00
Albert Vaca Cintora
fd3346626e Fix old typo 2021-03-16 21:21:15 +01:00
Isira Seneviratne
e79aac5b6f Add more usages of try-with-resources. 2020-08-20 18:29:20 +00:00
Nicolas Fella
b3b74f25f4 Convert license headers to SPDX 2020-08-17 16:17:20 +02:00
Isira Seneviratne
1a2a01d3ff Use Kotlin's Charsets class. 2020-07-24 10:53:09 +00:00
Isira Seneviratne
06aac453ea Use IOUtils.close(). 2020-07-11 21:36:24 +00:00
Matthijs Tijink
720914dd59 Use connection multiplexer in bluetooth link provider 2019-07-20 12:04:25 +02:00
Simon Redman
dc5f10c073 Revert "Try-with-resources on inputstreams"
This reverts commit aa776739b7feed778826593949f9cb471a6a9fb6
2019-04-19 05:10:11 +00:00
Albert Vaca Cintora
aa776739b7 Try-with-resources on inputstreams
As suggested by lgtm.com
2019-04-18 20:59:54 +02:00
Nicolas Fella
f1194e88c2 Use Log.e instead of printStackTrace 2019-03-31 20:09:44 +02:00
Nicolas Fella
b066068293 Remove unnecessary null assignment 2019-02-28 15:49:07 +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
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
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
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