2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-22 01:51:47 +00:00

3233 Commits

Author SHA1 Message Date
Albert Vaca Cintora
268bc833be Merge branch 'work/deviceinfo' into work/all 2023-06-20 10:53:49 +02:00
Albert Vaca Cintora
d62a7fbcdc Remove redundant toString 2023-06-20 10:52:57 +02:00
Albert Vaca Cintora
8c9fc6586b Add IP as a txt record for iOS compat 2023-06-20 10:50:55 +02:00
Albert Vaca Cintora
0d658e6fb6 Add a setting to enable/disable UDP broadcast 2023-06-20 10:42:49 +02:00
Albert Vaca Cintora
020382931c Add MDNS discovery 2023-06-20 10:33:14 +02:00
Albert Vaca Cintora
cc0b94bd3d Prevent reloading plugins twice in a row 2023-06-20 10:27:03 +02:00
Albert Vaca Cintora
5c0c190f5a Add DeviceInfo class
It contains all the properties we need to instantiate a Device: id, name,
type, cert, capabilities and protocol version. Before, we had a mix of
passing those around as arguments or passing identity packets (ie: json).
This simplifies the Device class quite a bit.

Now, the BaseLink subclasses need to implement getDeviceInfo() interface
that returns a DeviceInfo, which is what we will pass around and eventually
use to instantiate a Device.

This means that identity packets are an implementation detail of the
LanLinkProvider and that other implementations could get the DeviceInfo
in a different way.
2023-06-20 10:27:03 +02:00
Albert Vaca Cintora
41e296b16d Better exception handling in LanLinkProvider
Bubble up exceptions instead of using giant, generic try-catch blocks.

The UDP and TCP listener loops are now where we catch all the exceptions that might happen handling the incoming packets.

Also, the creation of worker threads now happens in the listener loops as well instead of the inner functions.

Finally the `broadcastUdpPacket` function has been split in `broadcastUdpIdentityPacket` and `sendUdpIdentityPacket` (the first calls the second).
2023-06-20 08:26:00 +00:00
l10n daemon script
8eb35028a1 GIT_SILENT Sync po/docbooks with svn 2023-06-20 02:25:35 +00:00
l10n daemon script
f9486204a5 GIT_SILENT made messages (after extraction) 2023-06-20 00:50:47 +00:00
Albert Vaca Cintora
46c32365ba Remove unused class 2023-06-19 18:36:57 +02:00
Albert Vaca Cintora
9dfa5bc51c Update the pairstate before calling any callbacks 2023-06-19 18:03:29 +02:00
Albert Vaca Cintora
fbf77fa103 Log when refreshing the device list 2023-06-19 18:03:29 +02:00
l10n daemon script
06a486d99b GIT_SILENT Sync po/docbooks with svn 2023-06-19 02:04:10 +00:00
l10n daemon script
2072128a6f GIT_SILENT Sync po/docbooks with svn 2023-06-18 02:39:49 +00:00
l10n daemon script
a7dc9e4249 GIT_SILENT Add new file (after extraction) 2023-06-18 00:52:50 +00:00
l10n daemon script
5a27a613ea GIT_SILENT made messages (after extraction) 2023-06-18 00:52:41 +00:00
Albert Vaca Cintora
ad48a25d79 Fix networkpacket getter visibility 2023-06-16 22:53:44 +02:00
Albert Vaca Cintora
2a273ff07f Remove redundant comments 2023-06-16 22:00:48 +02:00
Albert Vaca Cintora
bd0b03eafb Make this more readable 2023-06-16 21:49:39 +02:00
Albert Vaca Cintora
40b791a7c4 Only try to send unpair packet if reachable 2023-06-16 19:57:41 +02:00
Albert Vaca Cintora
867bdfb6fb Move PairingHandler out from the UI package 2023-06-16 19:51:57 +02:00
Albert Vaca Cintora
51312f9a25 Lower log level even more 2023-06-16 19:45:15 +02:00
Albert Vaca Cintora
e4743002be Fix infinite loop when already paired devices ask to pair 2023-06-16 19:44:11 +02:00
Albert Vaca Cintora
12de65f234 Rename "signal" function to match the name of the listeners' interface 2023-06-16 19:23:05 +02:00
Albert Vaca Cintora
6d089093e9 Lower log level 2023-06-16 19:23:04 +02:00
Albert Vaca Cintora
ffd99858e6 Remove interface not needed 2023-06-16 19:23:04 +02:00
Albert Vaca Cintora
6879e40341 Null check not needed 2023-06-16 19:23:04 +02:00
l10n daemon script
cf28c9c7dc GIT_SILENT Sync po/docbooks with svn 2023-06-16 01:48:53 +00:00
Albert Vaca Cintora
9d1cd05ce4 Fix LinkProviders' onNetworkChanged called before onStart 2023-06-15 14:52:00 +02:00
Albert Vaca Cintora
3e595cb262 Rename computer -> device 2023-06-15 14:45:54 +02:00
l10n daemon script
636c70ff06 GIT_SILENT Sync po/docbooks with svn 2023-06-15 01:55:19 +00:00
l10n daemon script
d68ccd69e0 GIT_SILENT Add new file (after extraction) 2023-06-15 00:46:19 +00:00
l10n daemon script
a9e8050aeb GIT_SILENT made messages (after extraction) 2023-06-15 00:46:10 +00:00
Albert Vaca Cintora
81270f724d Remove reverseConnectionBlackList used to support Android < 4 2023-06-14 18:17:21 +02:00
Albert Vaca Cintora
1ef3d75eb1 Update comments 2023-06-14 18:16:26 +02:00
l10n daemon script
37c8a41778 GIT_SILENT Sync po/docbooks with svn 2023-06-14 01:50:22 +00:00
l10n daemon script
ad9d375299 GIT_SILENT Sync po/docbooks with svn 2023-06-13 01:55:11 +00:00
l10n daemon script
d6647e44b9 GIT_SILENT Add new file (after extraction) 2023-06-13 00:47:22 +00:00
l10n daemon script
1d15cdba27 GIT_SILENT made messages (after extraction) 2023-06-13 00:47:14 +00:00
Albert Vaca Cintora
8438f11ef9 Release 1.26.0 v1.26.0 2023-06-12 20:38:00 +02:00
Albert Vaca Cintora
5b928fa6cd Fix screen turning off while find my phone was ringing 2023-06-12 18:17:36 +00:00
Albert Vaca Cintora
f63214d496 FindMyPhone: use AudioAttributes and WAKE_LOCK
Since we now require API 21, we can use setAudioAttributes instead of
the deprecated setAudioStreamType.

Since we already require WAKE_LOCK for the SMS plugin, we can use it
here to prevent the screen from sleeping.
2023-06-12 18:17:36 +00:00
Albert Vaca Cintora
e326d351a0 Case insensitive compare 2023-06-12 18:14:33 +00:00
Albert Vaca Cintora
0dec7e8a0a Replace DeviceNames library
The version of the library we used stopped working in 2020 when the names
database it tries to download got deleted from the master branch of their
Github repo. There's a newer version, but it seems to have lost the
fetch-from-the-internet functionality (it only bundles a list of names) and
for some reason it crashes when I tested it (I've opened an issue on their
repo). Since Google now provides a CSV with all the Android device names
that exist, I've replaced the library by my own function that downloads the
CSV file (~3MB) in the first run of the app and looks for the name there.
2023-06-12 18:14:33 +00:00
l10n daemon script
7d87ea5918 GIT_SILENT Sync po/docbooks with svn 2023-06-12 02:14:48 +00:00
l10n daemon script
3397fd75b4 GIT_SILENT Add new file (after extraction) 2023-06-12 00:52:58 +00:00
l10n daemon script
26dd530c30 GIT_SILENT made messages (after extraction) 2023-06-12 00:52:49 +00:00
Albert Vaca Cintora
d63f2cfb67 Set socket options before binding to a port and not after
By passing a port the implementation of DatagramSocket already binds to
it, making it fail if the port was already in use even if we did
setReuseAddress because that happened after binding.
2023-06-11 19:15:00 +02:00
l10n daemon script
cfe4559d60 GIT_SILENT Sync po/docbooks with svn 2023-06-11 01:55:04 +00:00