2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-29 05:07:40 +00:00

28 Commits

Author SHA1 Message Date
Albert Vaca Cintora
ae23413971 Refactor BackgroundService
Added a new KdeConnect Application class that holds the Devices now, while
BackgroundService "only" takes care of the LinkProviders.

Since KdeConnect subclasses Application we have the guarantee that it will
exist as long as our process does, so we can use it as a singleton. This
removes the "BackgroundService.RunCommand" hack (which sent an Intent that
would awake BackgroundService in case it wasn't running already and then
call our code in a callback). This saves lots of round trips between the
system and us and makes things simpler (and stack traces useful) by making
the code sequential.

We already had an Application subclass that I moved to a new helper, which
now the KdeConnect class initializes together with all the other helpers.
2023-05-24 19:28:02 +02:00
Albert Vaca Cintora
4c6cda711f Fix "find my phone" notification being dismissable
Dismissing the notification caused the alarm to keep playing without a
way to stop it.

BUG: 446349
2023-04-13 19:10:12 +02:00
Albert Vaca Cintora
e103d8cd47 Change version int to constant 2023-03-16 11:42:26 +00:00
Albert Vaca Cintora
1002275ebe Remove even more checks for deprecated Android versions 2023-03-16 11:42:26 +00:00
Albert Vaca Cintora
54e5224f20 Fix minifier deleting "unused" xml that were actually used 2022-12-28 19:29:23 +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
Albert Vaca Cintora
6cf0ef79b2 Small tweaks suggested by static code analyzer 2022-01-24 01:56:10 +01:00
Nicolas Fella
b3b74f25f4 Convert license headers to SPDX 2020-08-17 16:17:20 +02:00
Isira Seneviratne
7458adc7d6 Use ArrayUtils.EMPTY_STRING_ARRAY constant. 2020-07-26 21:50:10 +00:00
Isira Seneviratne
52aafe6b8c Use ContextCompat.getSystemService() to retrieve system services without casting. 2020-07-07 16:47:39 +05:30
Albert Vaca Cintora
080f511cce Fix NPE 2020-04-17 22:06:48 +02:00
Albert Vaca
10f94781c3 Only set volume to previousVolume if it has a previous value
onDestroy() would call stopPlaying(), but previousVolume would be 0 (the
default value) if startPlaying() had been never called.
2020-01-13 17:33:15 +01:00
Albert Vaca
acbea545d0 Linter fixes 2020-01-10 12:50:23 +01:00
Albert Vaca
aa69b67cfe Fix NPE 2020-01-10 12:50:14 +01:00
Erik Duisters
ad801f1db8 Make FindMyPhone plugin work on Android 10 2020-01-05 17:40:54 +00:00
Albert Vaca Cintora
ef6c6a6dca Fix crash opening notifications settings
We were using the device context, which is not suitable to start an
Activity, causing "android.util.AndroidRuntimeException: Calling
startActivity() from outside of an Activity."
2019-02-22 20:08:21 +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
9fb780f919 Migrate from PreferenceActivity to PreferenceFragment because it has been deprecated since Android 3.0 API11
Summary:
PreferenceActivity has been deprecated since Android 3.0 API 11 in favour of PreferenceFragment

| {F6515113} | {F6515114}|
|Before|
| {F6515111} | {F6515112}|
|After|

Test Plan:
Apply patch and observe that the DeviceSettings and PluginSettings screen behave as expected
and now also follow material design guidelines

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D17859
2019-01-06 12:36:42 +01:00
Nicolas Fella
5183516c55 Cleanup imports 2018-09-29 20:45:53 +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
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
4d5d744920 Allow choosing a ringtone for FindMyPhone
Summary:
BUG: 379023

Let users choose a ring tone in the settings.

Test Plan: Open settings, choose a ringtone, search for device.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: mtijink, andyholmes, albertvaka, apol, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10332
2018-02-22 00:50:32 +01:00
Albert Vaca
4e86eb0dd3 Changed some plugins descriptions to make them more discoverable.
Sorry translators!
2016-06-28 20:00:41 +02:00
Albert Vaca
0836453c35 Project-wise optimize imports 2016-06-09 13:42:54 +02:00
Albert Vaca
b7d9cb5d81 Using capabilities, packages no longer need to validate received packages 2016-06-02 15:35:44 +02:00
Albert Vaca
d253fcfd0b Refactor capabilities together with Aleix
He is committing a similar patch to kdeconnect-kde
2016-05-31 17:19:39 +02:00
Albert Vaca
7047622a62 Removing log message 2016-02-12 08:38:42 -08:00
David Edmundson
8aebaaea2f Implement a "Find my phone" plugin
This makes the phone sound an alarm sound until dismissed. Even when
silent.

Reviewed-by: Albert Vaca
2015-09-11 21:11:01 +02:00