2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 21:55:10 +00:00
Commit Graph

1815 Commits

Author SHA1 Message Date
Erik Duisters
b29e7eb000 Need to dynamically register broadcast receiver for ConnectivityManager.CONNECTIVITY_ACTION broadcast on API >= 24
Summary:
On android versions >= 24 manifest registered broadcast receivers for ConnectivityManager.CONNECTIVITY_ACTION
will not receive the broadcast, see: https://developer.android.com/reference/android/net/ConnectivityManager#CONNECTIVITY_ACTION

Test Plan:
Run app on phone with API > 24 without this patch and this broadcast will not be received any longer
Run app on phone with API > 24 with this patch and this broadcast will be received again

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16738
2018-11-07 18:44:45 +01:00
Erik Duisters
1fa8f3c99d Load image with resampling to prevent OOM
Summary:
When loading large images you can run into an OOM situation crashing
the app and leaving the progress notification displayed indefinitely

BUG: 397507

Test Plan:
Before applying the patch find a phone where the app crashes when you send a very large
image to it (my 6.0.1 phone did not even crash when i send it a 85MB image but my 4.0.4 phone
already crashes on a 7MB image)

Apply patch install and send image again

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16712
2018-11-07 17:53:05 +01:00
Albert Vaca
9e1e479650 Disable bad cipher suites now that we dropped support for API<14
BUG: 400722
2018-11-07 16:24:00 +01:00
Erik Duisters
4eecf187c3 Manifest.permission.READ_EXTERNAL_STORAGE is not needed for API < 16
Summary:
Manifest.permission.READ_EXTERNAL_STORAGE was added in API 16 so older API's do not
have to request this permission

Test Plan:
Install on API < 16 device or emulator
Pair and browse device using dolphin

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16613
2018-11-07 16:06:03 +01:00
Bertrand Lacost
8c48df6293 Add detection of the Meta/Super key press
Differential Revision: https://phabricator.kde.org/D10379
2018-11-07 16:05:30 +01:00
Erik Duisters
b4853508e0 When creating sharePendingIntent use a unique requestCode so a new PendingIntent is created
Summary:
Fixes the situation where when 2 or more files are send to Android clicking the share button
in either of the notifications will always share the last received file.

BUG: 396051

Test Plan:
Send 2 files to android
Click on the share button of the first received file

The first file is actually used for the share and not the last received file

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16707
2018-11-06 21:49:58 +01:00
Erik Duisters
6992f2f5ee While uploading a file the notification should not be dismissable
Summary: BUG: 399983

Test Plan:
Send a big file from Android
The notification can not be dismissed while the file is being transferred

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16713
2018-11-06 19:57:02 +01:00
l10n daemon script
bb3018ea76 GIT_SILENT made messages (after extraction) 2018-11-06 03:45:34 +01:00
Albert Vaca
0677391040 Bumping version again to release v1.10 2018-11-02 13:25:02 +01:00
Albert Vaca
ef3fd68f73 This seems to fix SFTP for Android < 8 2018-11-02 13:24:38 +01:00
Simon Redman
a647c8e447 Re-indent example packet comments 2018-11-01 12:52:30 -06:00
l10n daemon script
403c39290c GIT_SILENT made messages (after extraction) 2018-11-01 03:43:25 +01:00
Albert Vaca
58c4dfbdbd Bump version code to release 2018-10-31 15:27:42 +01:00
Albert Vaca
9d2d0697ff Fix SFTP not working due to proguard removing classes 2018-10-31 15:27:16 +01:00
Albert Vaca
75d4f0efa6 Bump version code to release 2018-10-30 18:21:04 +01:00
Albert Vaca
10cecab65c Fix "select all" not working for apps not in the DB
- Now we store the "select all" as the default value for apps not in the DB
- This also means new apps, which makes sense
- We pre-fill the "select all" checkbox with the default value

Also, now we store true/false as integers 1/0 instead of as string
2018-10-30 18:17:33 +01:00
Nicolas Fella
84bc31b413 Make sending files 100% less noisy 2018-10-30 17:15:51 +01:00
Albert Vaca
a9ab77471e Use try-with-resources in places where it looked safe 2018-10-30 13:04:45 +01:00
Erik Duisters
b54b69032f Simplify pairing from notification
Summary: When a pairing is accepted or rejected through notification actions a new DeviceFragment was created but this fragment was never actually attached to the fragment manager so not displayed to the user.

Test Plan:
Request a pairing from the desktop and Accept or Reject the pairing on Android using the notification Action buttons

When you accept the pairing the DeviceFragment should be shown for the device, the action bar title should be set to the devices name and the device should be selected in the NavigationView

When you reject the pairing the PairingFragment should be shown

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16518
2018-10-30 12:42:38 +01:00
Nicolas Fella
2bc059c4b6 Avoid hardcoded string 2018-10-29 19:58:44 +01:00
Albert Vaca
5dc02bbb75 Remove more unnecessary API version checks 2018-10-29 19:14:14 +01:00
Albert Vaca
4799cc5bbd Fixed exception when content of some notifications
Key android.title expected String but value was a android.text.SpannableString.  The default value <null> was returned.
Attempt to cast generated internal exception:
    java.lang.ClassCastException: android.text.SpannableString cannot be cast to java.lang.String
2018-10-29 19:08:47 +01:00
Nicolas Fella
a136d29ff7 Use runWithPlugin helper in SharePlugin
Summary: Depends on D16472

Test Plan:
Share file via app
Share file from external app
Share file via direct Share

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16473
2018-10-29 15:08:45 +01:00
Nicolas Fella
5dc5539e7e Add runWithPlugin helper
Summary:
There is a common pattern:
BackgroundService.RunCommand
    getDevice
    check device != null
    getPlugin
    check plugin != null
    doCode

Add a helper for this pattern and port existing code

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16472
2018-10-29 15:07:49 +01:00
Nicolas Fella
901ead5b1f Fix mobile data detection
Summary: It always returned false previously

Test Plan: I'm seeing the mobile data warning for the first time

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16445
2018-10-29 15:07:15 +01:00
l10n daemon script
cab02df704 GIT_SILENT made messages (after extraction) 2018-10-29 03:32:58 +01:00
Albert Vaca
b5d8a86c5e No need to create a stack here, as there is only one level 2018-10-28 23:11:27 +01:00
Albert Vaca
681b4bb48a Create a stack for the Mpris activity
BUG: 399343
2018-10-28 23:11:27 +01:00
Albert Vaca
6c9c8505c7 Remove unused var 2018-10-28 20:16:55 +01:00
Albert Vaca
970b50f61f Bump version code 2018-10-28 19:17:08 +01:00
Albert Vaca
24e1a95e92 startService throws if called when the app is in the background in Oreo 2018-10-28 19:17:08 +01:00
Albert Vaca
be6b108e64 Make sure the cursor is always closed 2018-10-28 19:17:08 +01:00
l10n daemon script
555e3a3f03 GIT_SILENT made messages (after extraction) 2018-10-28 02:36:52 +01:00
Albert Vaca
28a8f2131b Use the right context and SwitchCompat
As suggested by the Android guys here:

https://issuetracker.google.com/issues/118392630
2018-10-27 23:08:35 +02:00
l10n daemon script
1132ee2814 GIT_SILENT made messages (after extraction) 2018-10-27 03:43:28 +02:00
Nicolas Fella
b53f2d11bd Remove old way of device renaming 2018-10-27 01:04:34 +02:00
Nicolas Fella
0c7b970eae Add content description 2018-10-27 00:59:58 +02:00
Nicolas Fella
15a5a8d0d5 Remove unused field 2018-10-27 00:57:59 +02:00
Nicolas Fella
dfa78f7fbd Organize imports 2018-10-27 00:53:30 +02:00
Nicolas Fella
a5e6fa14d7 Do not use presized arrays 2018-10-27 00:45:05 +02:00
Nicolas Fella
2410782662 Fix XML warnings 2018-10-27 00:39:41 +02:00
Nicolas Fella
cc59b18fb2 Use ellipsis character 2018-10-27 00:24:15 +02:00
Nicolas Fella
b19039a3df Fix XML Schema 2018-10-27 00:21:52 +02:00
Nicolas Fella
4b505b38a5 Remove unneeded parameter 2018-10-27 00:02:59 +02:00
Nicolas Fella
10c552a6f4 Only use required access modifiers 2018-10-27 00:02:26 +02: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
Nicolas Fella
9650660e4a Remove unneeded casts 2018-10-26 23:59:20 +02:00
Nicolas Fella
c1426584c1 Fix id 2018-10-26 23:59:20 +02:00
Simon Redman
806a929643 [Android] Add Gradle files to repository
Summary: Gradle is automatically configured by Android Studio. However, the project is troublesome to build when using other tools. Per https://docs.gradle.org/current/userguide/gradle_wrapper.html#sec:adding_wrapper, the files added by this patch ought to be included in the repository

Test Plan: After applying this diff, it should be possible to clone a fresh repository and run ./gradlew build, resulting in an .apk in ./build/outputs/apk/*/

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16439
2018-10-26 15:57:30 -06:00