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

19 Commits

Author SHA1 Message Date
Nicolas Fella
b3b74f25f4 Convert license headers to SPDX 2020-08-17 16:17:20 +02:00
Isira Seneviratne
a6cf26e739 Use view binding in FindMyPhoneActivity. 2020-07-24 10:50:15 +00:00
Anjani Kumar
8e09936692 Set user preferred theme when activities are created
BUG: 422473
2020-07-16 06:28:33 +00:00
Anjani Kumar
c318d60916 New way to support dark theme to improve integration with system 2020-05-11 23:07:25 +00:00
Erik Duisters
ad801f1db8 Make FindMyPhone plugin work on Android 10 2020-01-05 17:40:54 +00: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
a537439bc6 Autoformat code 2018-09-29 20:28:47 +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
Philip Cohn-Cort
a1f1693d0b Add a dark theme
Summary:
BUG: 375376

This revision adds dark mode support to the app ( T7044 ). It does so by injecting
theme information into each activity, and making sure that all Views
define their colors by reference to theme attributes.

In order to make this work, all of the buttons with images (like the list
of available devices) now are tinted according to the theme.

While all versions of android support the theme, only devices running
Android ICS or higher will have a toggle button in the drawer.

Test Plan: Open all the screens, both with and without the dark theme on.

Reviewers: #kde_connect, mtijink, #vdg, nicolasfella

Reviewed By: #kde_connect, mtijink, nicolasfella

Subscribers: apol, ngraham, nicolasfella, mtijink

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11694
2018-04-23 18:35:43 +02:00
Matthijs Tijink
2cd7d4b7a9 Fix default Find My Phone ringtone
Summary:
Previously, if the user hadn't set a ringtone, the code raised an exception (because an empty string isn't an uri). Thus, no sound was played.

This fixes it.

BUG: 392853

Test Plan: Without having set a ringtone, it works. Otherwise, it works too.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: nicolasfella, sredman, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12070
2018-04-09 19:00:55 +02:00
Nicolas Fella
49021b87af Remove unused imports
Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10948
2018-03-03 15:50:40 +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
Nicolas Fella
c05f13afac Loop ringtone in FindMyPhonePlugin
Summary:
BUG: 368089

FindMyPhone does not loop ringtones, which makes problems with short ringtones. Additionally, it depends on the volume of the alarm channel, so if the alarms are muted, no
sound can be heard. This patch raises the alarm volume to max when the activity gets started and restores the previous value when it stops.

Test Plan: Trigger findmyphone, hear sound looping. Set alarm volume to zero and check if it gets restored.

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9947
2018-02-01 11:47:45 +01:00
Dmitriy Bogdanov
3cc71a69a4 FindMyPhone: better activity lifecycle handling
Summary:
There are some minor problems with current implementation: if device configuration changes (screen orientation, etc.) while the "FindMyPhone" ringtone is playing, the activity gets recreated and starts to play a new ringtone again, but the first ringtone is not stopped.
Also if the user leaves the activity the ringtone continues to play, the user has no way to get back to the activity to stop it.

With these changes the ringtone starts playing when the activity becomes visible and stops when the activity is being hidden/destroyed. If the user leaves the activity (without destroying it) and then presses "Ring my phone" button again, the activity becomes visible again and starts to play the ringtone.

There are other ways to improve it that I did not touch: use a Service to play the ringtone (so not to depend on the activity's lifecycle) or handle configuration changes in activity (so it is not recreated on orientation changes).

Test Plan: Activate "Find My Phone" feature and try to turn phone or leave activity.

Reviewers: albertvaka

Reviewed By: albertvaka

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D4548
2017-02-14 22:12:38 +01:00
Albert Vaca
6ed1bf6284 Fix crash when ringtone is null. 2016-12-25 16:57:32 +01:00
Albert Vaca
b43e0628c2 FindMyPhone: Calling ring twice now stop the ringing
BUG: 366253
2016-08-26 11:04:56 +02:00
Albert Vaca
2552663742 Checking for null didn't work, just using the ringtone now. 2016-06-01 13:21:17 +02:00
Albert Vaca
284ef5e571 TYPE_ALARM can return null. Adding a fallback. 2016-06-01 12:56:07 +02: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