2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-31 14:15:14 +00:00

Compare commits

..

1591 Commits
v0.1 ... v1.10

Author SHA1 Message Date
Albert Vaca
0677391040 Bumping version again to release 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
Nicolas Fella
3a8cb14c19 Remove unneeded imports 2018-10-26 23:12:31 +02:00
Nicolas Fella
2d0b97d252 Simplify asserts 2018-10-26 23:11:47 +02:00
Nicolas Fella
74d2b2e828 Fix javadoc warning 2018-10-26 23:09:24 +02:00
Nicolas Fella
9e7a06f4c4 Simplify arithmetics 2018-10-26 23:03:02 +02:00
Nicolas Fella
878cc5fdb3 Replace lambda 2018-10-26 23:02:20 +02:00
Nicolas Fella
59c72c2107 Simplify asserts 2018-10-26 23:00:53 +02:00
Nicolas Fella
42f06d4b51 Remove assert. They don't do anything 2018-10-26 22:55:06 +02:00
Nicolas Fella
7a24310cea Remove unneeded version checks
We require API 14 now which makes some checks needless
2018-10-26 22:51:13 +02:00
Albert Vaca
cbd4af2378 Bump version to release as beta 2018-10-25 21:27:17 +02:00
Albert Vaca
3e5f9bb964 Merge branch 'pie'
# Conflicts:
#	res/values/strings.xml
#	src/org/kde/kdeconnect/UserInterface/MainActivity.java
2018-10-25 21:06:18 +02:00
Erik Duisters
2c32bd334a Broadcast actual tcp server port used
Summary: UDP Identity packet should set tcpPort to the actual tcpServer port used

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, nicolasfella, sredman, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16351
2018-10-25 21:03:44 +02:00
Albert Vaca
14d70df55c Use SwitchPreference on Android 7 2018-10-25 20:56:39 +02:00
Albert Vaca
20ad6a5ffc Oops, wrong condition 2018-10-25 19:36:41 +02:00
Albert Vaca
aee692ffb3 Better titles for the settings 2018-10-25 19:23:12 +02:00
Albert Vaca
6771024a00 Explain that the notification can be hidden in Android 9 2018-10-25 19:23:12 +02:00
Albert Vaca
39ac8c9096 Remove the option to rename device from the menu
As it's now in the settings screen
2018-10-25 19:22:34 +02:00
Albert Vaca
a97b32ce1e Merge remote-tracking branch 'origin/mina-sshd0-fix' into pie 2018-10-25 17:07:03 +02:00
Albert Vaca
fcf3032965 Added a setting to disable the persistent notification pre-oreo 2018-10-25 16:58:42 +02:00
Albert Vaca
e90bd904e9 Removed debug message 2018-10-25 16:58:36 +02:00
Albert Vaca
51c0a713bc Do not show the failed plugins lists when the device is unpaired
This could happen if you had this screen visible when unpairing from the
other end.
2018-10-25 16:57:57 +02:00
Albert Vaca
c9a6b26b5c Fix notification on pre-oreo 2018-10-25 14:05:19 +02:00
Sandeep Raghuraman
91c215eb9c Update Android Gradle plugin to v3.2.1
Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D16396
2018-10-24 19:42:08 +02:00
Nicolas Fella
abd45cfc06 Remove unneeded files
Restores the look we wanted since D12290
2018-10-24 12:43:12 +02:00
l10n daemon script
26ff23e6d5 GIT_SILENT made messages (after extraction) 2018-10-23 03:49:41 +02:00
l10n daemon script
1e1444994d GIT_SILENT made messages (after extraction) 2018-10-21 03:40:42 +02:00
Albert Vaca
5bda6e0eb8 Add app-wide settings screen 2018-10-18 10:16:55 +02:00
l10n daemon script
d377a41a96 GIT_SILENT made messages (after extraction) 2018-10-18 03:44:16 +02:00
l10n daemon script
3e8bc4729f GIT_SILENT made messages (after extraction) 2018-10-17 04:12:18 +02:00
Albert Vaca
11d26129e9 Rename SettingsActivity to DeviceSettingsActivity 2018-10-16 15:02:37 +02:00
Albert Vaca
a52aed1648 Fix compilation in release mode 2018-10-16 15:02:37 +02:00
Albert Vaca
58a9b0d9a3 Bump sdk to Android PIE
Changes:
- Appcompat library v4 has been splitted in smaller libs, we only need one
- New FOREGROUND_SERVICE permission is required
2018-10-16 14:39:00 +02:00
Albert Vaca
4629179de6 BIND_REMOTEVIEWS is a system-only permission 2018-10-16 14:37:28 +02:00
l10n daemon script
648bd7fb47 GIT_SILENT made messages (after extraction) 2018-10-10 03:54:29 +02:00
l10n daemon script
bbb2b46867 GIT_SILENT made messages (after extraction) 2018-10-08 03:42:53 +02:00
l10n daemon script
169eb01c86 GIT_SILENT made messages (after extraction) 2018-10-05 03:45:49 +02:00
Nicolas Fella
a4e2af2c51 Simplify failed plugin list creation
Summary: Use some lambdas to simplify the code

Test Plan: Denie some permissions, open permission explanation dialogs

Reviewers: #kde_connect

Subscribers: kdeconnect, mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12232
2018-10-04 19:02:51 +02:00
l10n daemon script
158776456c GIT_SILENT made messages (after extraction) 2018-10-04 03:44:14 +02:00
l10n daemon script
a402757236 GIT_SILENT made messages (after extraction) 2018-10-03 03:49:56 +02:00
l10n daemon script
b7c4020014 GIT_SILENT made messages (after extraction) 2018-10-02 03:45:09 +02:00
Nicolas Fella
e4ffd3d3cf Enable (de)selecting all apps in notification filter
Summary:
BUG: 393190

Add checkbox to (de)select all

{F5812151}

Old proposal:

{F5810640}

Test Plan:
Deselect all, verify that no notification is coming from test app.
Select all, ...
Deselect all, select single app, ...

Reviewers: #kde_connect, broulik

Reviewed By: #kde_connect

Subscribers: albertvaka, kdeconnect, apol, mtijink, broulik, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12281
2018-09-30 19:34:07 +02:00
Nicolas Fella
297f0f66f5 [Telephony] Check last state before handling broadcast
Summary:
Bug: 396954

Sometimes multiple broadcasts with the same state arrive. Only handle them when the state actually changes

Test Plan: Get called, "Calling" notification appears. Caller hangs up, "Call missed" notification appears.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D15838
2018-09-30 19:24:02 +02:00
l10n daemon script
bd2c1c2f69 GIT_SILENT made messages (after extraction) 2018-09-30 03:41:45 +02:00
Nicolas Fella
539aae5e9a Fix version checks 2018-09-29 21:19:21 +02:00
Nicolas Fella
427cad6239 Remove redundant casts 2018-09-29 21:13:27 +02:00
Nicolas Fella
49df6ddba6 Invert condition to avoid empty if block 2018-09-29 21:12:11 +02:00
Nicolas Fella
b97ad28456 Don't catch and rethrow 2018-09-29 21:08:45 +02:00
Nicolas Fella
93251ee7a6 Remove methods that only call super 2018-09-29 21:02:03 +02:00
Nicolas Fella
66bb8df1d1 Cleanup imports again 2018-09-29 21:00:19 +02:00
Nicolas Fella
2c101af3b0 Remove unneeded variable 2018-09-29 20:59:48 +02:00
Nicolas Fella
5183516c55 Cleanup imports 2018-09-29 20:45:53 +02:00
Nicolas Fella
476989ffdf Use StringBuilder 2018-09-29 20:43:10 +02:00
Nicolas Fella
85169635bd Use arraycopy 2018-09-29 20:42:14 +02:00
Nicolas Fella
e68224f2b1 Use lambdas 2018-09-29 20:40:02 +02:00
Nicolas Fella
c3fc001621 Use diamond operator 2018-09-29 20:36:47 +02:00
Nicolas Fella
1a17455992 Use foreach 2018-09-29 20:36:17 +02:00
Nicolas Fella
b513717c75 Simplify expressions 2018-09-29 20:33:56 +02:00
Nicolas Fella
a537439bc6 Autoformat code 2018-09-29 20:28:47 +02:00
Nicolas Fella
da3106f123 Make packet type definition private 2018-09-29 19:33:36 +02:00
Nicolas Fella
83432ed143 Extract duplicate code into method 2018-09-29 19:30:27 +02:00
Nicolas Fella
405792b707 Autoformat code 2018-09-29 19:25:10 +02:00
l10n daemon script
b469c2e79a GIT_SILENT made messages (after extraction) 2018-09-29 03:52:17 +02:00
l10n daemon script
796321b141 GIT_SILENT made messages (after extraction) 2018-09-28 03:41:36 +02:00
l10n daemon script
5e087bf286 GIT_SILENT made messages (after extraction) 2018-09-27 03:41:26 +02:00
l10n daemon script
9b338d940e GIT_SILENT made messages (after extraction) 2018-09-26 03:53:05 +02:00
l10n daemon script
51303a4dc1 GIT_SILENT made messages (after extraction) 2018-09-25 03:47:32 +02:00
Nicolas Fella
a800e0f85a Remove trailing dot and use imperative wording in MPRIS preferences
Make it more consistent with other preferences
2018-09-24 16:51:43 +02:00
l10n daemon script
a52c386598 GIT_SILENT made messages (after extraction) 2018-09-22 03:47:27 +02:00
l10n daemon script
b2dc26da1a GIT_SILENT made messages (after extraction) 2018-09-19 03:46:03 +02:00
l10n daemon script
da74597fc6 GIT_SILENT made messages (after extraction) 2018-09-18 03:44:03 +02:00
Simon Redman
df42f992c8 [Android] New-style Message received handling
Summary:
Mark old-style SMS packet sending as deprecated (but still supported for backwards-compatibility with old Desktop apps)

Implement a ContentObserver on the Messages database, then send an update to the remote for all incoming or outgoing messages

Test Plan:
1. DBus
  - Connect Android to desktop
  - Subscribe to /modules/kdeconnect/devices/<device_id>/org.kdeconnect.device.conversations/conversationUpdated
  - Receive a new message (text yourself?)
  - Verify that something comes back on dbus (This endpoint is updated by D15409. With that patch you should see the new Message object, before you should just get the (meaningless) conversation ID)

2. SMS App
  - Relies on D15409 - See instructions there

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D15360
2018-09-17 09:06:42 -06:00
Simon Redman
0cc3639aa1 [Android] Cleanup SMS plugin and document deprecated SMS-relevant Telephony packet types
Summary:
- Rename all SMS-handling packets to indicate that they belong to the SMS plugin
- Define TELEPHONY_REQUEST_MUTE packet to replace TELEPHONY_REQUEST packet

Please see KDE-side patch here: D15543

Test Plan: See test plan in D15543

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D15544
2018-09-16 16:07:19 -06:00
l10n daemon script
c1a7afe539 GIT_SILENT made messages (after extraction) 2018-09-06 03:43:38 +02:00
l10n daemon script
69ab9fef75 GIT_SILENT made messages (after extraction) 2018-09-03 03:43:56 +02:00
l10n daemon script
c7b6de983b GIT_SILENT made messages (after extraction) 2018-09-02 03:43:38 +02:00
Albert Vaca
526d500a9f Upgrade sshd-core to version 0.14 2018-08-31 21:45:06 +02:00
Albert Vaca
6ae878fec2 Remove useless catch-and-throw 2018-08-31 21:42:53 +02:00
Albert Vaca
55a98ef67a Use our own keys (RSA) for SFTP
Otherwise, this version of MINA generates keys using an old algorithm (DSS)
and also they seem to be broken with modern ssh clients.
2018-08-31 21:04:22 +02:00
l10n daemon script
7daea0ff78 GIT_SILENT made messages (after extraction) 2018-08-27 03:49:23 +02:00
l10n daemon script
e55e73a40a GIT_SILENT made messages (after extraction) 2018-08-26 03:34:56 +02:00
l10n daemon script
f49584c7d0 GIT_SILENT made messages (after extraction) 2018-08-24 03:33:40 +02:00
l10n daemon script
af24858ddf GIT_SILENT made messages (after extraction) 2018-08-22 03:46:33 +02:00
l10n daemon script
818833a729 GIT_SILENT made messages (after extraction) 2018-08-18 03:41:32 +02:00
Albert Vaca
8547e59cd8 Merge branch 'master' into oreo2 2018-08-16 15:43:42 +02:00
l10n daemon script
b115a3031b GIT_SILENT made messages (after extraction) 2018-08-16 03:31:36 +02:00
Nicolas Fella
665354c5d5 Split Telephony and SMS plugin on Android
Test Plan:
Get called: Notification appears as before.
Get SMS: Notification shows and it appears in SMS app after reconnect.
Write SMS from app: It shows up on the phone

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D14612
2018-08-15 17:12:45 +02:00
l10n daemon script
f8e742256e GIT_SILENT made messages (after extraction) 2018-08-15 03:40:04 +02:00
Chansol Yang
6db7ffd1db Add acceleration to remote input cursor
Summary:
This patch adds cursor acceleration to KDEConnect's remote input plugin. The cursor movement is now scaled down if the movement is slow, and scaled up if the movement is fast.
The acceleration is implemented on the android side. An additional setting was added to the android app's Remote Control plugin preferences, allowing the user to choose the strength of the acceleration, or to disable the acceleration completely.

Test Plan:
After installing this revision on your android device, go to the remote input page and start using the mousepad. Cursor acceleration should be enabled by default.
Check if the cursor acceleration is intuitive and easy to use. Also, try tweaking the acceleration in the Remote input settings in the Plugin settings menu.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D14720
2018-08-13 23:50:29 +02:00
l10n daemon script
c6603029ec GIT_SILENT made messages (after extraction) 2018-08-07 03:36:38 +02:00
l10n daemon script
c5fb7b1be4 GIT_SILENT made messages (after extraction) 2018-08-05 03:30:16 +02:00
l10n daemon script
ba7fc67885 GIT_SILENT made messages (after extraction) 2018-08-04 03:38:45 +02:00
l10n daemon script
e7b16949ed GIT_SILENT made messages (after extraction) 2018-08-03 03:29:47 +02:00
Nicolas Fella
877cf67347 Fix volume icon on dark theme 2018-08-01 23:45:32 +02:00
Nicolas Fella
d720684af6 Fix layoout file formatting 2018-08-01 23:42:36 +02:00
Albert Vaca
8d9d15e6dd Added a plugin to present slideshows
Summary:
This adds a plugin with buttons for next and previous slide and fullscreen.
It also allows you to use volume up/down to change slide, even when the screen is off.
It can be extended to show do more presentation-related stuff eventually.
On the desktop side, it uses the already present 'mousepad' (keyboard input) plugin.

Test Plan: Tested manually.

Reviewers: #kde_connect, nicolasfella, apol

Reviewed By: #kde_connect, nicolasfella, apol

Subscribers: apol, nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D14430
2018-08-01 14:27:57 +02:00
l10n daemon script
3acce7dd3f GIT_SILENT made messages (after extraction) 2018-08-01 03:37:04 +02:00
l10n daemon script
10daa33f51 GIT_SILENT made messages (after extraction) 2018-07-31 03:35:01 +02:00
Nicolas Fella
e0fde16525 Added runcommandplugin widget
Summary: A simple widget to execute commands from android desktop

Test Plan:
Add the widget and execute commands from it.
By default, the selected device is the first device in the device list.
The selected device can be changed via the widget title.
If there is no commands, the widget show an empty list
If there is no connected device, show the message located in @string/unreachable_description

Reviewers: albertvaka, nicolasfella, #kde_connect

Reviewed By: albertvaka

Subscribers: kdeconnect, nicolasfella

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12507
2018-07-30 18:15:25 +02:00
Lennart Siefke
5c4c402f23 Lessen indent before "Send files" in main activity
Summary:
The "Send files" button in main acitivity if connected has a larger
indent then the other buttons. This happens on most pixel densities.
Reason was the larger icon the "Send files" button has.

With this patch, the icons all have the same pixel dimensions. It
solves the too large indent.

Screenshot (Because of translation, "Send files" is translated to
"Dateien senden"):

{F6136062}

Reviewers: #kde_connect, apol, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, apol, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D14344
2018-07-30 00:34:07 +02:00
l10n daemon script
e914c1625b GIT_SILENT made messages (after extraction) 2018-07-29 03:29:43 +02:00
Nicolas Fella
f81cf3bf36 Don't draw list dividers
Summary:
Depends on D12289

IMHO it looks sleeker without, especially the dividers on top and bottom and before the section headers are disturbing. Since the content of each list item is just one line of text its also not really needed to separate things

Test Plan:
Before:
{F5810802}

After:
{F5810803}

Reviewers: #kde_connect, #vdg, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kdeconnect, apol, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12290
2018-07-27 23:40:51 +02:00
Nicolas Fella
f9c30148b7 System volume plugin Android
Summary:
Add a slider for every sink to the MPRIS Activity. The sink can be muted by clicking on the volume icon.
.
See D7992
BUG: 377319

Reviewers: #kde_connect, mtijink, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, MatMaul, kdeconnect, Murz, mtijink, #kde_connect

Tags: #kde_connect

Maniphest Tasks: T4659

Differential Revision: https://phabricator.kde.org/D7993
2018-07-27 09:20:18 +02:00
Nicolas Fella
2a7535053a Add find remote device plugin
Summary: Counterpart for D11773

Test Plan: Apply D11773, hit Ring, hear sound. Phone to phone works too

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect, kossebau, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12344
2018-07-27 08:02:16 +02:00
Nicolas Fella
57fc625af9 Use kdeconnect:// url to trigger commands
Summary:
Make it possible to trigger commands by opening an URI like kdeconnect://runcommand/<deviceid>/<commandid>
Makes it possible to trigger commands from NFC tags.
To ease the setup the url can be added to the clipboard

Test Plan:
Long-press a command entry
Select Copy URL to clipboard
Write into NFC tag or use kdeconnect-handler to trigger url
See command executing

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, apol, kdeconnect, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D13447
2018-07-27 07:57:02 +02:00
Nicolas Fella
7ab7222f7f Fix missing string 2018-07-27 07:53:10 +02:00
Nicolas Fella
3e05b70803 Support MPRIS stop
Summary:
Fixes T9070

{F5950736}

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect, #kde_connect

Tags: #kde_connect

Maniphest Tasks: T9070

Differential Revision: https://phabricator.kde.org/D13709
2018-07-27 07:47:45 +02:00
Nicolas Fella
d83091faf8 Give clearer names
Reviewers: #kde_connect, apol

Reviewed By: #kde_connect, apol

Subscribers: kdeconnect, apol, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12217
2018-07-27 07:46:34 +02:00
Albert Vaca
e1330206ce No need to specify buildtools version anymore
According to https://developer.android.com/studio/releases/build-tools
2018-07-26 19:50:40 +02:00
Albert Vaca
266dd80ffa Bump gradle plugin version 2018-07-26 19:17:36 +02:00
l10n daemon script
3a33550391 GIT_SILENT made messages (after extraction) 2018-07-25 03:33:05 +02:00
Chansol Yang
212069c425 Make remote input sensitivity consistant across device DPIs
Summary:
KDEConnect's Remote Input feature does not take display DPI into account, resulting in inconsistent mouse sensitivities for devices with different DPIs.
This revision aims to fix that by dividing the mouse delta with the relative DPI of the current device. By doing so, the same amount of finger movement should produce the same amount of cursor movement, regardless of the device's DPI.

Addresses the following bug:
BUG: 391029

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: sredman, nicolasfella, kdeconnect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D13925
2018-07-21 13:32:30 +02:00
l10n daemon script
4f3f24dc9f GIT_SILENT made messages (after extraction) 2018-07-19 03:29:03 +02:00
l10n daemon script
cf25d87360 GIT_SILENT made messages (after extraction) 2018-07-10 03:28:29 +02:00
l10n daemon script
d26b7047d1 GIT_SILENT made messages (after extraction) 2018-07-01 03:37:36 +02:00
l10n daemon script
814cc5c9d6 GIT_SILENT made messages (after extraction) 2018-06-30 03:36:54 +02:00
l10n daemon script
61c98769ab GIT_SILENT made messages (after extraction) 2018-06-28 03:33:09 +02:00
l10n daemon script
f18f2963a2 GIT_SILENT made messages (after extraction) 2018-06-25 03:20:19 +02:00
l10n daemon script
6f6e59f76f GIT_SILENT Add new file (after extraction) 2018-06-18 03:34:09 +02:00
l10n daemon script
f132c297e4 GIT_SILENT made messages (after extraction) 2018-06-18 03:34:08 +02:00
l10n daemon script
8a6c4f4f35 GIT_SILENT made messages (after extraction) 2018-06-17 03:29:18 +02:00
l10n daemon script
32aba02421 GIT_SILENT made messages (after extraction) 2018-06-16 03:34:23 +02:00
l10n daemon script
9adf7856d6 GIT_SILENT made messages (after extraction) 2018-06-13 03:38:33 +02:00
l10n daemon script
d1eba7ae67 GIT_SILENT made messages (after extraction) 2018-06-11 03:32:49 +02:00
l10n daemon script
e3a11ab1a8 GIT_SILENT made messages (after extraction) 2018-06-10 03:27:34 +02:00
Simon Redman
7cfb216844 (WIP) Upgrade Telephony plugin to read SMS history (Android side)
Summary: Add support for requesting all conversations and sending the reply

Test Plan:
- Build this diff
- Build the corresponding KDE-side diff (D11854)
- Put a breakpoint in handleRequestConversations somewhere where you can inspect one or more Message objects
- Use DBus to poke /modules/kdeconnect/devices/<deviceID>/telephony.requestAllConversations()
- Verify that the constructed Message is one you sent or received and that it is the most recent in the corresponding conversation

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: MatMaul, kdeconnect, nicolasfella, mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11698
2018-06-09 13:44:15 -06:00
Simon Redman
3b19b6ebe2 Add contacts-reading plugin (Android side)
Summary:
Add a plugin to the KDE Connect Android application which supports reading the Android contacts databases and sending the requested data as vcards
 - Android automatically has support for exporting vcards with all the fields you would expect (phone, email, photo, etc.)
  - I add two custom fields, one for the modification timestamp and another for the NAME_RAW_CONTACT_ID so that the contacts can be correlated back to the Android database

This does not (yet) support writing contacts back to the phone nor does it automatically listen to the phone's contacts database to change

BUG: 367999

Test Plan:
Connect the device to the desktop and verify that vcards are created in QStandardPaths::GenericDataLocation / kpeoplevcard". On my system this is ~/.local/share/kpeoplevcard

Create a dummy contact on the device and verify it is synchronized (Currently not automatic, have to disconnect and reconnect or use dbus)

Modify the dummy contact and verify the modifications are synchronized (Currently not automatic, have to disconnect and reconnect or use dbus)

Delete the dummy contact and verify the deletion is synchronized (Currently not automatic, have to disconnect and reconnect or use dbus)

Reviewers: #kde_connect, mtijink, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: MatMaul, philipc, kdeconnect, nicolasfella, andyholmes, mtijink

Tags: #kde_connect

Maniphest Tasks: T8283

Differential Revision: https://phabricator.kde.org/D9690
2018-06-07 21:04:43 -06:00
l10n daemon script
0dc424e7da GIT_SILENT made messages (after extraction) 2018-06-08 03:43:03 +02:00
Albert Vaca
25fe61f376 Bump version for Beta release 2018-06-07 02:32:00 +02:00
Nicolas Fella
66b8453ba1 Bump spongycastle version
Test Plan: reinstall, pair, ping

Reviewers: #kde_connect, sredman

Reviewed By: sredman

Subscribers: albertvaka, sredman, kdeconnect, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D13196
2018-06-07 00:03:05 +02:00
Nicolas Fella
4afabef60b Remove includes 2018-06-03 15:30:52 +02:00
Nicolas Fella
3b7f1ff88a Give filetransfer an own NotificationChannel 2018-06-03 15:18:29 +02:00
l10n daemon script
d8e428a488 GIT_SILENT made messages (after extraction) 2018-06-01 03:29:41 +02:00
Albert Vaca
c1d73427ef Separate group also for the persistent notification
Without this, when receiving a new notification on phones with ambient
display the notification shown there  is the persistent notification
instead of the new notification received.
2018-05-30 22:57:09 +02:00
Albert Vaca
29aebe0888 Put the media notification on a separate group
So it's not collapsed when there are more KDE Connect notifications
2018-05-30 22:50:25 +02:00
l10n daemon script
8cc908edb0 GIT_SILENT made messages (after extraction) 2018-05-29 03:32:36 +02:00
Albert Vaca
6fc4764439 Bump version to release in Beta 2018-05-21 17:51:55 +02:00
Nicolas Fella
3cdbba5f76 Set importance of persistent channel to min 2018-05-21 17:50:24 +02:00
Albert Vaca
9059402231 Bump version to release in beta 2018-05-20 23:41:56 +02:00
Albert Vaca
ccded770d3 Play Store will require API level 26 starting September 2018-05-20 23:41:56 +02:00
Albert Vaca
b282d3a7d0 Revert "Remove legacy ciphers now that we don't support API<16"
This reverts commit f330053015.
2018-05-20 23:35:38 +02:00
Albert Vaca
ebf63dd294 Migrate to Oreo and drop support for APIs < 16
Summary:
- Add a foreground notification to the background service
- Add channel to notifications.
- Remove unneeded permission
- Remove legacy ciphers now that we don't support API<16

Reviewers: #kde_connect

Subscribers: mtijink, nicolasfella, albertvaka, apol, kdeconnect, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12881
2018-05-20 23:32:08 +02:00
Albert Vaca
e617daf356 Migrated MediaStyle 2018-05-20 23:32:08 +02:00
Albert Vaca
f234b79486 Now translatable 2018-05-20 23:32:08 +02:00
Albert Vaca
a7a5beb7e8 Added a separate channel so notification in Oreo can be hidden 2018-05-20 23:32:08 +02:00
Albert Vaca
f330053015 Remove legacy ciphers now that we don't support API<16 2018-05-20 23:32:08 +02:00
Albert Vaca
46ad1f07ce Remove unneeded permission 2018-05-20 23:32:08 +02:00
Albert Vaca
8f2ecbc7e6 New appcompat changes 2018-05-20 23:32:08 +02:00
Nicolas Fella
73bf3e6fa1 Add channel to notifications.
Summary:
Oreo requires that each notification has a channel assigned. This patch uses a common channel for all. Individual channels for different notifications (Notifications plugin, pairing notifications, share plugin) could be done, but
since in our case notifications are not a critical part of the UX it does not seem necessary to me. Setting the channel on NotificationCompat.Builder requires version 26 of the support library, the implications of this were
discussed in D8966.

Reviewers: #kde_connect

Subscribers: mtijink, albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9514
2018-05-20 23:32:08 +02:00
Nicolas Fella
050081e4c8 Fix build 2018-05-20 23:32:08 +02:00
Matthijs Tijink
f319e402f0 Add a foreground notification to the background service
Summary:
This way, the user always knows that KDE Connect is running (and what devices are connected). This is a requirement in Android Oreo.

Implements task T6218.

Reviewers: #kde_connect, nicolasfella

Subscribers: apol, albertvaka, nicolasfella

Differential Revision: https://phabricator.kde.org/D8966
2018-05-20 23:32:08 +02:00
l10n daemon script
e8418c171f GIT_SILENT made messages (after extraction) 2018-05-19 03:54:48 +02:00
l10n daemon script
e371119049 GIT_SILENT made messages (after extraction) 2018-05-18 03:36:49 +02:00
Albert Vaca
85c51ee720 Disable crashing plugin and bump version to release
This plugin was crashing for lots of users with Android 4.X
2018-05-16 17:11:36 +02:00
l10n daemon script
3dbe956b30 GIT_SILENT made messages (after extraction) 2018-05-16 03:32:25 +02:00
Albert Vaca
b1dcc3c40f Bumped version to release 2018-05-15 00:55:28 +02:00
Albert Vaca
f5254e504d Hopefully fixed crash in Android 8.1 2018-05-15 00:55:28 +02:00
Albert Vaca
55a0ad657e Bumped version to release 2018-05-15 00:55:28 +02:00
l10n daemon script
8add0c4fbe GIT_SILENT made messages (after extraction) 2018-05-14 03:35:55 +02:00
l10n daemon script
187e47aec2 GIT_SILENT made messages (after extraction) 2018-05-13 03:25:31 +02:00
l10n daemon script
27b390a9bd GIT_SILENT made messages (after extraction) 2018-05-12 03:31:41 +02:00
Nicolas Fella
9bf5a9c489 Fix SharePlugin devices list
Summary: D12212 broke the devices list in the SharePlugin. No devices was shown even when there were devices available.

Test Plan: Open up share devices list with 0/1 devices available

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kdeconnect, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12334
2018-05-11 21:18:58 +02:00
l10n daemon script
a907c02ecf GIT_SILENT made messages (after extraction) 2018-05-11 03:42:17 +02:00
Nicolas Fella
4deeb5e061 Send Runcommand setup package from phone
Summary: Also remove some leftover code from the prevoius attempt

Test Plan: Open command list, click Floating Action Button, look for KCM window on desktop.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, kdeconnect, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12332
2018-05-10 19:47:15 +02:00
Nicolas Fella
ff2354a7a6 Update gitignore 2018-05-10 19:01:32 +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
Nicolas Fella
0c6b584d57 [WIP] Add MprisReceiverPlugin (Android)
Summary:
Exposes media sessions to the desktop for use with the MprisRemote plugin and the app.
Still contains some Logs, will remove them when its time.

Test Plan:
What works:
- Displaying and updating title, artist and album.
- PlayPause, next and previous
- Playing state
- multiple sessions

What doesn't work:
- volume control
- length and position
- Album art
- can* abilities are not exposed, e.g. canGoNext, not sure if possible at all

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: kdeconnect, mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12559
2018-05-09 15:30:06 +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
l10n daemon script
7536eb7427 GIT_SILENT made messages (after extraction) 2018-05-05 03:26:35 +02:00
l10n daemon script
04e5f6b451 GIT_SILENT made messages (after extraction) 2018-05-04 03:29:32 +02:00
l10n daemon script
f75bf2129a GIT_SILENT made messages (after extraction) 2018-05-03 03:36:08 +02:00
Albert Vaca
acd98da83a Upgraded gradle 2018-05-01 19:30:32 +02:00
Matthijs Tijink
d6c3803ea2 Add assertions and checks to album art fetch code
Summary:
Add a couple of assertions and checks to the album art fetch code. Hopefully fixes bug https://bugs.kde.org/show_bug.cgi?id=393274, or otherwise at least gives a bit more information.

BUG 393274

Test Plan: Fixes the bug, according to the reporter.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12618
2018-05-01 19:27:24 +02:00
Albert Vaca
d688621f27 Set hardcoded 'Dark theme' switch to be translatable 2018-05-01 19:09:31 +02:00
l10n daemon script
774759746d GIT_SILENT made messages (after extraction) 2018-04-30 03:34:10 +02:00
Nicolas Fella
d65b3153ae Bump gradle version
Reviewers: #kde_connect, philipc

Reviewed By: #kde_connect, philipc

Subscribers: philipc, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12501
2018-04-27 21:23:07 +02:00
Nicolas Fella
8a2ea77030 Add marginEnd for RTL layouts
Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12345
2018-04-24 19:58:48 +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
l10n daemon script
b228fb2377 GIT_SILENT made messages (after extraction) 2018-04-23 03:30:04 +02:00
Nicolas Fella
bc330018e1 Rename list layout
Summary: Give it a proper name

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12289
2018-04-17 20:50:23 +02:00
Nicolas Fella
9837c89f35 Hide Available devices section if no devices are available
Summary:
Before:
{F5807970}

After:
{F5807971}

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D12212
2018-04-17 20:48:08 +02:00
Simon Redman
4d2357f016 Allow JSONObject in a NetworkPacket
Summary: Allow a mapping of fields to be a field of a NetworkPacket

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11870
2018-04-17 19:03:46 +02:00
Karl Heinz
d4d9e8ba6d Update DeviceHelper.java 2018-04-16 16:55:31 +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
l10n daemon script
8bbd3f55b1 GIT_SILENT made messages (after extraction) 2018-04-09 03:23:13 +02:00
Albert Vaca
1bf96454cf required is not part of the uses-permission tag
BUG: 392856
2018-04-08 17:20:48 +02:00
l10n daemon script
6883ed2847 GIT_SILENT made messages (after extraction) 2018-04-07 03:23:18 +02:00
l10n daemon script
91be51ea5a GIT_SILENT made messages (after extraction) 2018-04-06 03:31:04 +02:00
l10n daemon script
3bb54816ed GIT_SILENT made messages (after extraction) 2018-04-04 03:26:25 +02:00
l10n daemon script
810f53449a GIT_SILENT made messages (after extraction) 2018-04-03 03:28:03 +02:00
l10n daemon script
efa4668448 GIT_SILENT made messages (after extraction) 2018-04-01 03:29:58 +02:00
l10n daemon script
b70370005b GIT_SILENT made messages (after extraction) 2018-03-31 03:22:14 +02:00
l10n daemon script
9631cacb69 GIT_SILENT made messages (after extraction) 2018-03-30 03:25:50 +02:00
Matthijs Tijink
94ef1294c5 Add share action button to received file notification
Summary: You can share the just-received file. It doesn't work with a custom download directory (just like opening such files doesn't work yet). It also won't close the notification once shared.

Test Plan: Sharing to other apps works.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11680
2018-03-28 22:58:27 +02:00
Matthijs Tijink
7c8301a7cc Disables album art download on metered connections (e.g. 4G)
Summary: Won't typically be a problem (you're usually connected via wifi with KDE Connect anyway), but shouldn't hurt.

Test Plan: Works with the bluetooth backend on 4G (i.e. no album art is downloaded). Still downloads album art otherwise, as expected.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: #kde_connect

Differential Revision: https://phabricator.kde.org/D11682
2018-03-27 21:23:08 +02:00
Albert Vaca
64fd08f3ac Bump version to release 2018-03-27 20:34:56 +02:00
Albert Vaca
e67e43efa1 Revert "Synchronize everything to see if this fixes a crash in 8.1"
This reverts commit cf808c03ba.
and commit 3d4bf643d4.
2018-03-27 20:34:56 +02:00
Philip Cohn-Cort
fda08929af Add method documentation to LanLinkProvider.java
Summary:
This adds some simple explanation to the `identityPacketReceived` and
`addLink` methods.

Test Plan: N/A

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Differential Revision: https://phabricator.kde.org/D11672
2018-03-26 13:54:04 +02:00
Albert Vaca
2cb025e368 Bump version to release 2018-03-25 22:01:06 +02:00
Albert Vaca
cf808c03ba Add timeout so handshake doesn't block forever 2018-03-25 22:00:39 +02:00
Albert Vaca
2b52cd1547 Bumped version to release 2018-03-25 20:42:52 +02:00
Albert Vaca
3d4bf643d4 Synchronize everything to see if this fixes a crash in 8.1 2018-03-25 20:33:19 +02:00
Matthijs Tijink
00b6677aa4 When receiving a file Android, show the image in the notification
Summary: The image is shown, similar to when you take a screenshot.

Test Plan: Works great! Doesn't crash for non-images.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: #kde_connect

Differential Revision: https://phabricator.kde.org/D11679
2018-03-25 14:51:12 +02:00
Matthijs Tijink
bf0cab9ef2 Support file url album art - Android
Summary: If the album art is a file url, the code will ask the remote device to transfer that file. It's then stored in the album art cache.

Test Plan: Works fine for me, even when quickly skipping songs.

Reviewers: #kde_connect, nicolasfella, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, nicolasfella, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11018
2018-03-25 13:41:40 +02:00
Matthijs Tijink
1c3e6f84a7 Add album art to media notification and lock screen
Summary:
Adds the album art to the media notification and lock screen.

How it looks on my phone (disregard the somewhat weird look, that's just the weird UI my phone vendor uses):
{F5728066}

Google images shows how it'll look on other phones (this one includes the lock screen image):
{F5728069}

And Android Oreo automatically colors the notification based on the album art color (untested, but should work):
{F5728070}

Test Plan: Changes are minor and it works fine for me.

Reviewers: #kde_connect, nicolasfella, albertvaka

Reviewed By: #kde_connect, nicolasfella, albertvaka

Subscribers: nicolasfella

Differential Revision: https://phabricator.kde.org/D10798
2018-03-25 13:39:17 +02:00
Matthijs Tijink
c8dbbb1fe8 Show connected devices on top
Summary: After that, available devices and then remembered devices.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: nicolasfella, #kde_connect

Differential Revision: https://phabricator.kde.org/D11641
2018-03-24 21:55:53 +01:00
Philip Cohn-Cort
a17b75264d Use simpler syntax for Google Maven repository
Summary: This follows the guidelines described at https://developer.android.com/studio/build/gradle-plugin-3-0-0-migration.html#apply_plugin

Test Plan: Try to build with this change (`./gradlew assembleRelease` or similar)

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Differential Revision: https://phabricator.kde.org/D11645
2018-03-24 20:23:11 +01:00
Philip Cohn-Cort
7276e60aa4 Only make one request for list of MPRIS players during plugin creation
Summary:
MPrisPlugin previously made two calls to `requestPlayerList()` in its
`onCreate()` method. This change deletes the first of those, so that
only one network packet is sent and received.

Test Plan:
Pair a new device, confirm that only one request for media players is
received by remote client.

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Differential Revision: https://phabricator.kde.org/D11648
2018-03-24 18:38:23 +01:00
Matthijs Tijink
7877d2803c Fix blurry rasterized icons
Summary:
The vector icons were rastizered for older Android versions, but these were on the small side. This fixes the size.

BUG: 392061

Test Plan: The icons aren't blurry anymore on Android 4.2.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: #kde_connect

Differential Revision: https://phabricator.kde.org/D11644
2018-03-24 18:35:07 +01:00
Matthijs Tijink
b1c4b6e1e9 Show the same mpris player in the notification as in the app
Summary:
So switching (currently playing) players in the app will also switch the
notification.

Test Plan: Tested with two players playing at the same time, and switching between them.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: #kde_connect

Differential Revision: https://phabricator.kde.org/D11647
2018-03-24 18:34:35 +01:00
Matthijs Tijink
eb801fa535 Don't show flash of pairing buttons when opening a device
Summary:
The buttons are now hidden, and only showed once we know that the device
is unpaired.

Test Plan: Pairing, pairing request and opening a device still work.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: #kde_connect

Differential Revision: https://phabricator.kde.org/D11627
2018-03-24 11:07:46 +01:00
Nicolas Fella
ac4aaf1b39 Make MPRIS Activity singletop 2018-03-23 22:20:13 +01:00
Matthijs Tijink
9840a39992 Always show/hide both next and previous buttons
Summary: As @kossebau mentioned, a disappearing "previous" button is not really great, since you'll likely press "next". This diff makes sure that when you can press previous and/or next, both buttons are shown (potentially disabled).

Test Plan: Works in all combinations of enabled/disabled for both buttons

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: kossebau, #kde_connect

Differential Revision: https://phabricator.kde.org/D11437
2018-03-23 19:18:41 +01:00
l10n daemon script
e73c18d2e3 GIT_SILENT made messages (after extraction) 2018-03-17 03:13:39 +01:00
Albert Vaca
dbdbb0496b Bump version to release 2018-03-15 23:51:30 +01:00
Albert Vaca
5a0b5673ed Do not send the group summary notifications
Reviewed by Aleix Pol
2018-03-15 23:47:35 +01:00
Albert Vaca
2962ebf61f Don't hide media controls in lock screen 2018-03-15 23:17:48 +01:00
Albert Vaca
d0e1175f4a Remove unecessary allocations in a loop
Plus database not being closed on return
2018-03-15 20:26:55 +01:00
l10n daemon script
41ce204a12 GIT_SILENT made messages (after extraction) 2018-03-15 03:17:50 +01:00
l10n daemon script
20a9e69d1d GIT_SILENT made messages (after extraction) 2018-03-12 03:13:38 +01:00
l10n daemon script
28af7672da GIT_SILENT made messages (after extraction) 2018-03-11 03:15:01 +01:00
l10n daemon script
014bfacd89 GIT_SILENT made messages (after extraction) 2018-03-09 03:13:42 +01:00
l10n daemon script
2d21d9e868 GIT_SILENT made messages (after extraction) 2018-03-07 03:20:21 +01:00
l10n daemon script
cec8d9de3f GIT_SILENT made messages (after extraction) 2018-03-06 03:17:05 +01: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
fbeb5523b4 Use sp instead of dp for text size
Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11016
2018-03-04 14:40:16 +01:00
Nicolas Fella
ae0538ae0c Make it possible to add commands for the RunCommandsPlugin from Android
Summary: Add an ActionBar entry for adding a command to the list. The current way to add commands is quite hidden.

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: philipc, mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D7959
2018-03-04 14:38:20 +01:00
Nicolas Fella
f615a0f7f9 Clean up TelepathyPlugin
Summary:
Depends on D10907

Remove permission checks, unused imports, empty methode
Inline permissionexplanation

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10908
2018-03-04 13:22:06 +01:00
Nicolas Fella
679b163bd5 Clean up CustomDevicesActivity
Summary: Won't have a practical impact, but Lint is happy

Test Plan: Add entries to ip list

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10949
2018-03-04 13:20:03 +01:00
Nicolas Fella
fb7dc4be65 Use correct plural
Summary: Some languages have more plurals than the english language. This enables translaters to select the appropriate plural form.

Test Plan: No change in english

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11001
2018-03-04 13:18:59 +01:00
Nicolas Fella
22e65626cc Fix accessibility issues
Summary: Add some image contentDescriptions and one focusable property

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11004
2018-03-04 13:18:21 +01:00
Nicolas Fella
961f8e0308 Delete unused file
Test Plan: Android Studios Safe delete did not find any usage

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11005
2018-03-04 13:17:51 +01:00
Nicolas Fella
8d9681a05d Avoid empty XML tags
Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D11006
2018-03-04 13:16:22 +01:00
Matthijs Tijink
59f72f658a Change mpris play/pause button color instead of removing it
Summary:
This prevents issues with buttons jumping around when canPlay/canPause is false, as some mpris players do not report consistent values.

Additionally, gives the play/pause button a bit more attention when enabled. What do you think?

When playing/pausing is enabled (i.e. nearly always):
{F5728047}

When disabled:
{F5728048}

Reviewers: #kde_connect, #vdg, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, nicolasfella

Differential Revision: https://phabricator.kde.org/D10796
2018-03-04 11:54:40 +01:00
l10n daemon script
f42993d03f GIT_SILENT made messages (after extraction) 2018-03-04 03:17:22 +01:00
Nicolas Fella
e72e0f61dd Rename MaterialActivity to MainActivity
Summary: Its more descriptive

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10951
2018-03-03 19:35:29 +01:00
Nicolas Fella
889251ed94 Avoid deprecated API
Summary:
Depends on D10905

Use proper API

Test Plan: Pairing a device and using the drawer is still possible.

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10934
2018-03-03 16:28:35 +01:00
Nicolas Fella
93c19cbb76 Convert fields to local variables
Summary:
Depends on D10905

Convert to local variables where Android Studio suggested

Test Plan: Compiles

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10911
2018-03-03 16:26:53 +01:00
Nicolas Fella
1456026bfc Simplify switch to if statement
Summary: Depends on D10946

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10947
2018-03-03 16:24:17 +01:00
Nicolas Fella
b54d4948d7 Remove commented code for real 2018-03-03 16:22:28 +01:00
Nicolas Fella
cfb7da7fd3 Merge branch 'master' of git://anongit.kde.org/kdeconnect-android 2018-03-03 16:18:00 +01:00
Nicolas Fella
ee952b0b3a Remove commented code
Summary: Depends on D10905

Test Plan: Compiles

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10907
2018-03-03 16:15:41 +01:00
Nicolas Fella
60049dab2a 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:14:42 +01:00
Nicolas Fella
c2e9edc09c Remove unnecessary semicolons
Summary: Depends on D10905

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10946
2018-03-03 16:11:27 +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
Nicolas Fella
0a08cd43cb Inline more variables
Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10945
2018-03-03 15:56:32 +01: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
959c7c7220 Correctly handle changing canPlay, canPause, canGoNext and canGoPrevious
Summary:
Gwenview is adding MPRIS support in D10972. I tested it and noticed that it was quite buggy. Turns out,
Gwenviews implementation is (almost) fine, the problem was on our side. Unlike pure music players like
Spotify Gwenview changes canPlay, canPause, canGoNext and canGoPrevious when needed, but those updates
didn't reach our UI. The packages containing those updates were not parsed because they didn't contain
several fields.

Test Plan: Controlling Spotify and Gwenview (patched to support playPause)  works fine now.

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10981
2018-03-03 15:26:49 +01:00
Nicolas Fella
6aa75a2e7e Format AndroidManifest.xml
Summary: Format it properly, replace empty bodies with sef-closing tag and remove commented tags

Test Plan: Runs

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10969
2018-03-03 15:25:20 +01:00
Kai Dombrowe
0b0b90f778 Fix stuck notifications in the share plugin
Summary:
Android has a rate limit for updating notifications which was reduced
from 50 to 10 updates/sec since Nougat.
The share plugin updates the progress every time the percentage changes.
The final notification update which makes the notification removable,
is ignored if this happens more than 10 times in a second.
This patch reduces the progress updates to a maximum of 10 times per second.
BUG: 391059

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10976
2018-03-03 15:17:27 +01:00
Matthijs Tijink
702977a01d Fix album art url canonicalization 2018-03-03 14:45:26 +01:00
l10n daemon script
6d84f5dd86 GIT_SILENT made messages (after extraction) 2018-03-01 03:24:15 +01:00
Nicolas Fella
79a933708e Remove unneded return 2018-03-01 02:45:21 +01:00
l10n daemon script
e8f9e2daf0 GIT_SILENT made messages (after extraction) 2018-02-28 03:17:07 +01:00
Tobias Fella
7130421624 Make encryption info available while not paired
Summary:
BUG:385796
 Make encryption info available while there is no device paired. Previously, the menu option to show it was hidden when not connected.

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Maniphest Tasks: T7212

Differential Revision: https://phabricator.kde.org/D10841
2018-02-26 19:40:08 +01:00
l10n daemon script
6ccae1ca45 GIT_SILENT made messages (after extraction) 2018-02-26 03:15:09 +01:00
Matthijs Tijink
f280e8f44e Prefer selecting the playing player in the MPRIS activity
Summary: Previously, the MPRIS activity just showed the first player in the list when you opened the activity. Now it shows a playing player, when possible.

Test Plan: Tested with zero, one and multiple players, and with both playing and not playing players.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Differential Revision: https://phabricator.kde.org/D10821
2018-02-25 16:42:24 +01:00
Matthijs Tijink
abc5526252 Put keyboard button in navigation bar when possible
Summary:
In the remote input activity, the keyboard button was in the overflow menu, even though it fit on the navigation bar. The previous code used the wrong namespace, so this fixes it.

BUG: 390640

Before:
{F5729325}

After:
{F5729326}

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella

Differential Revision: https://phabricator.kde.org/D10827
2018-02-25 16:41:34 +01:00
Matthijs Tijink
63349d3643 Use small notification icons when available
Summary:
The notification plugin now sends small notification icons, if the large
icon is not available.

Before patch, with icon:

{F5698607}

{F5698608}

Before patch, without icon:

{F5698612}

{F5698613}

After patch, without icon:

{F5698614}

{F5698616}

Test Plan: I tested notifications with small icons and those with large icons, and it works as expected.

Reviewers: #kde_connect, #vdg, fabianr, albertvaka

Reviewed By: #kde_connect, #vdg, fabianr, albertvaka

Subscribers: albertvaka, mmustac, fabianr, apol, nicolasfella

Differential Revision: https://phabricator.kde.org/D10165
2018-02-25 11:43:28 +01:00
l10n daemon script
d931820d09 GIT_SILENT made messages (after extraction) 2018-02-25 03:17:21 +01:00
Matthijs Tijink
2f127b3047 Add MPRIS media control notification
Summary:
BUG: 337485

Adds a notification to show and control mpris players. It shows the title, artist etc. (so depends on D9083, but can easily be adapted to work without it, but that leads to less features).

The notification appears as soon as one of your connected devices plays music. If multiple devices/players are playing, it shows the information and controls for only one of these. If it stops playing, it tries to switch to another playing device/player. If those do not exist, it shows the same player, but allows starting it again.

Dismissing the notification is only possible if the showed player is paused (as effect, only when all players are paused). It automatically closes if the device or player disappears or disconnects and no other players are playing. I think this behaviour is intuitive, other native android music players have similar behaviour.

About the implementation: there are two parts to this: the notification and the media session control API. The first shows the notification and its controls. The second allows lock screen controls on older Android versions and control using e.g. headphone buttons. Since nearly all code is shared between the two parts, and the rest is mostly straightforward, I put them in the same diff.

Test Plan:
Tested on Android Nougat 7.1 (shows the notification with buttons, as expected; no lock screen controls, as expected) and Android Gingerbread 2.3 (shows a notification without buttons, lock screen controls work, so as expected).

I am not able to test with multiple desktops, so testing that would be appreciated.

Disabling buttons when not available should work, but all players I tested always allowed next/previous/play/pause.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: apol, albertvaka, nicolasfella

Tags: #kde_connect

Maniphest Tasks: T6512

Differential Revision: https://phabricator.kde.org/D9266
2018-02-24 17:01:08 +01:00
Matthijs Tijink
0d00b8aa4a Add album cover art support.
Summary:
Fetches http(s) album art urls, as supplied by MPRIS, to display as album art. Fetched urls and failed fetches are cached to prevent unneccessary network activity.

The bulk of the code is in the fetching+caching class `AlbumArtCache`.

Takes the comments from d52be10 into account:
 - The images (HTTP(S) only for now) are cached. This is limited to 5 MB on disk or 10 entries in memory.
 - The image gets viewing space depending on the remaining screen space. Thus, controls should never be pushed off-screen.
 - "Edge cases" like going from cover art to no cover art is handled correctly (actually a result of earlier mpris code changes).

Additionally, it adds a landscape mode to the MPRIS activity, which shows the cover art and controls side by side.

Desktop part is in D9563.

FEATURE: 345015

Test Plan: Works both with/without album art. Switching players and tracks correctly changes the album art.

Reviewers: #kde_connect, #vdg, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, ngraham, nicolasfella, apol

Differential Revision: https://phabricator.kde.org/D9564
2018-02-24 16:21:11 +01:00
Nicolas Fella
e9a35d3bb2 Allow to blacklist numbers in the telephony plugin
Summary:
Depends on D10519

Allow to specify a newline separated list of blocked numbers. This can be useful for 2FA/TAN that could be leaked to the desktop.

The protection is incomplete because the notification might be leaked trough the notificationsplugin anyway (T6651).

Test Plan:
Block my number, send SMS to self -> only notification from Notificationsplugin is shown.
Unblock it again -> both notifications are shown

Reviewers: #kde_connect, albertvaka, mtijink

Reviewed By: #kde_connect, albertvaka, mtijink

Subscribers: mtijink, albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10520
2018-02-24 15:53:56 +01:00
l10n daemon script
101918f323 GIT_SILENT made messages (after extraction) 2018-02-24 03:16:06 +01:00
l10n daemon script
d8c0b40b9c GIT_SILENT made messages (after extraction) 2018-02-23 03:22:19 +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
82db080a51 Apply some coding style to TelephonyPlugin
Summary: Unify coding style, remove commented code

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D10519
2018-02-22 00:49:04 +01:00
l10n daemon script
97d69c674a GIT_SILENT made messages (after extraction) 2018-02-19 03:09:08 +01:00
Albert Vaca
7dd4583a24 Increased version number to release 2018-02-17 10:07:57 +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
Nicolas Fella
de7d944230 Get rid of MaxWidthImageButton
Summary: There is no need to implement a custom view for that. It is only used in MPRIS Activity, which looks almost the same now, except that the play button aligns with the buttons beneath, which is better IMHO.

Reviewers: #kde_connect, mtijink

Reviewed By: #kde_connect, mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9520
2018-02-01 11:45:28 +01:00
l10n daemon script
b1daf1af0c GIT_SILENT made messages (after extraction) 2018-01-30 03:15:19 +01:00
l10n daemon script
baeec6afbf GIT_SILENT made messages (after extraction) 2018-01-29 03:17:09 +01:00
l10n daemon script
2187b273b9 GIT_SILENT made messages (after extraction) 2018-01-28 03:16:00 +01:00
l10n daemon script
1fa0585100 GIT_SILENT made messages (after extraction) 2018-01-27 03:15:25 +01:00
l10n daemon script
4e2460bf37 GIT_SILENT made messages (after extraction) 2018-01-25 03:18:02 +01:00
l10n daemon script
5e3e32d289 GIT_SILENT made messages (after extraction) 2018-01-23 03:18:45 +01:00
Albert Vaca
167f86affa Fix gradle deprecation warnings 2018-01-23 00:41:33 +01:00
Albert Vaca
53dfb299a7 Fix build from gradle's cli 2018-01-23 00:41:33 +01:00
l10n daemon script
c4e6c66809 GIT_SILENT made messages (after extraction) 2018-01-22 03:09:49 +01:00
l10n daemon script
1703276f37 GIT_SILENT made messages (after extraction) 2018-01-21 03:12:07 +01:00
Chris Holland
91ade6a846 Mention 2 fingers to scroll in mousepad_info
BUG: 389185

Differential Revision: https://phabricator.kde.org/D9977
2018-01-19 01:03:00 -05:00
Albert Vaca
1b62a5ae32 Use stringbuilder 2018-01-17 00:05:57 +01:00
Albert Vaca
4b21d67da0 Increased minor version to release 2018-01-16 22:53:49 +01:00
Philip Cohn-Cort
5c3fcb1423 Prevent Android 8.1 crash
Summary:
The SSL/TLS handshake code in LanLinkProvider is normally invoked in parallel, so that multiple incoming messages can be read at once. However, this logic causes an unusual crash in Android 8.1's native openssl library.

Sample logcat of crash is available at https://paste.kde.org/ptolqcpya

This patch mitigates the issue by making the `addLink` function in that class synchronized. I recommend future work to determine whether there are any other thread-safety concerns in the handshake code.

Test Plan:
1. Designate a test wi-fi network
2. Disconnect all KDE Connect devices from that network
3. Install build on disconnected Android 8.1 device
4. Clear KDE Connect app data (if present) on 8.1 device
5. Connect 8.1 device to test wi-fi network
6. Connect any other KDE Connect device to test wi-fi network

Reviewers: albertvaka

Reviewed By: albertvaka

Differential Revision: https://phabricator.kde.org/D9739
2018-01-16 20:08:16 +01:00
l10n daemon script
79a58e12a1 GIT_SILENT made messages (after extraction) 2018-01-08 03:04:36 +01:00
Albert Vaca
92300a7d63 Create destination directory in case it doesn't exist 2018-01-07 16:52:57 +01:00
Nicolas Fella
e94959f9c3 Show notifications that are present when pairing
Summary:
When the plugin is created all current notifications are sent to the other device. When the NotificationListener is not ready at that time this is delayed until it is. This was intended before, but did not work because the
requestAnswer flag was set on the network packages. The desktop ignored those packages. I see no purpose for the requestAnswer flag so I removed it.

Depends on D9622

Test Plan: Create some notifications. Restart the desktop or the app and look for the notifications on the desktop

Reviewers: #kde_connect, mtijink, albertvaka

Reviewed By: #kde_connect, mtijink, albertvaka

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9558
2018-01-06 16:06:57 +01:00
Nicolas Fella
45bac893d9 Use getString instead of getCharsequence().toString()
Summary: Depends on D9621

Reviewers: #kde_connect, mtijink, albertvaka

Reviewed By: #kde_connect, mtijink, albertvaka

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9622
2018-01-06 16:05:48 +01:00
Nicolas Fella
fdaa632a39 Delete general_preferences.xml
Summary: It doesnt seems to be useful any more

Test Plan: Android Studios Safe delete found no usage

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9623
2018-01-06 16:04:03 +01:00
Nicolas Fella
22696f7c97 Restrict access modifiers to the necessary
Summary:
Set access to (package) private where possible
Depends on D9620

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9621
2018-01-03 21:09:28 +01:00
Nicolas Fella
7155042da0 Remove dead code
Summary:
Removed some dead code.

Depends on D9548

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9620
2018-01-03 20:54:14 +01:00
Nicolas Fella
d218a10004 Use minSdk in NotificationsPlugin
Summary:
Depends on D9546
Depends on D9619

Make use of the new minSdk feature.

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9548
2018-01-03 20:52:49 +01:00
Nicolas Fella
c9ca1f4906 Per Plugin minSdk Level
Summary:
Each plugin gets a minSdk level assigned. If this level isn't available the plugin doesn't get loaded. This can simplifie the plugin code by removing reccuring Sdk version checks.
Should we let the user know that a plugin is not available due to that or should it fail silently?

Actual Plugin adaptions come in follow-up patches.

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: mtijink, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9546
2018-01-03 20:50:02 +01:00
Matthijs Tijink
ea9a5459fd Remove minimum and target API versions from manifest.
Summary: They are provided by the gradle build file.

Test Plan: I checked the generated merged manifest file.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Differential Revision: https://phabricator.kde.org/D9562
2018-01-03 20:40:53 +01:00
Nicolas Fella
9eda5bf072 Run Reformat Code on the notifications plugin
Summary: Bring law and order to the coding style

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9619
2018-01-03 20:21:35 +01:00
l10n daemon script
8052994232 GIT_SILENT made messages (after extraction) 2018-01-03 04:54:08 +01:00
Nicolas Fella
8e2757ecf3 Fix context in layout files
Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9524
2018-01-02 18:18:31 +01:00
Nicolas Fella
52f2067e55 Silence a warning in preference_with_button.xml
Summary: Using @android:id instead of @+android:id silences two Code Inspection errors

Reviewers: #kde_connect, mtijink

Reviewed By: mtijink

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D9523
2018-01-02 18:17:21 +01:00
Matthijs Tijink
56fc69b3de Add new encryption cipher for Android 2.3 (API 9+) support
Summary:
Arch linux recently updated libraries which dropped support for RC4, used for connections to Android before Android 3 Honeycomb. Other distributions may also be affected (or will be affected in the future).

This adds a new cipher, supported by Android API 9+.

Test Plan: With this change (and corresponding desktop change) the app can connect again.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Differential Revision: https://phabricator.kde.org/D9449
2017-12-22 13:26:19 +01:00
Matthijs Tijink
8538121ed2 Receive MPRIS title, artist and album information
Summary: Receives the title, artist and album information from MPRIS, instead of a single "artist - title". The desktop counterpart is in D8957.

Test Plan: Works for me, both with and without D8957.

Reviewers: #kde_connect, nicolasfella

Reviewed By: #kde_connect, nicolasfella

Subscribers: nicolasfella

Differential Revision: https://phabricator.kde.org/D9083
2017-12-20 17:56:01 +01:00
Matthijs Tijink
c6746e38a0 Allow opening files shared to android using the notification
Summary:
Since Android Nougat, the previous way to open a file shared to android did not work anymore (using `file://` urls), as marked with a TODO.

This diff implements the new way of opening files: a content provider url (`content://`) allows opening files through the KDE Connect app. As an added benefit, apps without external files permission can now open files received by KDE Connect.

Test Plan: Works for me.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, nicolasfella

Differential Revision: https://phabricator.kde.org/D9331
2017-12-20 17:53:35 +01:00
Albert Vaca
90f03555c5 Updates for Android Studio 3.0 2017-12-09 15:36:21 +01:00
Albert Vaca
e9be9b9c87 Use appcompat libraries from maven instead of locally installed 2017-12-09 14:46:12 +01:00
Albert Vaca
ee854bf7ad Replace deprecated ActionBarActivity by AppCompatActivity 2017-12-09 14:31:40 +01:00
Albert Vaca
71106a3de3 Merge branch '1.x'
# Conflicts:
#	AndroidManifest.xml
#	res/values-da/strings.xml
#	res/values-eu/strings.xml
#	res/values-zh-rCN/strings.xml
2017-12-09 14:21:02 +01:00
l10n daemon script
0a841b8064 GIT_SILENT made messages (after extraction) 2017-12-09 02:57:06 +01:00
Matthijs Tijink
147d8510d5 Simplify MPRIS callback code
Summary:
Makes sure the MPRIS data is always up-to-date, so requesting updates
separately is never necessary. Also provides a way to remove callbacks.

Test Plan: All information still appears in the MPRIS activity and the controls still work.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Differential Revision: https://phabricator.kde.org/D9084
2017-12-07 17:54:00 +01:00
Matthijs Tijink
044261ceb1 Use material icons in MPRIS activity
Summary: The previous icons were old (pre-Material, maybe even pre-Holo). The recommended practice now is to add the icons directly to your app, so I added the material icons. Note that the vector version is used; these are automatically converted to bitmaps for older android versions.

Reviewers: #kde_connect

Subscribers: apol

Differential Revision: https://phabricator.kde.org/D8955
2017-12-01 21:27:35 +01:00
Matthijs Tijink
cc8330a079 Make the player status a per-player object in the MPRIS plugin
Summary:
This directly fixes a couple of bugs (where the UI was not updated in all cases) and will allow different code parts to use different players without clashing with each other.

This is required for sensible behaviour while using the media control notification (which I plan to work on).

Reviewers: #kde_connect, thomasp, albertvaka

Reviewed By: #kde_connect, thomasp, albertvaka

Subscribers: albertvaka, apol, thomasp

Differential Revision: https://phabricator.kde.org/D8942
2017-12-01 00:36:43 +01:00
l10n daemon script
221c6b4fd7 GIT_SILENT made messages (after extraction) 2017-11-28 02:58:18 +01:00
l10n daemon script
a1c6921696 GIT_SILENT made messages (after extraction) 2017-11-27 03:06:41 +01:00
l10n daemon script
656268c42e GIT_SILENT made messages (after extraction) 2017-11-10 03:06:52 +01:00
l10n daemon script
3e229afea2 GIT_SILENT made messages (after extraction) 2017-11-08 05:45:51 +01:00
l10n daemon script
6c54a3d720 GIT_SILENT made messages (after extraction) 2017-11-06 03:02:52 +01:00
l10n daemon script
66a120d978 GIT_SILENT made messages (after extraction) 2017-11-02 03:05:21 +01:00
l10n daemon script
082543f749 GIT_SILENT made messages (after extraction) 2017-10-30 03:04:06 +01:00
l10n daemon script
bc1befcbb0 GIT_SILENT made messages (after extraction) 2017-10-20 03:00:08 +02:00
l10n daemon script
53cd5c71ab GIT_SILENT made messages (after extraction) 2017-10-15 03:17:25 +02:00
l10n daemon script
473e6c8d9c GIT_SILENT made messages (after extraction) 2017-10-13 03:19:46 +02:00
l10n daemon script
3fc88bb120 GIT_SILENT made messages (after extraction) 2017-10-10 03:17:38 +02:00
l10n daemon script
30afd0263b GIT_SILENT made messages (after extraction) 2017-10-09 03:22:38 +02:00
l10n daemon script
001755667a GIT_SILENT made messages (after extraction) 2017-09-20 06:11:38 +02:00
l10n daemon script
cf8aaa66e0 GIT_SILENT made messages (after extraction) 2017-09-11 03:14:20 +02:00
l10n daemon script
090815e7f7 GIT_SILENT made messages (after extraction) 2017-09-03 03:00:03 +02:00
Albert Vaca
45cb0cc393 Updated README 2017-09-02 12:01:21 +02:00
l10n daemon script
6859685dd0 GIT_SILENT made messages (after extraction) 2017-08-27 03:02:41 +02:00
Nicolas Fella
9338641a78 Fix bug while refreshing
Summary: Fix bug mentioned in https://phabricator.kde.org/T6583

Reviewers: #kde_connect, jeanv, albertvaka

Reviewed By: #kde_connect, jeanv, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Maniphest Tasks: T6583

Differential Revision: https://phabricator.kde.org/D7372
2017-08-19 13:27:09 +02:00
l10n daemon script
de9aeb8416 GIT_SILENT made messages (after extraction) 2017-08-18 03:17:16 +02:00
l10n daemon script
d4e0386665 GIT_SILENT made messages (after extraction) 2017-08-15 03:32:00 +02:00
l10n daemon script
eba0a16df2 GIT_SILENT made messages (after extraction) 2017-08-09 06:55:09 +02:00
Albert Vaca
a54d9c98f7 Bumped version to release as beta 2017-08-06 18:47:02 +02:00
Albert Vaca
45b09a0461 Bumped version to release 2017-08-06 18:44:50 +02:00
Albert Vaca
8e3232fecc Detect data corruption caused by sshfs 3.x and abort transfer 2017-08-06 18:44:33 +02:00
Albert Vaca
83c8a30a71 Detect data corruption caused by sshfs 3.x and abort transfer 2017-08-06 18:09:55 +02:00
Albert Vaca
1cfddd409d Unused var 2017-08-01 22:24:25 +02:00
Albert Vaca
31e2d0b208 Match desktop buffer size 2017-08-01 22:23:18 +02:00
Albert Vaca
f630ea3e3f Fix progress not being displayed when 0% 2017-08-01 22:22:54 +02:00
Albert Vaca
407ce1ccb0 Make percentage be updated every 1% again, it seems to work. 2017-08-01 22:22:25 +02:00
Albert Vaca
7a097f7b27 Unused var 2017-08-01 22:21:44 +02:00
l10n daemon script
04e9a38a68 GIT_SILENT made messages (after extraction) 2017-07-30 03:16:05 +02:00
Nicolas Fella
bea90521c5 Direct Share
Summary:
Support Android 6 direct share.
BUG:362266
BackgroundService is a SIngleton now. This should only be used if strictly necessary.

Test Plan: Pick a random app with a share button, look for device entries in Sharing options (might not be there because other sharing options have higher priority)

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6743
2017-07-29 11:33:45 +02:00
l10n daemon script
b68c159275 GIT_SILENT made messages (after extraction) 2017-07-27 03:23:21 +02:00
l10n daemon script
1109f6d728 GIT_SILENT Add new file (after extraction) 2017-07-26 09:27:24 +02:00
l10n daemon script
bbda044d73 GIT_SILENT made messages (after extraction) 2017-07-26 09:27:11 +02:00
l10n daemon script
fb315e3651 GIT_SILENT Add new file (after extraction) 2017-07-26 06:53:02 +02:00
Albert Vaca
2e1c91929e Oops, that was broken 2017-07-25 18:16:10 +02:00
Albert Vaca
df568ccad7 Coding style 2017-07-24 16:39:32 +02:00
l10n daemon script
23ff4bf64c GIT_SILENT made messages (after extraction) 2017-07-24 05:07:37 +02:00
l10n daemon script
4e3e0a1d5e GIT_SILENT made messages (after extraction) 2017-07-24 03:09:21 +02:00
l10n daemon script
d68fec2ab8 GIT_SILENT made messages (after extraction) 2017-07-23 05:04:56 +02:00
l10n daemon script
0c9f395c55 GIT_SILENT made messages (after extraction) 2017-07-23 03:11:21 +02:00
Albert Vaca
49ea4cdfe7 Fix Github links 2017-07-20 15:36:30 +02:00
l10n daemon script
8bd54ba153 GIT_SILENT made messages (after extraction) 2017-07-19 09:08:49 +02:00
l10n daemon script
afbcbb1f44 GIT_SILENT made messages (after extraction) 2017-07-19 06:40:45 +02:00
l10n daemon script
710dcf6c47 GIT_SILENT made messages (after extraction) 2017-07-18 03:12:33 +02:00
Nicolas Fella
2ffeab0c5e Fixed exception while handling notifications
Summary: An exception occurred while processing non-repliable notifications

Test Plan: Send a non-repliable notification, look in log for exception

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: apol, albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6740
2017-07-17 15:26:00 +02:00
l10n daemon script
c62a4bb4c4 GIT_SILENT made messages (after extraction) 2017-07-17 03:17:01 +02:00
l10n daemon script
4d989941b3 GIT_SILENT made messages (after extraction) 2017-07-16 03:11:34 +02:00
l10n daemon script
e53d3eaff8 GIT_SILENT made messages (after extraction) 2017-07-15 04:59:26 +02:00
Albert Vaca
29108894a2 Announce name changes
BUG: 364150
2017-07-14 03:30:32 +02:00
Albert Vaca
4e6dc31247 Noti never changes to finished if we spam too many noti updates
Can reproduce it 100% on my phone, but seems to work fine on others...
2017-07-14 03:20:12 +02:00
Albert Vaca
5d87675586 Disable animation on tap on the list header 2017-07-14 02:47:46 +02:00
Albert Vaca
109d2b4e41 Bump version to release as beta 2017-07-14 01:55:57 +02:00
Albert Vaca
9fb3aaa9e0 Oops 2017-07-14 01:45:28 +02:00
Albert Vaca
69249fe408 Merge branch '1.x' 2017-07-14 01:38:54 +02:00
Albert Vaca
5bef181c8f Merge branch '1.x' of git.kde.org:kdeconnect-android into 1.x 2017-07-14 01:38:45 +02:00
Albert Vaca
065d22ebda Merge branch '1.x'
# Conflicts:
#	src/org/kde/kdeconnect/Plugins/TelepathyPlugin/TelepathyPlugin.java
2017-07-14 01:38:37 +02:00
Albert Vaca
a8842b189c Merge branch 'master' into 1.x
# Conflicts:
#	AndroidManifest.xml
#	res/values-es/strings.xml
#	res/values-fr/strings.xml
#	res/values-ru/strings.xml
#	res/values-sr/strings.xml
#	src/org/kde/kdeconnect/Helpers/NetworkHelper.java
#	src/org/kde/kdeconnect/Plugins/SftpPlugin/SftpPlugin.java
#	src/org/kde/kdeconnect/Plugins/TelepathyPlugin/TelepathyPlugin.java
#	src/org/kde/kdeconnect/Plugins/TelephonyPlugin/TelephonyPlugin.java
2017-07-14 01:12:13 +02:00
l10n daemon script
55bc578374 GIT_SILENT made messages (after extraction) 2017-07-13 03:10:56 +02:00
Nicolas Fella
34c84051c9 Runtime Permissions: optional Permissions
Summary: Added support for optional Permissions. Also provided explanations why the permissions are needed

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6094
2017-07-11 21:42:19 +02:00
Nicolas Fella
45f3311b70 SharePlugin refactoring
Summary:
Some refactoring in the Shareplugin:

Extracted some parts into separate methods
Extracted notification into separate class
Some optical tweaks on notifications

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka, #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6613
2017-07-11 10:49:52 +02:00
Albert Vaca
7ffd7c2682 Bumped minor version of Android tools 2017-07-09 18:42:34 +02:00
Albert Vaca
8a7f7231b5 Do not swallow the exception, wrap it and let it crash.
Returning null did make it crash on NPE anyway, and we lost info.
2017-07-09 18:30:20 +02:00
l10n daemon script
17740c63ee GIT_SILENT made messages (after extraction) 2017-06-30 03:03:42 +02:00
l10n daemon script
1798fd71d1 GIT_SILENT made messages (after extraction) 2017-06-28 06:12:19 +02:00
l10n daemon script
6e08f2bddd GIT_SILENT made messages (after extraction) 2017-06-26 03:00:08 +02:00
l10n daemon script
3127cba4ee GIT_SILENT made messages (after extraction) 2017-06-21 06:47:38 +02:00
Albert Vaca
0ae3d487e3 Bumped version for release 2017-06-21 03:27:03 +02:00
Albert Vaca
37aab9a520 Ignore all exceptions from ContentResolver.query 2017-06-21 03:27:03 +02:00
Albert Vaca
c18dc3b724 Fix crash when trying to stop stfp while it was mounted 2017-06-21 03:23:29 +02:00
l10n daemon script
569ae488a0 GIT_SILENT Add new file (after extraction) 2017-06-20 03:02:09 +02:00
l10n daemon script
70a94a7e1d GIT_SILENT made messages (after extraction) 2017-06-13 05:10:21 +02:00
l10n daemon script
510000541c GIT_SILENT made messages (after extraction) 2017-06-11 03:04:13 +02:00
l10n daemon script
18a8f06ce4 GIT_SILENT made messages (after extraction) 2017-06-10 02:57:53 +02:00
Nicolas Fella
5886422d72 Fixed a bug in MousepadPlugin
Summary: Some values in the mousepad plugin had no default values because some strings were translated but shouldn't.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: #kde_connect

Tags: #kde_connect

Differential Revision: https://phabricator.kde.org/D6097
2017-06-08 13:25:06 +02:00
l10n daemon script
09570ec34c GIT_SILENT made messages (after extraction) 2017-06-08 03:00:19 +02:00
l10n daemon script
b57c22468c GIT_SILENT made messages (after extraction) 2017-06-05 04:40:58 +02:00
l10n daemon script
1d7594d83b GIT_SILENT made messages (after extraction) 2017-06-05 02:53:14 +02:00
l10n daemon script
f223fe0812 GIT_SILENT made messages (after extraction) 2017-06-04 02:56:42 +02:00
l10n daemon script
d0482f1e81 GIT_SILENT made messages (after extraction) 2017-06-02 02:59:51 +02:00
Nicolas Fella
0b83cfe06d Implement Android 6 Runtime Permissions
Differential Revision: https://phabricator.kde.org/D5876
2017-05-31 15:53:31 +02:00
Albert Vaca
e13090066c Update the notification less often
Otherwise, for some reason it stops allowing further updates afterwards
and looks like the download never completed (even though it did).
2017-05-31 15:39:31 +02:00
Albert Vaca
07ec3f2132 Mark the notification as not ongoing when it's done 2017-05-31 15:39:31 +02:00
Albert Vaca
f8bb5d4dd4 Reuse the same builder 2017-05-31 15:39:31 +02:00
Julian Wolff
6d216b2766 reply to notifications
Summary: These changes allow replying to any notifications that offer quick reply text fields (like WhatsApp). Does work for WhatsApp. Does not work for Telegram.

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka

Maniphest Tasks: T4674

Differential Revision: https://phabricator.kde.org/D5991
2017-05-31 15:38:14 +02:00
Albert Vaca
05d728b846 Don't lose the stacktrace. 2017-05-31 00:05:26 +02:00
l10n daemon script
5c3607dde5 GIT_SILENT made messages (after extraction) 2017-05-30 04:50:50 +02:00
l10n daemon script
d0f3c8eb22 GIT_SILENT made messages (after extraction) 2017-05-30 02:56:10 +02:00
l10n daemon script
b9a366df09 GIT_SILENT Add new file (after extraction) 2017-05-27 04:52:01 +02:00
l10n daemon script
f392505d21 GIT_SILENT Add new file (after extraction) 2017-05-27 03:02:08 +02: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
l10n daemon script
63f8f86cd5 GIT_SILENT made messages (after extraction) 2017-05-25 02:58:42 +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
Albert Vaca
cea712ced9 Bumped version for release 2017-05-24 00:29:41 +02:00
Albert Vaca
124a971a1f Never crash if there is a problem in isOnMobileNetwork 2017-05-24 00:29:33 +02:00
Albert Vaca
82b42fda67 Fix NPE 2017-05-24 00:23:57 +02:00
Albert Vaca
7c02f79c22 Attempt to fix NPE 2017-05-24 00:21:45 +02:00
Albert Vaca
23d54eaedf Fix crash on Android 5.1 when calling registerReceiver(null)
Plus small optimization by re-using the NetworkPackage.
2017-05-24 00:11:43 +02:00
Albert Vaca
7ad141bb6d Revert "Fixing sent SMS not appearing in the SMS app on old phones"
Doesn't seem to actually work.

This reverts commit 40c9b67033.
2017-05-23 23:00:31 +02:00
Albert Vaca
e68925c852 Bumped version to release in Beta 2017-05-17 23:14:21 +02:00
Albert Vaca
62cab267b4 Bumped gradle version 2017-05-17 23:13:43 +02:00
Albert Vaca
40c9b67033 Fixing sent SMS not appearing in the SMS app on old phones
BUG: 368069
2017-05-17 23:13:33 +02:00
Albert Vaca
23648a03e5 Bumped version to release 2017-05-16 21:05:17 +02:00
Simon Redman
3f188b5526 Add support for sending and receiving multipart SMSes
Summary:
The SMS protocol does not support sending a message longer than 160 characters. Android's SmsManager.sendTextMessage(..) fails to send in case the message is too long.
Instead of failing, check the message length. If it is longer than 160 characters, break it up and send it as several messages

On receive, collect the list of messages, then combine their bodies

Test Plan:
Send a long message via KDE Connect and verify that it is actually sent
Send a short message via KDE Connect and verify that it can also be sent
Ideally: Test sending a message which is the maximum length for an SMS (160 characters) and verify that it is sent as exactly one SMS (And billed properly)

Receive a long message and verify that it is delivered as a single long message, even though we all know that it was transmitted as a multi-part SMS
Receive a short message and verify that it is correctly delivered

Reviewers: #kde_connect, albertvaka

Reviewed By: #kde_connect, albertvaka

Subscribers: albertvaka

Differential Revision: https://phabricator.kde.org/D5848
2017-05-16 21:03:59 +02:00
Albert Vaca
2d35b04713 Fix IllegalStateException: Fragment not attached to Activity
BUG: 379873
2017-05-16 21:01:45 +02:00
Albert Vaca
9a5b03c423 Fixing crash, apparently info can be null (?) 2017-05-16 21:01:45 +02:00
l10n daemon script
ee336aa414 GIT_SILENT made messages (after extraction) 2017-05-15 05:02:35 +02:00
l10n daemon script
5d7b0a976a GIT_SILENT made messages (after extraction) 2017-05-15 03:14:09 +02:00
Albert Vaca
a81eba9ea1 Bumped version number to release 2017-05-06 14:29:24 +02:00
Nicholas Killewald
c5022358de Made getLocalIpAddress ignore rmnet-related interfaces.
Any interface with "rmnet" in it is an internal interface that has to do
with the device's cellular connection or USB tethering.  Since those
interfaces might give IPv4 addresses that are unreachable from any other
device, this change makes getLocalIpAddress ignore anything rmnet-related.

BUG: 337685
2017-05-06 14:26:55 +02:00
Albert Vaca
9d1734406b Bumped version number to release 2017-05-06 12:54:06 +02:00
Albert Vaca
2d49715891 Removed print 2017-05-06 12:47:51 +02:00
Albert Vaca
9e6a4938ed Added an extra check to be really sure we are on data. 2017-05-06 12:47:46 +02:00
Albert Vaca
cc4a196334 Make android version check lint happy 2017-05-06 12:46:52 +02:00
Albert Vaca
c39620e33c Update gradle plugin 2017-05-06 12:38:04 +02:00
Albert Vaca
0dd26e5729 Removed an if to check for access to "/" as it never helped 2017-05-06 12:19:36 +02:00
Nicolas Fella
2cdf743bba Added Notification icons
Some additional fields are transferred in a network package. This includes
the payloads MD5 checksum (which determines where the image file is stored)
and the notifications title and text (which allows more flexibility in the
desktop app, ticker is still transferred for compatibility)

REVIEW: 130033
2017-04-13 21:27:39 +02:00
Albert Vaca
dbf069cf85 Further refining the network detection 2017-03-18 02:16:00 +01:00
Zixing Liu
bf230509b8 Add swipe to refresh to device pairing activity
This makes it more conform to material design standard

REVIEW: 129980
2017-03-18 02:16:00 +01:00
Albert Vaca
09cbd444e6 Update gradle plugin 2017-03-18 02:15:00 +01:00
l10n daemon script
2ace4aaef1 GIT_SILENT made messages (after extraction) 2017-03-15 03:29:06 +01:00
l10n daemon script
86d0d3065c GIT_SILENT made messages (after extraction) 2017-03-14 19:05:45 +01:00
l10n daemon script
1f8f39a7f8 GIT_SILENT made messages (after extraction) 2017-03-09 06:56:51 +01:00
l10n daemon script
64b124aefd GIT_SILENT made messages (after extraction) 2017-03-09 03:53:11 +01:00
l10n daemon script
05ba2188de GIT_SILENT made messages (after extraction) 2017-03-05 08:01:12 +01:00
l10n daemon script
d64452bbb6 GIT_SILENT made messages (after extraction) 2017-03-05 04:52:02 +01:00
l10n daemon script
ba440bd5ea GIT_SILENT made messages (after extraction) 2017-03-04 07:13:18 +01:00
l10n daemon script
a94e082b68 GIT_SILENT made messages (after extraction) 2017-03-01 06:45:54 +01:00
l10n daemon script
e8a61e144a GIT_SILENT made messages (after extraction) 2017-03-01 03:45:22 +01:00
Albert Vaca
def0cad889 Further refining the network detection 2017-02-28 21:21:51 +01:00
Albert Vaca
c93e4400e2 Fix crash when fragment.getContext() was null 2017-02-25 21:42:34 +01:00
Albert Vaca
8935ab5d7f Fix crash when fragment.getContext() was null 2017-02-25 21:42:15 +01:00
Albert Vaca
c5a9e7e357 Merge branch '1.x' 2017-02-25 21:32:52 +01:00
Albert Vaca
9580154a13 Bumped version to release 2017-02-25 21:32:28 +01:00
Albert Vaca
48f5566326 Try a different approach to detect when on mobile data. 2017-02-25 21:25:06 +01:00
Albert Vaca
b24010a86e Try a different approach to detect when on mobile data. 2017-02-25 21:22:20 +01:00
Albert Vaca
e2a932558a Revert "Do not broadcast in 3G + info message"
As it couldn't be any other way, this broke somebody's workflow.

This reverts commit 440a12f86c.
2017-02-25 21:07:04 +01:00
Albert Vaca
732206ac13 Fix crash on Android < 12 2017-02-25 21:07:04 +01:00
Albert Vaca
3ea5d43b99 Revert "Do not broadcast in 3G + info message"
As it couldn't be any other way, this broke somebody's workflow.

This reverts commit 440a12f86c.
2017-02-25 21:06:40 +01:00
l10n daemon script
a172430c11 GIT_SILENT made messages (after extraction) 2017-02-23 07:12:52 +01:00
l10n daemon script
2a732645d2 GIT_SILENT made messages (after extraction) 2017-02-23 03:58:04 +01:00
l10n daemon script
c91d84b635 GIT_SILENT made messages (after extraction) 2017-02-22 03:45:42 +01:00
l10n daemon script
b4b7b58cb2 GIT_SILENT made messages (after extraction) 2017-02-21 13:33:16 +01:00
l10n daemon script
f9ca018e2a GIT_SILENT made messages (after extraction) 2017-02-21 08:45:31 +01:00
Albert Vaca
8d99de59fc Fix crash on Android < 12 2017-02-20 22:59:52 +01:00
Albert Vaca
8e36986ffb Merge branch '1.x' 2017-02-20 20:42:07 +01:00
Albert Vaca
337cdba68f Prepare beta release 2017-02-20 20:36:55 +01:00
Albert Vaca
b3e1f6fbf8 Preparing a hotfix release 2017-02-20 20:25:02 +01:00
Albert Vaca
ecad7ccea2 Try not to lose filename extensions.
Android's Storage Access Framework abstraction wants us to use mimetypes
instead of file extensions, but for some file types it can't guess a useful
mimetype. In those cases, provide the extension as part of the base name.

BUG: 376638
2017-02-20 20:20:54 +01:00
l10n daemon script
b7df5348c0 GIT_SILENT made messages (after extraction) 2017-02-20 06:44:38 +01:00
l10n daemon script
40b1caaf3a GIT_SILENT made messages (after extraction) 2017-02-20 03:50:57 +01:00
l10n daemon script
c8469b06b5 GIT_SILENT made messages (after extraction) 2017-02-19 03:48:16 +01:00
Albert Vaca
7c0880124b Merge branch '1.x'
# Conflicts:
#	res/values-ast/strings.xml
#	res/values-zh-rCN/strings.xml
2017-02-18 19:15:28 +01:00
Albert Vaca
440a12f86c Do not broadcast in 3G + info message 2017-02-18 19:06:37 +01:00
Albert Vaca
0e3b5af6bc Looks like it's not 2017-02-18 17:41:12 +01:00
Albert Vaca
b167b9629e Changed visibilities to package-private 2017-02-18 17:16:10 +01:00
Albert Vaca
b6814c86c5 Bumped version to release 2017-02-14 22:23:33 +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
l10n daemon script
c0502803c4 GIT_SILENT made messages (after extraction) 2017-02-12 06:34:40 +01:00
l10n daemon script
ec6696b33b GIT_SILENT made messages (after extraction) 2017-02-11 06:59:47 +01:00
l10n daemon script
b73f5ad6a4 GIT_SILENT made messages (after extraction) 2017-02-11 03:47:01 +01:00
l10n daemon script
7e30e27f61 GIT_SILENT made messages (after extraction) 2017-02-10 06:30:56 +01:00
l10n daemon script
92a10bcd35 GIT_SILENT made messages (after extraction) 2017-02-08 06:21:40 +01:00
l10n daemon script
723f398ea8 GIT_SILENT made messages (after extraction) 2017-02-07 13:35:11 +01:00
l10n daemon script
060fa8200e GIT_SILENT made messages (after extraction) 2017-02-06 06:55:43 +01:00
l10n daemon script
7e8edda808 GIT_SILENT made messages (after extraction) 2017-02-06 03:54:31 +01:00
Albert Vaca
48ffde66da OPEN_DOCUMENT_TREE needs lollipop 2017-02-05 21:39:49 +01:00
Albert Vaca
7045c50c81 OPEN_DOCUMENT_TREE needs lollipop 2017-02-05 21:39:28 +01:00
Albert Vaca
fe0409e9e7 Bumped version to release in beta channel 2017-02-05 21:31:49 +01:00
Albert Vaca
4f39aa2b65 Disabled remote keyboard from stable branch
Se we can release from the stable branch without it until we release a
desktop version with this feature.
2017-02-05 21:31:34 +01:00
Albert Vaca
cba67c73a0 Fixed tests 2017-02-05 21:24:45 +01:00
Albert Vaca
2e5dc56366 Merge branch '1.x'
# Conflicts:
#	res/values-ast/strings.xml
#	res/values-gl/strings.xml
2017-02-05 21:23:13 +01:00
Albert Vaca
5ece4e21e7 Bumped android sdk version 2017-02-05 16:19:55 +01:00
Albert Vaca
be66fb23cf Stuff used from inner classes shouldn't be private. 2017-02-05 16:19:41 +01:00
Albert Vaca
a6bd803df8 Fixed NPE because frag.device was null
Why was this starting two RunCommand threads? Exec order is not guaranteed.
2017-02-05 15:42:03 +01:00
Albert Vaca
a5a4b360ae Fixed crash on unpairing 2017-02-05 15:34:16 +01:00
Albert Vaca
71e7218b4e Fixed java.lang.ClassCastException:
android.text.SpannableString cannot be cast to java.lang.String
2017-02-05 15:34:07 +01:00
Okoko Michaels
89ecdfc363 Accept or reject pair requests from the notification 2017-02-05 15:20:36 +01:00
l10n daemon script
1179807bcf GIT_SILENT made messages (after extraction) 2017-02-05 03:53:51 +01:00
l10n daemon script
4279ae824f GIT_SILENT made messages (after extraction) 2017-02-02 06:45:38 +01:00
l10n daemon script
753a6425ef GIT_SILENT made messages (after extraction) 2017-02-02 03:50:38 +01:00
l10n daemon script
08312e409d GIT_SILENT made messages (after extraction) 2017-01-31 08:49:33 +01:00
l10n daemon script
22526fdaa8 GIT_SILENT made messages (after extraction) 2017-01-30 03:47:18 +01:00
l10n daemon script
963b29ef6b GIT_SILENT made messages (after extraction) 2017-01-25 03:51:08 +01:00
Holger Kaelberer
ca9704eab2 Add remotekeyboard plugin
BUG: 370919
REVIEW: 129728
2017-01-23 09:07:18 +01:00
l10n daemon script
8d148aad92 GIT_SILENT made messages (after extraction) 2017-01-23 06:35:43 +01:00
l10n daemon script
1239944deb GIT_SILENT made messages (after extraction) 2017-01-23 03:43:48 +01:00
Albert Vaca
9e5e9b3047 Make package private 2017-01-22 06:08:07 +01:00
l10n daemon script
42f8289071 GIT_SILENT made messages (after extraction) 2017-01-15 04:03:15 +01:00
l10n daemon script
371ffefd20 GIT_SILENT made messages (after extraction) 2017-01-07 07:20:26 +01:00
l10n daemon script
614becd1a7 GIT_SILENT made messages (after extraction) 2017-01-07 03:41:41 +01:00
l10n daemon script
3c101210e2 GIT_SILENT made messages (after extraction) 2017-01-04 07:02:02 +01:00
l10n daemon script
52a4ac20ee GIT_SILENT made messages (after extraction) 2016-12-27 13:30:52 +01:00
l10n daemon script
42be344336 GIT_SILENT made messages (after extraction) 2016-12-26 06:42:43 +01:00
l10n daemon script
1811b93b0a GIT_SILENT made messages (after extraction) 2016-12-26 03:35:38 +01:00
Albert Vaca
6ed1bf6284 Fix crash when ringtone is null. 2016-12-25 16:57:32 +01:00
l10n daemon script
f1ca9a3c33 GIT_SILENT made messages (after extraction) 2016-12-22 06:40:55 +01:00
l10n daemon script
9d4bbbb629 GIT_SILENT made messages (after extraction) 2016-12-22 03:37:14 +01:00
l10n daemon script
60ff59bc34 GIT_SILENT made messages (after extraction) 2016-12-20 14:13:07 +01:00
l10n daemon script
059a3b2437 GIT_SILENT made messages (after extraction) 2016-12-20 08:31:20 +01:00
Albert Vaca
eeb19bd206 Allow sending more than one file from SendFileActivity 2016-12-19 09:19:40 +01:00
l10n daemon script
5e229085e9 GIT_SILENT made messages (after extraction) 2016-12-19 06:22:52 +01:00
l10n daemon script
a7c4bbd379 GIT_SILENT made messages (after extraction) 2016-12-18 06:17:35 +01:00
l10n daemon script
a38ffe34bd GIT_SILENT made messages (after extraction) 2016-12-18 03:44:15 +01:00
Albert Vaca
b5e6519efe Increased versio number to release 2016-12-17 15:33:09 +01:00
l10n daemon script
ad2b7678b9 GIT_SILENT made messages (after extraction) 2016-12-16 03:35:24 +01:00
l10n daemon script
9649efcdc4 GIT_SILENT made messages (after extraction) 2016-12-14 02:48:48 +01:00
l10n daemon script
99b7c4f312 GIT_SILENT made messages (after extraction) 2016-12-13 02:39:05 +01:00
l10n daemon script
c80820294c GIT_SILENT made messages (after extraction) 2016-12-12 02:34:13 +01:00
Albert Vaca
90856690fb Increased version number to release in the beta channel 2016-12-11 21:22:13 +01:00
Albert Vaca
1334dae342 Added a Share setting to add received files to the "Downloads" app
Only works for old-school (not-Storage Access Framework) paths, so we have
to keep track of the fact that we are using one or the other.

Also this requires the permission DOWNLOAD_WITHOUT_NOTIFICATION, but
hopefully the play store won't make users confirm this one.

This behaviour is enabled by default.
2016-12-11 21:03:39 +01:00
Albert Vaca
f8dd9bf923 Fixed crash if received file didn't have extension 2016-12-11 20:27:52 +01:00
Albert Vaca
72d8ba647a If transfer failed, don't create a pending intent nor index the file 2016-12-11 19:19:51 +01:00
Albert Vaca
b3449c87f7 Rewritten ShareSettingsActivity and de-duplicated SAF code in SharePlugin.
There was unused code and incorrect comments that were introduced in
commit e2e4086.
2016-12-11 18:57:21 +01:00
Albert Vaca
5c3b5a2737 Fixed comment as MayeulC suggested on IRC 2016-12-11 16:40:11 +01:00
Richard Wagler
e2e40863f8 Implement saving to SD card using SAF 2016-12-11 14:01:46 +01:00
Albert Vaca
036737deae Unused imports 2016-12-11 14:00:55 +01:00
Albert Vaca
8d7337b6b0 Refactored media scanner call into MediaStoreHelper 2016-12-11 13:59:52 +01:00
Albert Vaca
0a4459e8a0 Made Sftp server notify the Android MediaScanner of new/removed files
Plus refactored the code a bit to simplify logic
2016-12-11 13:59:00 +01:00
Albert Vaca
cef8cbd34a Android Studio update 2016-12-11 13:59:00 +01:00
l10n daemon script
3afb8ae8f3 GIT_SILENT made messages (after extraction) 2016-12-11 02:35:14 +01:00
l10n daemon script
85fce32bcb GIT_SILENT made messages (after extraction) 2016-12-10 02:32:33 +01:00
Albert Vaca
d52be109ee Revert "Add support to deal with album arts sent by mpris plugin."
This was very poorly implemented and can't stay as it is right now:
 - Every second or so the art image was being loaded from disk, scaled,
   base64 encoded and sent over the freakin network!
 - The Android interface didn't take into account small screens, and
   adding the image would cut stuff out of the screen.
 - Didn't manage "edge cases" like playing a song without cover after one
   with cover (previous image was still being shown) or changing players.

This reverts commit 24c404400f.

# Conflicts:
#	src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java
#	src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisPlugin.java
2016-12-08 23:47:17 +01:00
Albert Vaca
66794002f7 Updated version number to release in the beta channel/ 2016-12-08 20:53:40 +01:00
Albert Vaca
d61536ef76 Improved sharing files.
- Refactored the code to separate reading the file, sending it and
  updating the notification. This last part it's now done in a standalone
  sendPackage callback class.
- Added a non-async sendPacakge function to device, so we can properly
  wait for a file to finish before sending the next one without using
  recursive callbacks as before.
- Fixed bug that made it impossible to share more than one file from
  certain apps. This was caused because we can't access content resolvers
  any longer after closing the activity that was launched to "share" to.
  Now we do the content resolutions first and once for all files.
- When sending more than one file, do not spam one notification for each.
- There is no need to update the notifications from the UI thread, now
  we do it from a background thread instead.
2016-12-08 20:50:49 +01:00
Albert Vaca
1dad3c145d Make onProgressChanged updates time-based.
If used to update a notification, calling it too often would lag the UI
2016-12-08 20:50:49 +01:00
Albert Vaca
33f7a4809d Don't call onProgressChanged unless it actually changes 2016-12-08 20:50:49 +01:00
Albert Vaca
d81448ad34 Fixed LanLink always calling onProgressChanged with a progress of 0 2016-12-08 20:50:49 +01:00
Albert Vaca
ed4c0d24df Introduced NotificationHelper 2016-12-08 20:50:49 +01:00
Albert Vaca
fed9bb1eec Not an error 2016-12-08 20:50:49 +01:00
Albert Vaca
b7418c1db6 Socket should be volatile to prevent data-race
CCBUG: 368438
2016-12-08 20:50:49 +01:00
Albert Vaca
e6bc78f013 Some refactoring on sendpackage to reduce allocations of empty callbacks 2016-12-08 20:50:49 +01:00
Albert Vaca
22de200cbf Typo 2016-12-08 20:50:49 +01:00
Albert Vaca
22dde07892 Typo 2016-12-08 20:50:49 +01:00
Albert Vaca
f9bdfb9fbd Not actually an error 2016-12-08 20:50:49 +01:00
Albert Vaca
9d6476a27e Moved the code around to split it in big blocks and add some comments 2016-12-08 20:50:49 +01:00
Albert Vaca
29a8db9c45 On error show an error message, not a success message :) 2016-12-08 20:50:49 +01:00
l10n daemon script
6e1f8e1496 SVN_SILENT made messages (after extraction) 2016-11-29 03:03:55 +01:00
Albert Vaca
82b15292fb Merge branch '1.x' 2016-11-28 14:48:39 +01:00
Albert Vaca
32f9f3b76a Update gradle plugin to make Android Studio happy 2016-11-28 14:48:22 +01:00
Albert Vaca
fc25e42196 Remove FindMyPhoneActivity from the application switcher,
because returning to it would make it to ring again.
2016-11-23 18:34:31 +01:00
l10n daemon script
db3422268f SVN_SILENT made messages (after extraction) 2016-11-05 07:16:39 +00:00
l10n daemon script
71bef30624 SVN_SILENT made messages (after extraction) 2016-10-28 10:31:23 +00:00
l10n daemon script
15e0188538 SVN_SILENT made messages (after extraction) 2016-10-28 06:56:05 +00:00
l10n daemon script
8bc8a47e9d SVN_SILENT made messages (after extraction) 2016-10-17 10:38:49 +00:00
l10n daemon script
ad7769edde SVN_SILENT made messages (after extraction) 2016-10-17 06:58:14 +00:00
l10n daemon script
a2c51a16ee SVN_SILENT made messages (after extraction) 2016-10-14 10:45:01 +00:00
l10n daemon script
788555b69c SVN_SILENT made messages (after extraction) 2016-10-14 07:05:25 +00:00
l10n daemon script
ccdeb3d806 SVN_SILENT made messages (after extraction) 2016-10-07 07:02:29 +00:00
l10n daemon script
00a5ad3c1f SVN_SILENT made messages (after extraction) 2016-09-30 10:42:37 +00:00
Albert Vaca
b35ce0f821 Do not clear values if the player didn't actually change 2016-09-29 14:15:31 +02:00
Albert Vaca
77e38da2d9 Fixed spotify hacks and moved them to a single function in the code 2016-09-29 14:14:55 +02:00
Albert Vaca
8fb942ccdf Nothing changes in this function, no need to update the list. 2016-09-29 13:21:31 +02:00
Albert Vaca
74dc1bcd63 Reduced logging. Renamed variables in camelcase. 2016-09-29 13:21:13 +02:00
Albert Vaca
0f655cf4eb Added a check to see if the dialog is already open.
If tapping fast, two dialogs could be opened. Opening it twice caused the
second dialog to segfault on tapping yes.
2016-09-29 13:20:43 +02:00
Albert Vaca
0de86785f8 Merge branch 'master' into 1.x
# Conflicts:
#	res/values-da/strings.xml
2016-09-29 13:01:25 +02:00
Thomas Posch
5320c3c226 Make commands sorted by name
BUG: 369239
2016-09-29 12:57:22 +02:00
l10n daemon script
7234b34db7 SVN_SILENT made messages (after extraction) 2016-09-28 10:26:51 +00:00
l10n daemon script
428fa947a4 SVN_SILENT made messages (after extraction) 2016-09-25 10:36:05 +00:00
Albert Vaca
b454dec0a0 Merge branch '1.x' 2016-09-24 20:34:03 +02:00
Albert Vaca
2e3fabb3e5 Bumped version to release 2016-09-24 20:28:05 +02:00
Albert Vaca
c7b754a36e Swapped branches in if statement caused settings to not be stored in db 2016-09-24 20:26:23 +02:00
l10n daemon script
347c34927d SVN_SILENT made messages (after extraction) 2016-09-23 10:40:27 +00:00
Albert Vaca
6c3811a0af Merge branch '1.x' 2016-09-20 12:47:50 +02:00
Albert Vaca
e9013e7995 Android Studio 2.2 complains if we use an old version of the gradle plugin 2016-09-20 12:46:59 +02:00
Albert Vaca
3b5a7deebe Rewritten the Notification Filter.
- Now we display every app in the phone.
- We show the app icon next to the name.
- Some apps can now be disabled by default.

Disabled notifications for the default Android messaging app, as SMS
notifications are already handled by the telephony plugin.

BUG: 367930
2016-09-20 12:46:28 +02:00
Albert Vaca
ac04f5a610 Oops 2016-09-20 11:08:59 +02:00
Albert Vaca
efce35366b Bumped version to release 2016-09-20 10:54:44 +02:00
Albert Vaca
1a32f8142d Do not unpair on every handshake error.
Sometimes we get stupid errors like "connection closed by peer".

BUG: 368812
2016-09-20 10:53:10 +02:00
Albert Vaca
103f24c140 Reduce logging 2016-09-20 10:51:37 +02:00
Albert Vaca
66cdb77bbd Fixed margins of notification filter activity 2016-09-20 10:48:06 +02:00
Albert Vaca
86245a697e Print a warning if device name is not in the list of human readable names. 2016-09-19 16:20:35 +02:00
Albert Vaca
041f172195 Merge remote-tracking branch 'origin/1.x' 2016-09-19 16:19:21 +02:00
Albert Vaca
91eefcc65a Fixed margins in the settings activity 2016-09-19 16:16:30 +02:00
Albert Vaca
b25ec2d133 Added cipher list for Android versions between 11 and 21.
BUG: 368172
2016-09-19 16:16:30 +02:00
l10n daemon script
e2e78cb562 SVN_SILENT made messages (after extraction) 2016-09-19 10:16:29 +00:00
l10n daemon script
8b0b65178b SVN_SILENT made messages (after extraction) 2016-09-18 10:38:50 +00:00
l10n daemon script
6c1dcda744 SVN_SILENT made messages (after extraction) 2016-09-18 07:04:53 +00:00
l10n daemon script
34d8a771d7 SVN_SILENT made messages (after extraction) 2016-09-14 10:29:43 +00:00
l10n daemon script
91913664be SVN_SILENT made messages (after extraction) 2016-09-14 06:53:53 +00:00
Albert Vaca
9e680d1494 Merge branch '1.x' 2016-09-13 16:58:41 +02:00
Albert Vaca
7f3afd194b Trying to debug a "no shared ciphers" issue some users are experiencing. 2016-09-13 16:56:23 +02:00
Albert Vaca
4158a14437 Merge branch '1.x' 2016-09-12 17:15:06 +02:00
Albert Vaca
ef79b04d1a Bumped version to release 2016-09-11 21:47:49 +02:00
Albert Vaca
62bf2ccab7 Fixed clipboard propagation loop bug
Now ClipboardListener is a singleton

BUG: 362596
2016-09-11 21:40:07 +02:00
l10n daemon script
28a33172ce SVN_SILENT made messages (after extraction) 2016-09-08 07:23:50 +00:00
Albert Vaca
901440f78a Don't return an empty list of supported plugins
If we don't know it yet return them all.
2016-09-06 10:53:24 +02:00
Albert Vaca
e9a64dc99a Don't show the Encryption Info menu if we are not connected with the device
We don't know the actual encryption used unless we have a device link.
2016-09-06 10:53:24 +02:00
l10n daemon script
086194c629 SVN_SILENT made messages (after extraction) 2016-09-01 07:22:43 +00:00
l10n daemon script
23f7eb90ba SVN_SILENT made messages (after extraction) 2016-08-31 10:22:15 +00:00
Albert Vaca
75eca915dd Merge branch 'master' of git.kde.org:kdeconnect-android 2016-08-29 11:54:08 +02:00
Albert Vaca
cfcf9d97e7 Merge branch '1.x' 2016-08-29 11:53:49 +02:00
Albert Vaca
a8838b57bb What XML file? 2016-08-29 11:49:25 +02:00
Albert Vaca
2989fe5ab3 Bump version to release 2016-08-29 11:49:04 +02:00
Albert Vaca
9c40374b00 Unpair only when there is no certificate
Unpairing on every error was a bit too aggressive.

BUG: 367937
2016-08-29 11:48:30 +02:00
l10n daemon script
4acf931f5a SVN_SILENT made messages (after extraction) 2016-08-27 07:23:55 +00:00
Albert Vaca
1b369d0bf8 Bumped version to release 2016-08-26 19:13:04 +02:00
Albert Vaca
f093326f93 Re-enabled SMS plugin 2016-08-26 19:13:04 +02:00
Saikrishna Arcot
e95265c263 MPRIS: Read and apply the allowed actions for the player.
Read list of allowed actions for the player sent from KDE, and hide
buttons that perform actions that aren't allowed based on MPRIS.

REVIEW: 128273
2016-08-26 11:12:58 +02:00
Albert Vaca
fa689bace6 Merge branch '1.x' 2016-08-26 11:06:43 +02:00
Albert Vaca
b43e0628c2 FindMyPhone: Calling ring twice now stop the ringing
BUG: 366253
2016-08-26 11:04:56 +02:00
Albert Vaca
fdd6de5cee Gradle 2.1.3 fixes a privilege escalation vulnerability in 2.1.2 2016-08-26 11:02:54 +02:00
Albert Vaca
816d47026e Bumped version to release 2016-08-25 18:08:16 +02:00
Albert Vaca
14e97545e4 Unpair on error 2016-08-25 18:06:56 +02:00
l10n daemon script
1d5efe36f0 SVN_SILENT made messages (after extraction) 2016-08-19 10:33:47 +00:00
l10n daemon script
625bdd36e3 SVN_SILENT made messages (after extraction) 2016-08-19 07:02:54 +00:00
l10n daemon script
9478f5bb39 SVN_SILENT made messages (after extraction) 2016-08-15 10:10:03 +00:00
l10n daemon script
1f0e7f9705 SVN_SILENT made messages (after extraction) 2016-08-13 10:45:06 +00:00
l10n daemon script
fe4f099663 SVN_SILENT made messages (after extraction) 2016-08-11 10:52:48 +00:00
l10n daemon script
7272c0abf1 SVN_SILENT made messages (after extraction) 2016-08-10 10:28:10 +00:00
l10n daemon script
cbb1f3d806 SVN_SILENT made messages (after extraction) 2016-08-08 10:28:30 +00:00
l10n daemon script
717bb081a7 SVN_SILENT made messages (after extraction) 2016-08-08 06:58:25 +00:00
l10n daemon script
37669e2be0 SVN_SILENT made messages (after extraction) 2016-08-06 11:10:46 +00:00
l10n daemon script
9d612192e3 SVN_SILENT made messages (after extraction) 2016-08-06 07:27:45 +00:00
l10n daemon script
25527af4ad SVN_SILENT made messages (after extraction) 2016-08-05 10:08:52 +00:00
l10n daemon script
6c7cb63af9 SVN_SILENT made messages (after extraction) 2016-08-04 11:04:58 +00:00
l10n daemon script
4b171e624f SVN_SILENT made messages (after extraction) 2016-07-17 07:34:28 +00:00
Albert Vaca
e49ab67e26 Oops, still one place was missing. 2016-07-14 14:43:39 +02:00
Albert Vaca
edc3075763 Reintroduced hack as we broke compatibility with devices using version 0.9
And bumped version to release
2016-07-14 07:13:50 +02:00
Albert Vaca
fd2102b432 Bump version to release 2016-07-13 18:20:37 +02:00
Albert Vaca
adee9014fd Fixed sending files, we were closing the stream before it was sent 2016-07-13 18:20:15 +02:00
Albert Vaca
2c0d9af64d Unpair also if handshake fails but the callback is not called 2016-07-13 18:12:12 +02:00
Albert Vaca
53117c9a4b Bumped version to release beta 2016-07-13 18:11:48 +02:00
Albert Vaca
47ba298128 Disabled removing links when exiting discovery mode because it was broken.
If both devices are in "discovery mode" (ie: both want to keep links
established) and the last one to create the link goes out of discovery
mode, it will close the link when it shouldn't (because the other end still
was "using" it to display it to the user).
2016-07-12 12:39:51 +02:00
Albert Vaca
c5456fd84e Fixed issues detected in static analysis by Coverity 2016-07-07 17:45:04 +02:00
Albert Vaca
d29868ac04 Fixed npe when receiving payloads
Converting a socket to SSL has to be done after connecting to an address
2016-07-06 19:03:52 +02:00
Albert Vaca
4b7c5fb85a Fixed loopback link 2016-07-06 18:43:41 +02:00
Albert Vaca
de81a20f82 Made capabilities static like in /r/128386/ 2016-07-06 17:45:12 +02:00
l10n daemon script
ed9b804693 SVN_SILENT made messages (after extraction) 2016-07-06 07:16:41 +00:00
l10n daemon script
d9cc1c0ba4 SVN_SILENT made messages (after extraction) 2016-07-04 08:10:10 +00:00
l10n daemon script
92b8238977 SVN_SILENT made messages (after extraction) 2016-07-02 07:39:38 +00:00
l10n daemon script
8567abdfa6 SVN_SILENT made messages (after extraction) 2016-07-01 07:41:23 +00:00
l10n daemon script
d490d53be7 SVN_SILENT made messages (after extraction) 2016-06-30 07:37:33 +00:00
Saikrishna Arcot
7981d952ec Allow any type of list to be passed into NetworkPackage
And change return types to use List interface as well.

REVIEW: 128287
2016-06-28 21:53:26 +02:00
Albert Vaca
4e86eb0dd3 Changed some plugins descriptions to make them more discoverable.
Sorry translators!
2016-06-28 20:00:41 +02:00
l10n daemon script
6f8947377a SVN_SILENT made messages (after extraction) 2016-06-28 08:24:30 +00:00
Albert Vaca
106e651c6c Bumped version number to release 2016-06-26 17:26:57 +02:00
Albert Vaca
5669e3c22c Split notifications plugin in two: send and receive. 2016-06-26 17:08:47 +02:00
Albert Vaca
2d1dbd124c Fixed NPE if playerList was received null (which was due to a bug).
Maybe np.has(key) should return false if the key is set but null?
2016-06-26 17:07:57 +02:00
Albert Vaca
1edcbd2b39 Fixed incorrect packet type 2016-06-26 17:05:17 +02:00
Albert Vaca
c76a32ff05 Unused function 2016-06-26 17:04:54 +02:00
l10n daemon script
c078e45a98 SVN_SILENT made messages (after extraction) 2016-06-22 07:47:39 +00:00
Albert Vaca
163e3c31f4 Bumped version number to release 2016-06-21 17:29:26 +02:00
Albert Vaca
5a5e236710 Update build tools 2016-06-21 17:29:10 +02:00
Albert Vaca
603c87d42d Fixed tests after last refactor of lanlink 2016-06-21 16:45:18 +02:00
Albert Vaca
1a04bfbbea Fixed simple issues detected by lint 2016-06-21 16:44:21 +02:00
Albert Vaca
fec0b34330 Socket can't be null 2016-06-21 13:39:55 +02:00
Albert Vaca
f6c4084746 error -> warning for some logs 2016-06-21 13:38:21 +02:00
Albert Vaca
968d018f41 We were never reusing the existing link 2016-06-21 13:37:49 +02:00
Albert Vaca
4fc6ca8d4f Further simplified lanbackend 2016-06-20 14:26:49 +02:00
Albert Vaca
d3ab18b721 Increased version number to release as beta 2016-06-17 10:03:54 +02:00
Albert Vaca
b2d0e57641 Missing start() call on a thread! 2016-06-17 10:02:22 +02:00
Albert Vaca
66238406d6 Print if trusted when creating an ssl socket 2016-06-17 09:59:46 +02:00
Albert Vaca
010c960680 Check for trusted only once 2016-06-17 09:59:31 +02:00
Albert Vaca
49d4383828 Renamed running -> listening 2016-06-17 09:56:53 +02:00
Albert Vaca
226869e200 Fixed shared urls and text having the wrong package type 2016-06-17 09:43:23 +02:00
Albert Vaca
bbc1113710 Bumped version to release in beta channel 2016-06-17 02:27:18 +02:00
Albert Vaca
b3bacf241c Support both the new and old UDP port 2016-06-17 02:25:52 +02:00
Albert Vaca
ff47313409 Be less verbose 2016-06-17 02:25:10 +02:00
Albert Vaca
ac4f072322 Code cleanup 2016-06-17 02:01:20 +02:00
Albert Vaca
5ed1b80716 Fast compilation 2016-06-16 23:48:16 +02:00
Albert Vaca
8a413bb42e Working :D 2016-06-16 23:48:16 +02:00
Albert Vaca
71dc713578 Getting rid of netty WIP 2016-06-16 23:48:16 +02:00
Albert Vaca
ca3d677db6 Fixed warning 2016-06-16 23:46:24 +02:00
Albert Vaca
79ed37345b Simplified logic to find open ports. 2016-06-16 23:10:08 +02:00
Pinak Ahuja
24c404400f Add support to deal with album arts sent by mpris plugin.
We should probably look into resizing the album art according
 to the DPI of the device.
2016-06-16 10:37:04 +02:00
l10n daemon script
082de423c0 SVN_SILENT made messages (after extraction) 2016-06-16 07:48:15 +00:00
Albert Vaca
b5fb7f73ee Updated netty 2016-06-16 00:53:36 +02:00
Albert Vaca
097d1f5fa5 Removed log 2016-06-16 00:40:37 +02:00
Albert Vaca
5fa43f8979 Removed SO_BACKLOG because of a log message about it being unsupported 2016-06-16 00:40:37 +02:00
Albert Vaca
e5c7adba3a Ignore udp packets on the old port for devices that know about the new port 2016-06-16 00:40:20 +02:00
Kai Uwe Broulik
ced5c71369 [MousePadPlugin] Support mouse wheel events
This allows to scroll using a touch-enabled physical keyboard or a real mouse

BUG: 360006

Reviewed-By: Albert Vaca
2016-06-14 18:42:21 +02:00
Albert Vaca
9bf2adefc4 Commented annoying log message 2016-06-14 17:39:41 +02:00
Albert Vaca
24685348cf Moved hardcoded protocol version numbers to constants 2016-06-14 17:39:20 +02:00
Albert Vaca
7556e1d7fa Allow kdeconnect to broadcast both on UDP port 1714 and 1716 2016-06-14 11:13:20 +02:00
Albert Vaca
c9b852f88c Fix leak on Android < IceCream when workerGroup hasn't been initialized 2016-06-14 11:13:20 +02:00
Albert Vaca
d8169f3787 Reuse channel initializers in LanLinkProvider 2016-06-14 11:13:20 +02:00
l10n daemon script
b71e8562bc SVN_SILENT made messages (after extraction) 2016-06-13 08:19:24 +00:00
Albert Vaca
4d19a7cdc8 Fixed tests 2016-06-12 21:07:01 +02:00
Albert Vaca
ae7a80e262 Removed duplicate code when receiving identity packages via tcp and udp 2016-06-12 21:00:19 +02:00
l10n daemon script
4a269a607c SVN_SILENT made messages (after extraction) 2016-06-12 07:23:58 +00:00
Albert Vaca
a6c23b252c Increased version number to release 2016-06-10 15:47:51 +02:00
Albert Vaca
fa5f584fe4 shrinkResources was deleting our plugin preferences XML! 2016-06-10 15:47:18 +02:00
Albert Vaca
634f71d724 Increased version to release 2016-06-10 11:52:41 +02:00
Albert Vaca
055e0f6454 Added a comment explaining the proguard line we added yesterday. 2016-06-10 11:50:57 +02:00
Albert Vaca
8df2b7b0ee Fix the status bar covering the action bar in Android 4.4
Apparently the status bar handles translucency differently on 4.4 and 5+
2016-06-10 11:50:57 +02:00
l10n daemon script
5f64e94878 SVN_SILENT made messages (after extraction) 2016-06-10 07:25:16 +00:00
Albert Vaca
abbbc9414d Make proguard keep mina, as SSHD uses it.
Mina uses reflection (eg in SimpleIoProcessorPool.java), so proguard was
breaking it.
2016-06-09 16:00:04 +02:00
Albert Vaca
cfa13cb16b Updated to latest stable netty 2016-06-09 15:59:05 +02:00
Albert Vaca
d726fe23bf Increased version to release 2016-06-09 15:00:55 +02:00
Albert Vaca
d920b2659d Trying to fix people not being able to mount sftp 2016-06-09 15:00:42 +02:00
Albert Vaca
0836453c35 Project-wise optimize imports 2016-06-09 13:42:54 +02:00
Albert Vaca
09e1811bd8 Deprecated sendPackageEncrypted
It's only called for compatibility with old devices
2016-06-09 13:42:54 +02:00
Albert Vaca
1ab07d201e Enabled keepalive, increased socket queue size and removed logging handler 2016-06-09 13:42:54 +02:00
Albert Vaca
1c2dfdb795 Variable name 2016-06-09 13:42:54 +02:00
l10n daemon script
dd3df9d19f SVN_SILENT made messages (after extraction) 2016-06-08 07:13:23 +00:00
l10n daemon script
5bfbd90414 SVN_SILENT made messages (after extraction) 2016-06-07 08:29:00 +00:00
Albert Vaca
5eb17f7a9a Do not complain if there is no public key. 2016-06-07 00:35:07 +02:00
Albert Vaca
44be314899 Fixed bug that made file transfers not work.
The socket was not initialized for SSL when it should.
2016-06-07 00:28:37 +02:00
Albert Vaca
728fa0b508 Made SftpImpl contain a single class and renamed the file to match its name
This looks more like the java way.
2016-06-06 23:59:25 +02:00
Albert Vaca
e9e93423f1 Don't complain about our own packet types 2016-06-06 23:56:01 +02:00
Albert Vaca
a1dd4fe2cc Remove some hardcoded left-align 2016-06-06 18:35:47 +02:00
Albert Vaca
2294f30505 We actually work on RTL 2016-06-06 18:06:11 +02:00
Albert Vaca
8c86edcf33 Don't log an empty list 2016-06-06 18:05:48 +02:00
Albert Vaca
113739e1d9 Fixed rare crash 2016-06-06 00:01:59 +02:00
l10n daemon script
48cd5aa29b SVN_SILENT made messages (after extraction) 2016-06-05 07:23:59 +00:00
Albert Vaca
5487c5556b Specify useProgard and shrinkResources for Gradle plugin 2.1
minifyEnabled alone in 2.0+ refers to the new experimental code shrinker
shrinkResources removes unused resources
2016-06-04 15:26:13 +02:00
Albert Vaca
e34de854bf New release. 2016-06-04 13:46:02 +02:00
Albert Vaca
d8aab59d4b Trying to fix a bug some people is experiencing with the sensitivity option 2016-06-04 13:45:33 +02:00
Albert Vaca
835a4f0bc7 This should make the sms plugin work with old kdeconnect-kde git master.
For people using Ubuntu, which packages some random git version.
2016-06-04 13:43:34 +02:00
Albert Vaca
a588c8f787 Revert "SVN_SILENT made messages (after extraction)"
This reverts commit 2497ec2b1c.
2016-06-04 13:40:47 +02:00
Albert Vaca
36d1145df7 Increased support library version 2016-06-04 13:30:04 +02:00
Albert Vaca
5d3ccbe0b0 Incresed build tools version 2016-06-04 13:29:52 +02:00
l10n daemon script
2497ec2b1c SVN_SILENT made messages (after extraction) 2016-06-04 07:28:40 +00:00
Albert Vaca
bb8f015e87 Increased version number 2016-06-04 02:21:45 +02:00
Albert Vaca
f3e5bf917a Removed unneeded whitespaces. 2016-06-04 02:21:28 +02:00
Frederik Schwarzer
45ba30e0ba There should be no space before the colon. 2016-06-03 21:43:53 +02:00
Aleix Pol
f967c2888d Make sure we're not left with the sensitivity uninitialized
Fallback to the same value as default
2016-06-03 15:34:04 +02:00
Albert Vaca
6f0b581c02 Fixed crash 2016-06-03 14:51:31 +02:00
Albert Vaca
b0b67f2059 Added fixme 2016-06-03 01:35:45 +02:00
Albert Vaca
53ad86fe9a Do not show red messages to everybody (we will release Android before KDE) 2016-06-03 01:35:15 +02:00
Albert Vaca
39107400d4 Changed runcommand description 2016-06-03 01:12:47 +02:00
Albert Vaca
3f20af445a Renaming a package type was a bad call 2016-06-03 00:46:18 +02:00
Albert Vaca
e433ad8bce These logs are useless if we have no capabilities 2016-06-02 16:14:52 +02:00
Albert Vaca
53ca2a392c Hack got hackier 2016-06-02 15:57:12 +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
05e031d41f Changed to match the kdeconnect-kde side 2016-06-02 15:23:49 +02:00
Albert Vaca
d7956650da Log when sending a package type that no plugin has declared 2016-06-02 15:23:34 +02:00
Albert Vaca
43467aedd8 Hack to make packet types match those of older versions 2016-06-02 15:22:40 +02:00
Albert Vaca
541cd97c71 If capabilities are not present, iterate all plugins 2016-06-02 15:22:21 +02:00
Albert Vaca
7759152eeb Do not swallow packets silently 2016-06-02 13:56:46 +02:00
Albert Vaca
305d496bf5 Mute call button was not working on Android M because of a deprecated API 2016-06-02 13:26:19 +02:00
Albert Vaca
01b5c3e2a1 Be less verbose 2016-06-02 13:25:55 +02:00
Albert Vaca
a26d6a94f9 Increased version number for release candidate. 2016-06-02 12:37:20 +02:00
Albert Vaca
9dc8db00b5 Disabled SMS plugin so we don't require new permissions in this version 2016-06-02 12:36:50 +02:00
Albert Vaca
5ef5161378 Typo 2016-06-02 12:30:40 +02:00
Albert Vaca
0897f25a6f Less verbose logging of unmatched capabilities 2016-06-02 12:28:33 +02:00
Albert Vaca
394e530545 Wait a bit before forgetting about an old channel.
We might still receive a packet sent before the replacement.
2016-06-02 12:24:22 +02:00
Albert Vaca
ebbf5d165c Cosmetic changes to variable names 2016-06-02 12:20:04 +02:00
Albert Vaca
a0d2a61ce9 Merge branch 'master' into sslrefactor 2016-06-01 13:21:55 +02:00
Albert Vaca
2350e86023 Using the default theme in findmyphone 2016-06-01 13:21:30 +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
d729eed1cd Merge branch 'master' into sslrefactor
# Conflicts:
#	src/org/kde/kdeconnect/Plugins/FindMyPhonePlugin/FindMyPhonePlugin.java
#	src/org/kde/kdeconnect/Plugins/TelephonyPlugin/TelephonyPlugin.java
2016-06-01 12:58:10 +02:00
Albert Vaca
284ef5e571 TYPE_ALARM can return null. Adding a fallback. 2016-06-01 12:56:07 +02:00
Albert Vaca
0c98964f16 Input plugin only sends requests 2016-06-01 12:07:22 +02:00
Albert Vaca
6783ce2f1b Removed old log 2016-05-31 21:02:48 +02:00
Albert Vaca
6f6caa0e8d Log if plugins receive wrong packets 2016-05-31 21:02:35 +02:00
Albert Vaca
614505518b Fixed capabilities 2016-05-31 21:02:17 +02:00
Albert Vaca
240fa34833 Do not use encryption if the protocol is 6 2016-05-31 21:00:18 +02:00
Albert Vaca
6ecfc5071e Less alarming notification icon 2016-05-31 19:04:09 +02:00
Albert Vaca
d539cd704b Since we renamed the capabilities, disable them on old clients
We don't want old kdeconnects to try to use the renamed capabilities.
2016-05-31 17:23:55 +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
01b1e6ee4a Added missing shadow under the main activity's toolbar 2016-05-25 14:21:56 -06:00
Albert Vaca
969249e6d7 Added warning icon to the "not reachable" screen.
This way it doesn't look identical to the touchpad activity.
2016-05-25 14:01:30 -06:00
Albert Vaca
4f70c42ce5 Deleted stray file 2016-05-25 14:01:24 -06:00
Albert Vaca
4a612fd073 Removing log message 2016-05-25 10:57:50 -06:00
Albert Vaca
108f9e911d Typo 2016-05-25 10:57:27 -06:00
Albert Vaca
ddef90b985 Added some comments in build.gradle 2016-05-19 09:38:24 -07:00
Albert Vaca
e96f520829 Less and more useful logging in LanBackend 2016-05-19 09:29:17 -07:00
Albert Vaca
f9aeca8ef9 (un)serialize will now throw instead of failing silently 2016-05-19 09:28:15 -07:00
Albert Vaca
65c3dc4570 Reverting 6ed3a18
sshd > 0.8 seems to fail with "Could not find a valid sshd io provider"
2016-05-19 08:45:24 -07:00
l10n daemon script
aee22b5d15 SVN_SILENT made messages (after extraction) 2016-05-13 07:35:56 +00:00
l10n daemon script
2759da8d64 SVN_SILENT made messages (after extraction) 2016-05-08 07:17:03 +00:00
l10n daemon script
f615e95eeb SVN_SILENT made messages (after extraction) 2016-04-09 07:37:58 +00:00
l10n daemon script
e14da0d544 SVN_SILENT made messages (after extraction) 2016-04-04 08:20:21 +00:00
Albert Vaca
c01892f113 Fixed warnings 2016-03-15 13:54:44 -07:00
Albert Vaca
e39d5cc8ca The timer should remove the blacklisting, not add it again
Also added some logging and get the device id only once
2016-03-15 13:43:51 -07:00
Albert Vaca
45aa9d151f Compare against version 6, not current version 2016-03-15 13:37:23 -07:00
Albert Vaca
00715f3b6e Reusing provider 2016-03-15 12:55:25 -07:00
l10n daemon script
6e95e20521 SVN_SILENT made messages (after extraction) 2016-03-15 08:55:38 +00:00
Albert Vaca
2c513b598a Cleanup 2016-03-08 07:31:04 -08:00
Albert Vaca
fd7d39e6ac Added some proguard rules suggested by proguard itself when running 2016-03-07 15:49:45 -08:00
Albert Vaca
98914ce182 Fixed build
Somehow we need multidexing now, probably because when we build in debug
without proguard stripping unused code, we reach the max method count.
2016-03-07 15:49:30 -08:00
Albert Vaca
36e8d14973 Hack to fix "low battery" notification spam
When two phones were paired together and notification sync enabled, one
phone was receiving the notification again and again from the other, which
made obvious that it was being sent over and over.
2016-03-07 15:46:43 -08:00
Àlex Fiestas
17d5eeade0 Add fallback in case the contact does not have a name
Basically set the phoneNumber as name as it was before this change.

REVIEW: 127297
2016-03-07 11:38:36 +01:00
Àlex Fiestas
76eb88b51f Removed unused variable from ContactsHelper 2016-03-07 11:37:54 +01:00
Àlex Fiestas
07a9319c30 Also send the contact photo when a SMS is received
Pretty much like the phone call case.
2016-03-06 21:58:01 +01:00
Àlex Fiestas
c87b09c5f0 If the contact has a photo, include it in the packet
Basically adds as base64 in the packet the contact Photo. We should not
have to worry about the size of it since it is always 96x96 and android
takes care of that.
2016-03-06 21:58:01 +01:00
Àlex Fiestas
708bcf9928 Adapt phoneNumberLookup to return more information
It returns now photoID plus the name and it can be easily expanded in
the future if required.
2016-03-06 21:58:01 +01:00
Albert Vaca
b45a15c822 Made logs different so we can debug 2016-03-04 08:41:53 -08:00
Albert Vaca
0eba461654 Moved all the bouncy(spongy)castle code to the SslHelper class 2016-03-03 15:42:39 -08:00
Albert Vaca
7813b7309d Fixme 2016-03-03 15:41:44 -08:00
Albert Vaca
87e214761f Made sshd use spongycastle instead of bouncycastle
We have to add the DHG14 key exchange factory by hand because when calling
setUpDefaultServer with Bouncy Castle disabled, it assumes DHG14 is not
supported (but it is, because we are adding spongycastle).
2016-03-03 12:22:22 -08:00
Albert Vaca
6ed3a18f53 Upgraded sshd to 0.9
We can't upgrade it to 1.0 or 1.1 because these need java.nio.file, which
is standard java 7 but not present in Android.
2016-03-03 11:53:34 -08:00
Albert Vaca
db7e40fb35 Made proguard not keep **, but just the classes that we need
Disabled obfuscation, so stack traces are still useful
2016-03-03 11:37:36 -08:00
Albert Vaca
501ac90379 Java 7 is supported from API8, so why not enabling it? 2016-03-03 11:16:26 -08:00
Albert Vaca
4d553518f6 BouncyCastle doesn't work on Android 2.3, but spongy does
Now we have to make sshd work with spongy
2016-03-03 11:11:39 -08:00
Albert Vaca
9a2167774b Attribute not needed 2016-03-02 15:51:43 -08:00
Albert Vaca
22edb24230 Removed unused var. Fixed comments. Fixed typo. 2016-03-02 15:25:10 -08:00
Albert Vaca
f13a7148fc Don't complain about the public key we don't use 2016-03-02 11:40:10 -08:00
Albert Vaca
c0d21e986c Re-use existing link instead of creating a new one 2016-03-02 11:39:49 -08:00
Albert Vaca
baee1771f5 We don't need the chanel id to chanel map. 2016-03-02 10:40:17 -08:00
Albert Vaca
910af86c31 Updated dependencies 2016-03-02 10:39:23 -08:00
l10n daemon script
9f2999de23 SVN_SILENT made messages (after extraction) 2016-02-24 07:04:49 +00:00
Albert Vaca
acb2888bde Fixed test imports 2016-02-17 08:45:13 -08:00
Albert Vaca
06c872fddc LinearLayout is more performant than RelativeLayout 2016-02-17 08:45:03 -08:00
Albert Vaca
158931f766 Make drawer display under the system notifications bar 2016-02-17 08:44:41 -08:00
Albert Vaca
deac88031b Fixed drawer background not being the same color as the items background 2016-02-17 08:43:09 -08:00
Albert Vaca
f4c221cf66 Re-using a single SecureRandom, as it's expensive to initialize 2016-02-17 04:48:19 -08:00
Albert Vaca
521a27c09d Using longer and mixed case passwords 2016-02-17 04:48:01 -08:00
Albert Vaca
89a65ab3e2 Specify the TLS version we want
We need v1 to support Androids before API16
2016-02-17 04:07:12 -08:00
Albert Vaca
abd91b7d6c Sftp can now work with passwords when the public key is not available 2016-02-17 04:06:35 -08:00
l10n daemon script
79f096c09e SVN_SILENT made messages (after extraction) 2016-02-16 08:43:40 +00:00
l10n daemon script
9d0ef3ddf9 SVN_SILENT made messages (after extraction) 2016-02-13 07:27:17 +00:00
Albert Vaca
8c0fe406ec Merge branch 'master' into sslrefactor 2016-02-12 08:38:59 -08:00
Albert Vaca
7047622a62 Removing log message 2016-02-12 08:38:42 -08:00
Albert Vaca
98ef6aec8c Handle the case where there is no publicKey stored (for protocol v6) 2016-02-12 08:37:47 -08:00
Albert Vaca
c927af4bf3 Added newlines in encryption info 2016-02-12 08:37:18 -08:00
Albert Vaca
88b7c9898f Making sure proguard is not removing anything from bouncy/spongycastle
Some classes are only loaded dynamically and proguard would not see it.
2016-02-12 08:36:58 -08:00
Albert Vaca
62742ff8ae Updated netty 2016-02-12 08:34:27 -08:00
l10n daemon script
7f0ee677bd SVN_SILENT made messages (after extraction) 2016-02-12 07:23:39 +00:00
l10n daemon script
9b1f866cb0 SVN_SILENT made messages (after extraction) 2016-02-08 10:01:32 +00:00
l10n daemon script
353dc12165 SVN_SILENT made messages (after extraction) 2016-02-05 07:07:20 +00:00
l10n daemon script
5588c83909 SVN_SILENT made messages (after extraction) 2016-01-31 07:27:53 +00:00
l10n daemon script
b39433f237 SVN_SILENT made messages (after extraction) 2016-01-26 08:16:21 +00:00
l10n daemon script
612b019856 SVN_SILENT made messages (after extraction) 2016-01-25 09:01:01 +00:00
l10n daemon script
721856ebb6 SVN_SILENT made messages (after extraction) 2016-01-24 07:21:55 +00:00
l10n daemon script
2bd4d16361 SVN_SILENT made messages (after extraction) 2016-01-23 08:18:39 +00:00
Imran Tatriev
e3c5ac9228 Adjust the touchpad sensitivity 2016-01-21 16:39:31 +06:00
l10n daemon script
a75db516ec SVN_SILENT made messages (after extraction) 2016-01-20 08:01:32 +00:00
l10n daemon script
cf82127144 SVN_SILENT made messages (after extraction) 2016-01-19 08:50:26 +00:00
Albert Vaca
8a0e4caaff Fixed crash 2016-01-18 02:42:50 -08:00
Albert Vaca
c647cbd93c Made MPRIS interface wider
BUG: 346120
2016-01-18 02:42:50 -08:00
Albert Vaca
55871b6523 Bumped version number to release 2016-01-18 02:42:50 -08:00
Albert Vaca
8134c39a6d Android doesn't support languages with an @, hack to fix build 2016-01-18 02:42:50 -08:00
l10n daemon script
87c0a9f98e SVN_SILENT made messages (after extraction) 2016-01-18 02:42:06 -08:00
l10n daemon script
226e934d0f SVN_SILENT made messages (after extraction) 2016-01-18 02:42:06 -08:00
l10n daemon script
cfed03881b SVN_SILENT made messages (after extraction) 2016-01-18 09:12:23 +00:00
Albert Vaca
f618e8e670 Merge branch 'master' into sslrefactor 2016-01-17 10:36:27 -08:00
Albert Vaca
fe7b03830e Android doesn't support languages with an @, hack to fix build 2016-01-17 10:33:09 -08:00
Mikhail Ivchenko
caa491d1e7 Make a now playing label scroll horizontally
REVIEW: 126739
2016-01-17 22:22:13 +04:00
l10n daemon script
fba3e75cec SVN_SILENT made messages (after extraction) 2016-01-17 07:22:57 +00:00
Albert Astals Cid
71810c82d3 Disable colored output
Messes up scripty output that ends up in a file
2016-01-16 12:25:45 +01:00
l10n daemon script
7755772f5b SVN_SILENT made messages (after extraction) 2016-01-16 07:47:36 +00:00
Albert Vaca
53096e39eb Ignore if PublicKey is not present
It is not sent anymore while pairing as of protocol version 6
2016-01-15 09:21:51 -08:00
Albert Vaca
c7640967fe Merge branch 'master' into sslrefactor 2016-01-15 08:20:11 -08:00
Albert Vaca
15c2126387 Merge branch '0.9' 2016-01-15 08:19:19 -08:00
Albert Vaca
4f9945205c Untranslated string 2016-01-15 08:18:03 -08:00
Albert Vaca
f0bcf84f6c Untranslated string 2016-01-15 08:15:55 -08:00
Holger Kaelberer
49d499d9a9 notifications: try to decode payload into largeIcon
Newer API levels scale large icons in notifications automatically,
olders don't. Therefore we downscale manually if necessary to avoid
too big icons.

REVIEW: 126667
2016-01-11 20:26:57 +01:00
Albert Vaca
a0f102b26a Commented SftpPlugin as we know it won't work trivially after the refactor. 2016-01-10 08:48:20 -08:00
Albert Vaca
d07ff5a802 SSHD gets confused if spongycastle is present. Changed to BouncyCastle.
It sees it as bouncycastle, tries to load some clases by they classpath and
fails.
2016-01-10 08:46:52 -08:00
Albert Vaca
2421abea22 Bumped a bunch of library and sdk versions 2016-01-10 08:22:56 -08:00
Albert Vaca
1ca09d7f58 Fixing build 2016-01-10 03:16:14 -08:00
Albert Vaca
3e9509123e Merge branch 'master' into sslmaster 2016-01-10 01:24:26 -08:00
Holger Kaelberer
8e990765da Fix loosing already known plugins on reloading
REVIEW: 126273
2016-01-05 20:35:52 +01:00
l10n daemon script
3071323f84 SVN_SILENT made messages (after extraction) 2015-12-30 10:43:10 +00:00
l10n daemon script
2b89c0ed15 SVN_SILENT made messages (after extraction) 2015-12-30 06:51:27 +00:00
l10n daemon script
3861e393e0 SVN_SILENT made messages (after extraction) 2015-12-21 07:50:08 +00:00
l10n daemon script
1c65f55d00 SVN_SILENT made messages (after extraction) 2015-12-09 07:02:43 +00:00
Holger Kaelberer
742332df1e notifications: accept remote notifications
Notification synchronization in working in both directions now
for API level > 17.
For older versions only receiving of notifications is enabled.

REVIEW: 125179
2015-12-07 21:44:30 +01:00
l10n daemon script
d992e6c4eb SVN_SILENT made messages (after extraction) 2015-12-06 07:04:04 +00:00
l10n daemon script
4312648e29 SVN_SILENT made messages (after extraction) 2015-12-05 07:05:07 +00:00
l10n daemon script
d9a144b723 SVN_SILENT made messages (after extraction) 2015-12-03 10:47:04 +00:00
l10n daemon script
513f46aee1 SVN_SILENT made messages (after extraction) 2015-12-03 07:32:02 +00:00
Albert Vaca
f8da00b9b5 Merge branch 'master' into sslmaster 2015-12-02 09:46:22 -08:00
Albert Vaca
da66446200 Fixed back hardware button not working while in the touchpad plugin 2015-12-01 04:10:18 -08:00
Rahil Momin
b2804a4378 Add natural scroll option to mousepad plugin
REVIEW: 126141
2015-12-01 03:40:05 -08:00
l10n daemon script
5687ced2a4 SVN_SILENT made messages (after extraction) 2015-11-30 11:39:21 +00:00
l10n daemon script
115420d2ce SVN_SILENT made messages (after extraction) 2015-11-30 07:59:29 +00:00
l10n daemon script
de8835e9d1 SVN_SILENT made messages (after extraction) 2015-11-26 16:56:10 +00:00
l10n daemon script
7cf2c7d916 SVN_SILENT made messages (after extraction) 2015-11-26 13:49:46 +00:00
l10n daemon script
4e9a036627 SVN_SILENT made messages (after extraction) 2015-11-17 14:10:22 +00:00
l10n daemon script
fe37a29c53 SVN_SILENT made messages (after extraction) 2015-11-17 09:53:36 +00:00
Albert Vaca
78929ad31e Fixed a null pointer exception 2015-11-16 16:35:48 +01:00
Albert Vaca
f60920d556 Merge branch 'master' of git://anongit.kde.org/kdeconnect-android 2015-11-16 15:26:31 +01:00
l10n daemon script
0f2f036c45 SVN_SILENT made messages (after extraction) 2015-11-16 12:01:28 +00:00
Albert Vaca
1a16335f05 Merge branch '0.9' 2015-11-13 09:22:41 -08:00
Albert Vaca
475f85d0d3 Bumped version number 2015-11-13 09:19:26 -08:00
Albert Vaca
6c50d0f05d Indentation. 2015-11-13 09:18:13 -08:00
Albert Vaca
aad298ae31 Fixed remote input not sending numbers.
BUG: 354921
2015-11-13 09:17:57 -08:00
Albert Vaca
1e8aedf582 Merge branch '0.9' 2015-11-12 08:23:26 -08:00
Albert Vaca
4fab4d4a6c Bumped version number for release 2015-11-12 08:17:16 -08:00
Albert Vaca
47db10e055 Warnings 2015-11-12 08:16:54 -08:00
Albert Vaca
c0ae2c9c08 Make the rename box look slightly better 2015-11-12 08:14:24 -08:00
Albert Vaca
f4db8e6160 Trying to make the device label more easily clickable 2015-11-12 08:14:12 -08:00
Albert Vaca
d67985d484 Now with less compilation errors! 2015-11-12 06:41:14 -08:00
Albert Vaca
857d754f8c Merge branch '0.9' 2015-11-12 06:34:14 -08:00
Albert Vaca
d20cf1696b Added more device names 2015-11-12 06:33:20 -08:00
Albert Vaca
ca0ca6f7b7 Do not override system's screen orientation setting
BUG: 345934
2015-11-12 02:31:32 -08:00
Albert Vaca
b7f21e05a8 Merge branch '0.9' 2015-11-11 17:10:42 -08:00
Albert Vaca
3ee9ee27cd Fixed broken link 2015-11-11 17:10:38 -08:00
Albert Vaca
29ff203f24 Spotify player name will now be lowercase, mind both variants... 2015-11-11 11:05:08 -08:00
l10n daemon script
fb8e4a7cc2 SVN_SILENT made messages (after extraction) 2015-11-11 07:49:25 +00:00
l10n daemon script
6258497989 SVN_SILENT made messages (after extraction) 2015-11-07 15:37:41 +00:00
l10n daemon script
9612dabb0a SVN_SILENT made messages (after extraction) 2015-11-01 08:25:22 +00:00
Albert Vaca
1e152581e6 Fixes a typo 2015-10-27 11:45:21 -07:00
Joao Carreira
d59750441f Changes in Contacts Helper
Modify the contact helper in oder to split contact name and
contact number. Those values are sent separately
2015-10-27 11:44:04 -07:00
Malte S. Stretz
61ded9469c Always unlock all mutexes
In a few places ReentrantLocks are used as mutexes.  In case of an
exception happening in the critical section the locks are never
released though.  A ReentrantLock should (almost) always be followed
by a try-finally block as documented in
  http://docs.oracle.com/javase/7/docs/api/java/util/concurrent/locks/ReentrantLock.html
2015-10-27 11:44:04 -07:00
l10n daemon script
f82c01eb66 SVN_SILENT made messages (after extraction) 2015-10-27 09:49:21 +00:00
l10n daemon script
54881a65fa SVN_SILENT made messages (after extraction) 2015-10-26 01:45:55 +00:00
l10n daemon script
1630ca9a25 SVN_SILENT made messages (after extraction) 2015-10-13 10:22:15 +00:00
l10n daemon script
39db14b2ab SVN_SILENT made messages (after extraction) 2015-10-06 10:15:32 +00:00
l10n daemon script
1c13fe90a5 SVN_SILENT made messages (after extraction) 2015-10-03 08:53:40 +00:00
l10n daemon script
d283ed6ecc SVN_SILENT made messages (after extraction) 2015-10-02 08:09:17 +00:00
l10n daemon script
0ff6893b39 SVN_SILENT made messages (after extraction) 2015-09-30 07:59:12 +00:00
l10n daemon script
977fc8a7b6 SVN_SILENT made messages (after extraction) 2015-09-29 09:50:59 +00:00
l10n daemon script
7abace799a SVN_SILENT made messages (after extraction) 2015-09-28 08:20:49 +00:00
l10n daemon script
3207066928 SVN_SILENT made messages (after extraction) 2015-09-22 10:12:26 +00:00
l10n daemon script
12b84811ab SVN_SILENT made messages (after extraction) 2015-09-21 08:07:28 +00:00
l10n daemon script
b66fe45b4f SVN_SILENT made messages (after extraction) 2015-09-19 09:09:32 +00:00
Albert Vaca
9322970d58 Merge branch '0.9'
# Conflicts:
#	res/values-ca/strings.xml
#	res/values-fi/strings.xml
#	res/values-nl/strings.xml
#	res/values-pt-rBR/strings.xml
#	res/values-pt/strings.xml
#	res/values-sv/strings.xml
#	res/values-uk/strings.xml
#	res/values/strings.xml
#	src/org/kde/kdeconnect/Device.java
2015-09-18 08:11:44 -07:00
Albert Vaca
47c9729e04 Removed logs 2015-09-18 04:40:33 -07:00
l10n daemon script
a9676be722 SVN_SILENT made messages (after extraction) 2015-09-18 07:59:16 +00:00
l10n daemon script
f3f80893d2 SVN_SILENT made messages (after extraction) 2015-09-17 09:26:40 +00:00
Albert Vaca
b2819557bc Bumped version number to release 2015-09-16 09:42:09 -07:00
Albert Vaca
6035b91848 Merge branch 'master' of github.com:albertvaka/kdeconnect-android
# Conflicts:
#	store/header.png
#	store/header.xcf
2015-09-16 09:38:59 -07:00
Albert Vaca
3648ee32b4 Fixed header size 2015-09-16 09:36:49 -07:00
Albert Vaca
b8daca41b0 Modified icon for better display on light backgrounds 2015-09-16 09:33:43 -07:00
Albert Vaca
e464c993c2 Merge pull request #3 from micahdenn/master
Modified icon for better display on light backgrounds.
2015-09-16 17:41:37 +02:00
Micah Denn
b342199ed6 Modified icon for better display on light backgrounds and better compliance with material design. 2015-09-16 16:24:52 +01:00
Albert Vaca
6ef91dbb54 Merge branch 'master' of github.com:albertvaka/kdeconnect-android 2015-09-16 07:52:53 -07:00
Albert Vaca
278a358b71 Merge pull request #2 from LukeStonehm/master
Use 'ActionBarDrawerToggle'
2015-09-16 16:14:46 +02:00
l10n daemon script
a3f331f600 SVN_SILENT made messages (after extraction) 2015-09-16 08:15:54 +00:00
Luke Johnstone
e985e3648c UPDATED: • Now implementing 'ActionBarDrawerToggle' -> uses built in drawer icon (with nice built in animation) OCD fix.
• added "open"& "close" string -> inconsequential strings, user will never see these strings, but function requires them.
            Translate strings when you can :)
2015-09-16 09:52:55 +02:00
Albert Vaca
45ca9aae89 Fixed concurrent modification exception 2015-09-14 04:19:13 -07:00
l10n daemon script
dff28d7ee7 SVN_SILENT made messages (after extraction) 2015-09-14 08:11:38 +00:00
l10n daemon script
13dd8a36bd SVN_SILENT made messages (after extraction) 2015-09-13 08:29:41 +00:00
Albert Vaca
2dbb1fcb11 Added new store header 2015-09-12 15:32:30 -07:00
Albert Vaca
13369b078b Added new assets for the store 2015-09-12 14:34:31 -07:00
Albert Vaca
0e8257d515 Bumped version for release 2015-09-12 14:30:20 -07:00
Albert Vaca
a702f7869f Copied translations from master 2015-09-12 13:48:39 -07:00
Albert Vaca
606cbcdd8b Bumped version 2015-09-12 13:37:00 -07:00
Albert Vaca
80026f6d62 Merge branch 'stable' 2015-09-12 13:30:21 -07:00
Albert Vaca
24ca5f706a Fixed pairing requests not being displayed after clicking the notification 2015-09-12 13:21:06 -07:00
Albert Vaca
6b18c2f28e Top margin should be in the title, not in the view 2015-09-12 11:53:06 -07:00
Albert Vaca
0732f94a78 Fixed outgoing interfaces 2015-09-12 08:51:00 -07:00
Albert Vaca
33c233c780 Fixed capabilities being loaded for failed plugins 2015-09-12 08:06:12 -07:00
Albert Vaca
9c29cbf594 Load plugins in the same thread, so we know if they failed or not
This way we can update the capabilities accordingly.
2015-09-12 07:29:45 -07:00
Albert Vaca
6940bac3e6 Do not assume that all the plugins are non-null 2015-09-12 07:17:14 -07:00
Aleix Pol
629b38dec9 Implement the RunCommand plugin
Reviewed by Albert Vaca
2015-09-12 12:28:27 +02:00
Aleix Pol
effa740db4 Don't block plugins if they don't have any capabilities
Reviewed by Albert Vaca
2015-09-12 12:25:22 +02:00
Aleix Pol
3de229f1e5 Fix crash during exception catch
Reviewed by Albert Vaca
2015-09-12 12:24:38 +02:00
Aleix Pol
9b03bdf2c0 Make it possible to trigger a plugin page reload
Reviewed by Albert Vaca
2015-09-12 12:24:11 +02:00
Aleix Pol
56d6cffb71 Extend EntryItem
Makes it possible to use a subtitle in it, if provided.

Reviewed by Albert Vaca
2015-09-12 12:23:30 +02:00
l10n daemon script
a54c0ac4bd SVN_SILENT made messages (after extraction) 2015-09-12 09:17:32 +00:00
Albert Vaca
83415c699c Added an icon for runcommand and updated mpris icon 2015-09-12 02:15:41 -07:00
Albert Vaca
a6b590e477 Updated share_plugin_action icons 2015-09-12 02:11:40 -07:00
David Edmundson
8f53142a16 Add missing file 2015-09-11 21:45:39 +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
Albert Vaca
f5725b7c8d Merge branch 'master' into ssl
# Conflicts:
#	build.gradle
#	src/org/kde/kdeconnect/Backends/BaseLink.java
#	src/org/kde/kdeconnect/Backends/BaseLinkProvider.java
#	src/org/kde/kdeconnect/Backends/LanBackend/LanLink.java
#	src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java
#	src/org/kde/kdeconnect/Backends/LoopbackBackend/LoopbackLink.java
#	src/org/kde/kdeconnect/BackgroundService.java
#	src/org/kde/kdeconnect/Device.java
#	src/org/kde/kdeconnect/Helpers/DeviceHelper.java
#	src/org/kde/kdeconnect/UserInterface/DeviceActivity.java
#	src/org/kde/kdeconnect/UserInterface/PairActivity.java
#	tests/org/kde/kdeconnect/LanLinkProviderTest.java
#	tests/org/kde/kdeconnect/LanLinkTest.java
2015-09-11 09:24:35 -07:00
Albert Vaca
16cffda2e2 Increased version number to beta-release 2015-09-11 07:10:38 -07:00
Albert Vaca
291abddeba Merge branch 'stable' 2015-09-11 06:07:41 -07:00
Albert Vaca
473d984971 Moved the unique ID out of networkpackage se we don't need to create one 2015-09-11 06:07:12 -07:00
Albert Vaca
2c829af4e5 Renamed capabilities so we don't clash with KDE4's broken implementation 2015-09-11 05:20:19 -07:00
Albert Vaca
4456210953 Merge branch 'stable' 2015-09-11 04:45:06 -07:00
Albert Vaca
78d80ef5eb Unused import 2015-09-11 04:38:45 -07:00
Albert Vaca
95046e547f Open URLs by default in share plugin 2015-09-11 03:46:23 -07:00
Albert Vaca
34ec43445d Better print something on exception 2015-09-11 03:46:23 -07:00
Albert Vaca
9fed9e4b9a Added a new custom icon for notifications 2015-09-11 03:46:23 -07:00
Albert Vaca
cf8f87b6a1 Fixed crash 2015-09-11 01:23:07 -07:00
Albert Vaca
8307850805 Merge branch 'stable' 2015-09-10 15:52:21 -07:00
Albert Vaca
52a61f5663 Fixed test 2015-09-10 15:49:50 -07:00
Albert Vaca
ec0d91d3c2 Volume icon conforming to the Android Material guidelines 2015-09-10 15:49:50 -07:00
Albert Vaca
424763e3b6 Moved the unique ID out of networkpackage se we don't need to create one 2015-09-10 09:01:12 -07:00
Albert Vaca
7fc7a37be4 Merge branch 'stable' 2015-09-10 08:12:22 -07:00
Albert Vaca
bde4a06fe0 Increased the version number to beta-release 2015-09-10 08:07:06 -07:00
Albert Vaca
dcb54ebf4a Fixed some potential concurrent modification exceptions 2015-09-10 08:05:23 -07:00
Albert Vaca
132a223b8c Merge branch 'stable'
# Conflicts:
#	src/org/kde/kdeconnect/Device.java
2015-09-10 07:52:37 -07:00
Albert Vaca
35dd42f560 Fixed some potential concurrent modification exceptions
# Conflicts:
#	src/org/kde/kdeconnect/Device.java
2015-09-10 07:49:28 -07:00
Albert Vaca
b1ef93a90c Fixed drawer's updateComputerList not being called when there were changes
Plus removed some unnecessary calls in other places.
2015-09-10 07:48:32 -07:00
l10n daemon script
5777dfe238 SVN_SILENT made messages (after extraction) 2015-09-10 03:18:40 +00:00
Albert Vaca
d7123e3435 Merge branch 'stable' 2015-09-09 14:58:01 -07:00
Albert Vaca
a6e22f57f3 Increased version number to beta-release 2015-09-09 12:35:00 -07:00
Albert Vaca
55ae564023 Removed logs 2015-09-09 12:34:50 -07:00
Albert Vaca
24561b58f9 The discovery now should be enabled while navigating the app UI 2015-09-09 12:34:42 -07:00
Albert Vaca
c837079e03 Fixed crash 2015-09-09 12:30:24 -07:00
Albert Vaca
a9b4a6bdea Removed printfs and coding style stuff 2015-09-09 12:30:13 -07:00
Albert Vaca
d35623a28a Fixed discoverable mode dropping connections that we didn't create 2015-09-09 03:31:39 -07:00
Albert Vaca
0b8500338a Removed some logging 2015-09-09 03:22:34 -07:00
Albert Vaca
d5114c2238 Don't disconnect paired devices! 2015-09-09 02:03:36 -07:00
Albert Vaca
37f6c48d56 Merge branch 'stable' 2015-09-09 01:51:35 -07:00
Albert Vaca
1fe01db26e Assume computer by default from the phone for device with no type 2015-09-09 01:51:32 -07:00
Albert Vaca
f56fc9ceb8 Device type should be "desktop", no "computer" 2015-09-09 01:51:03 -07:00
Albert Vaca
1caa44b0ab Make it look better on old Androids 2015-09-09 01:51:03 -07:00
Albert Vaca
13ec8d7a3f Fixed crash on older Androids 2015-09-09 01:51:03 -07:00
Albert Vaca
59cdc2f6a8 Don't show buttons that can't be clicked 2015-09-09 01:50:12 -07:00
Albert Vaca
d860b67ba9 Prettier message 2015-09-09 01:50:12 -07:00
Albert Vaca
803464a7ce Fixed crash 2015-09-09 01:50:12 -07:00
Albert Vaca
b0a96ace32 Show connected devices in pairingfragment because otherwise it's confusing 2015-09-09 01:50:12 -07:00
Albert Vaca
10d9ff5a5a Commented out some logs 2015-09-09 01:50:12 -07:00
Albert Vaca
cedffe6578 Assume computer by default from the phone for device with no type 2015-09-09 01:50:12 -07:00
Albert Vaca
edb0ae3198 Device type should be "desktop", no "computer" 2015-09-09 01:50:11 -07:00
Albert Vaca
57bc4d46a9 Make it look better on old Androids 2015-09-09 01:50:11 -07:00
Albert Vaca
3bd6aabc96 Ooops 2015-09-09 01:50:11 -07:00
l10n daemon script
0eda30b135 SVN_SILENT made messages (after extraction) 2015-09-09 01:59:41 +00:00
Aleix Pol
4fa0a89691 Merge branch 'stable' 2015-09-09 00:46:53 +02:00
Aleix Pol
628142307f Reduce the amount of traffic we get
Only connect to the non-paired devices when we're on discovery mode,
otherwise disconnect from them.

Reviewed by Albert Vaca

BUG: 352424
2015-09-09 00:45:56 +02:00
Albert Vaca
476f7a7840 Implemented capabilities 2015-09-08 15:05:32 -07:00
Albert Vaca
27723c697b Added capabilities to plugins 2015-09-08 14:54:04 -07:00
Albert Vaca
6d28726c3b Show connected devices in pairingfragment because otherwise it's confusing 2015-09-08 14:45:01 -07:00
Albert Vaca
4c0bafa60f Fixed crash 2015-09-08 14:39:07 -07:00
Albert Vaca
ab131863fd Commented out some logs 2015-09-08 05:18:57 -07:00
Albert Vaca
506bc8d2c2 Started implementing the Send SMS plugin 2015-09-08 01:27:07 -07:00
Albert Vaca
b4f8d037e6 Prettier message 2015-09-08 01:27:07 -07:00
Albert Vaca
0b50bd8747 Don't show buttons that can't be clicked 2015-09-08 01:27:07 -07:00
Albert Vaca
da0d5af9d1 Ooops 2015-09-08 01:27:07 -07:00
David Edmundson
e68ba07e09 Use full keyboard handling rather than key events to get UTF-8 support
Use Androids InputConnection mechanism to get data from they keyboard,
rather than handling keys individually. This fixes UTF-8. As a side
effect, using "Google Voice Keyboard" to enter text will automatically
work.

Special keys and modifiers are still handled by the key event handler.

BUG: 350437
2015-09-08 10:23:49 +02:00
Albert Vaca
e637f46a46 Bumped version number to beta-release. 2015-09-07 02:19:47 -07:00
Albert Vaca
92e4fa864a Removed old UI 2015-09-07 02:16:23 -07:00
Albert Vaca
0e40327a50 Darkened volume icon 2015-09-07 02:16:23 -07:00
Albert Vaca
596440a0bc Bumped version number to release 2015-09-07 02:16:23 -07:00
Albert Vaca
8d9634730f DeviceFragment now also has the UI for pairing, dropped PairingActivity. 2015-09-07 02:16:23 -07:00
Albert Vaca
79f55d7ac2 Share Plugin now adds a "send file" item in the device plugins list. 2015-09-07 02:16:23 -07:00
Albert Vaca
9cc51287e2 MainActivity -> MaterialActivity 2015-09-07 02:16:23 -07:00
Albert Vaca
dd94f30c8a Implemented the context menu for PairingFragment 2015-09-07 02:16:23 -07:00
Albert Vaca
e2081d3892 Make sure we close our streams! 2015-09-07 02:16:23 -07:00
Albert Vaca
aa94a61732 Materialized logo 2015-09-07 02:16:23 -07:00
Albert Vaca
405dc258db Fixed DeviceFragment not loading the latest plugins list when displayed 2015-09-07 02:16:23 -07:00
Albert Vaca
c535637b45 Fixed PairingFragment and MaterialAct stealing the callback from each other 2015-09-07 02:16:23 -07:00
Albert Vaca
4d9f2d12b5 Change activity after unpairing 2015-09-07 02:16:23 -07:00
Albert Vaca
c46c669aad Fixed plugin list not reloading after the noti plugin is given permissions 2015-09-07 02:16:23 -07:00
Albert Vaca
e1f3ac9491 Removed some unused imports 2015-09-07 02:16:23 -07:00
Albert Vaca
1692fe714d Small appearance fixes. 2015-09-07 02:16:23 -07:00
Albert Vaca
9e44ce9c02 Trying to add the options menu to the DeviceFragment + crashes fixed 2015-09-07 02:16:23 -07:00
Albert Vaca
53d9b85d8b It's now possible to rename your device from the new UI 2015-09-07 02:16:23 -07:00
Albert Vaca
e71e409a38 Changed the colors of the drawer 2015-09-07 02:16:23 -07:00
Albert Vaca
4b9d946774 Fixed notifications plugin incompatibility with Android<21 2015-09-07 02:16:23 -07:00
Albert Vaca
e59ffc97fa More material: pairing works and revamped plugin preferences 2015-09-07 02:16:23 -07:00
Albert Vaca
12334f5a31 WIP 2015-09-07 02:16:22 -07:00
Ashish Bansal
0eb3c6e9f5 Load plugins which are registered to listen to unpaired devices
Plugins which are registered to receive packages from unpaired devices
should be loaded even if device is not paired, otherwise they won't be
able to listen to NetworkPackages from the unpaired devices.

REVIEW: 124906
2015-08-27 13:06:24 +05:30
Vineet Garg
b87aead06b Using reverse connection strategy for device with android version less than ICS
Enabled cipher suites manually due to issues caused by DHE by older devices
2015-08-25 01:06:49 +05:30
Vineet Garg
f908f5d8a1 Added spongy castle back, to support certificate generation on older devices which is not possible using bouncy castle due to same class name conflict
Fixed TLS version to TLSv1, this saves a connection failure due to TLSv1.2 hello message from devices with latest android versions

If device with new android version enquires about certificate from device with old version (<14) using setNeedClientAuth, connection fails on older device due to variation in certificate request code. So disabled server loop on older devices and using reverse connection hack for successful connection. But due to this, they can't connect to devices with similar android vesion since server is disabled on both and for a successful connection one should be server and one should be client
2015-08-24 02:03:55 +05:30
Vineet Garg
c4a27255a7 Removed spongycastle, now using bouncy castle version
Added reverse connection blacklist again
2015-08-23 00:11:36 +05:30
Vineet Garg
8cd59e701a Using custom built Netty 4.0.25, with fix for high memory usage.
This version does not have any error, as of now and working fine

Remove timer based blacklist for reverse connection since it is not needed now
2015-08-20 23:48:02 +05:30
Vineet Garg
8556e9399e Device unpairs only on handshake exception, not on any exception 2015-08-20 19:15:51 +05:30
Vineet Garg
6a4f0e79a9 Added timer based reverse connection blacklist to avoid infinite loop when two Android 5.0 devices are trying to connect
Changed netty all to netty handler, netty handler is smaller in size and contains required components
2015-08-20 17:05:13 +05:30
Albert Vaca
b34e7c8a78 Missing breaks in switch 2015-08-20 00:50:56 -07:00
Ashish Bansal
0868394596 Changed abstract plugin to receive packages from unpaired device
Now plugin can register to receive network packages from unpaired
devices.

REVIEW: 124819
2015-08-19 21:36:56 +05:30
Vineet Garg
cf4b840509 OOPS! used device name instead of link name in lan pairing handler 2015-08-17 23:54:10 +05:30
Vineet Garg
50fcea2cd9 Removed conscrypt
Fixed issue in netty, currently use custom build netty
Removed multi dex
2015-08-17 22:56:18 +05:30
Vineet Garg
7c9d6630d0 Show encryption info in device activity too 2015-08-15 18:44:49 +05:30
Vineet Garg
7fec58d6b2 We generate certificate for years present date - 1 to present date + 9, this avoid the case of certificate not valid due to different time zones on devices 2015-08-14 17:49:35 +05:30
Vineet Garg
cc7a1f5a2b Added default value while checking for link name in pairing handler, this provides backward compatibility 2015-08-14 17:34:35 +05:30
Vineet Garg
5b0876f424 Merge branch 'master' into netty 2015-08-13 15:03:36 +05:30
Vineet Garg
ce5d2c8394 Reimplemented pairing handler interface, now it it is similar to kde version 2015-08-13 14:55:00 +05:30
Albert Vaca
403c18a056 Notifications plugin now uses notifications' "key"s as id.
Instead of our custom packageName + tag + scoped id.
2015-08-10 00:28:16 -07:00
Albert Vaca
a15b06cdc7 Minor fixes (mostly cosmetic) as per Android Lint analysis 2015-08-10 00:26:58 -07:00
Albert Vaca
64c8eb8767 Oops! 2015-08-09 22:44:26 -07:00
Albert Vaca
7a5e0aca73 Updated device names list as per [1]
[1] https://github.com/meetup/android-device-names/pull/4
2015-08-04 10:53:50 -07:00
Albert Vaca
6c3aedbbc3 Removed some icons we don't need 2015-08-04 10:53:35 -07:00
Albert Vaca
f715c0797b Merge branch 'master' of git://anongit.kde.org/kdeconnect-android 2015-08-02 12:57:28 -07:00
Albert Vaca
fb49f471fb Bumped Android Gradle plugin version 2015-08-02 01:22:43 -07:00
l10n daemon script
b601f6b3c5 SVN_SILENT made messages (after extraction) 2015-08-01 02:07:19 +00:00
Vineet Garg
6314e4217e Merge branch 'master' into netty 2015-07-19 22:11:20 +05:30
Vineet Garg
f7f00057c9 Fixed certificate fingerprint formatting 2015-07-19 19:10:09 +05:30
Vineet Garg
b084c8653e Show full hash
Certifcates shown are wrongly ordered
2015-07-19 04:34:14 +05:30
Vineet Garg
d1dc0ba2b2 Commit from pc 2015-07-18 18:57:09 +05:30
l10n daemon script
2c296c4d19 SVN_SILENT made messages (after extraction) 2015-07-14 02:30:21 +00:00
l10n daemon script
252bbb45d0 SVN_SILENT made messages (after extraction) 2015-07-11 02:01:33 +00:00
Vineet Garg
fd5063e7a7 Enabled multi dex 2015-07-01 03:29:40 +05:30
Vineet Garg
442c01a8e5 Added x86 and mips conscrypt libs
Pairing is now done through links
2015-07-01 03:25:16 +05:30
l10n daemon script
d9415eb0e9 SVN_SILENT made messages (after extraction) 2015-06-30 02:20:44 +00:00
Vineet Garg
72ad2e010c Try when adding security provider 2015-06-28 21:30:06 +05:30
Vineet Garg
67227f4aa0 Added conscrypt readme 2015-06-28 20:40:45 +05:30
Vineet Garg
d93eb5d71e Added conscrypt, open ssl based provider for android
Fixed some isssues in CR
2015-06-28 20:07:05 +05:30
l10n daemon script
861d98eeff SVN_SILENT made messages (after extraction) 2015-06-27 02:02:20 +00:00
Vineet Garg
aeb9a717d4 Removed some log statements, fixed issues 2015-06-25 19:54:37 +05:30
Vineet Garg
1b726018d3 Fixed bugs pointed out by Albert on CR 2015-06-25 04:20:03 +05:30
l10n daemon script
4bc5c7e1ae SVN_SILENT made messages (after extraction) 2015-06-23 02:23:32 +00:00
Vineet Garg
ed6aef42a6 Removed mina core from build.gradle 2015-06-21 17:50:56 +05:30
Vineet Garg
02826ccfe4 Modified build tools version 2015-06-21 17:47:40 +05:30
Vineet Garg
00557052ff Corrected unit tests
Settings were not save properly when certificate was null
Removed LanLinkProvider test, impossible with new design
2015-06-21 17:30:29 +05:30
Vineet Garg
7be045e7c4 Added global preference to use ssl or not in case ssl is not working on some devices 2015-06-20 22:57:11 +05:30
Vineet Garg
8128c42824 Added support to send payload over ssl 2015-06-20 20:54:39 +05:30
Vineet Garg
41100ad371 Merge branch 'master' into netty 2015-06-20 17:50:00 +05:30
Vineet Garg
00a4d39bf6 Added support to verify keys during pair 2015-06-20 17:48:58 +05:30
Vineet Garg
8084b92990 No ecnryption when link is on ssl 2015-06-20 04:21:30 +05:30
Vineet Garg
e14f5a0df1 Ssl support added
Showing high cpu usage on some devices
2015-06-20 04:09:02 +05:30
Vineet Garg
af548ae949 Removed Udp Channel from LanLinkProvider, had no use 2015-06-19 15:49:07 +05:30
l10n daemon script
e53e11a184 SVN_SILENT made messages (after extraction) 2015-06-19 02:14:47 +00:00
Vineet Garg
2f16656aa0 Initial netty implementation 2015-06-19 04:00:27 +05:30
l10n daemon script
79df72b80b SVN_SILENT made messages (after extraction) 2015-06-18 02:07:27 +00:00
l10n daemon script
64eeb98b8e SVN_SILENT made messages (after extraction) 2015-06-17 02:02:24 +00:00
Albert Vaca
fb5fdf752d Don't mangle stacktraces, so crash reports are useful again. 2015-06-15 23:01:09 -07:00
Albert Vaca
99a6578ce3 If both devices request pairing at the same time, we just pair.
The second device accepts the request instead of failing.
2015-06-15 09:03:38 -07:00
l10n daemon script
4e46d83853 SVN_SILENT made messages (after extraction) 2015-06-15 02:06:13 +00:00
Albert Vaca
275cd03b19 Increased version number to release 2015-06-14 03:04:54 -07:00
Albert Vaca
c0a70e35f0 Fixed widgets not using the theme of the app
The problem was that I was passing the base context instead of the view's
2015-06-14 02:59:14 -07:00
Albert Vaca
8f3e0a8555 Don't define a theme that we don't use.
Now we use our theme, even though it just inherits from AppCompat's theme
2015-06-14 02:59:14 -07:00
Albert Vaca
2f77e24ad1 Possible crash related to device name handling
BUG: 348844
2015-06-14 02:59:14 -07:00
Albert Vaca
5b694a3b3e Fixed Android 4.1 crash 2015-06-14 02:59:14 -07:00
Albert Vaca
9a04f24de6 Apply AppCompat theme application-wise instead of per activity.
Last appcompat-v7-22 allows preference activities to use the AppCompat
themes via an AppCompatDelegate.
2015-06-14 02:59:14 -07:00
Albert Vaca
39fba2ef2a Bumped SDK version 2015-06-14 00:11:38 -07:00
Albert Vaca
de66bdfae3 pickFirst seems a better option than exclude 2015-06-13 21:47:32 -07:00
Albert Vaca
017d05b189 Added a proguard file that should fix a crash on Android 4.2 for Samsung
Also reduces the size of the APK.
2015-06-13 21:47:32 -07:00
l10n daemon script
d6264c3359 SVN_SILENT made messages (after extraction) 2015-06-14 02:11:57 +00:00
Vineet Garg
3e70c21031 Added LanLinkTest and LanLinkProviderTest 2015-06-13 12:36:22 +05:30
l10n daemon script
2a6325c472 SVN_SILENT made messages (after extraction) 2015-06-12 02:11:42 +00:00
Vineet Garg
3aadc94278 Added tests - DeviceTest and NetworkPackageTest 2015-06-10 12:29:53 +05:30
l10n daemon script
9e8efb1822 SVN_SILENT made messages (after extraction) 2015-06-10 02:11:10 +00:00
l10n daemon script
74f5e2bf84 SVN_SILENT made messages (after extraction) 2015-06-09 02:20:08 +00:00
l10n daemon script
45fdf3c0ac SVN_SILENT made messages (after extraction) 2015-06-08 02:03:58 +00:00
Albert Vaca
e00376a316 I meant "outdated comment" 2015-06-06 00:48:22 -07:00
Albert Vaca
f41fb4a9da Removed outdated plugin 2015-06-06 00:47:00 -07:00
Albert Vaca
e9a2cbd36b Fixed inconsistent plugin names 2015-06-06 00:43:38 -07:00
Albert Vaca
d5cb11e6c2 Changed color of device icons 2015-06-06 00:39:04 -07:00
Albert Vaca
3b0a3e265d Plugin key is now the plugin class instead of being defined by each plugin 2015-06-06 00:39:04 -07:00
Albert Vaca
a5e9b29e20 Don't call mutex.lock in the main thread 2015-06-06 00:32:05 -07:00
Albert Vaca
307071e9e7 Better names for some plugins 2015-06-06 00:32:05 -07:00
Albert Vaca
7c3e223e29 Default to phone instead of tablet for unknown devices 2015-06-06 00:32:05 -07:00
Albert Vaca
899c73d254 Removed ldpi icon 2015-06-06 00:25:33 -07:00
l10n daemon script
bd14c462dd SVN_SILENT made messages (after extraction) 2015-05-28 02:06:01 +00:00
l10n daemon script
e9b4ca70e9 SVN_SILENT made messages (after extraction) 2015-05-25 02:00:51 +00:00
l10n daemon script
706e3f71b5 SVN_SILENT made messages (after extraction) 2015-05-24 02:12:55 +00:00
l10n daemon script
f9b69a7e45 SVN_SILENT made messages (after extraction) 2015-05-17 02:10:34 +00:00
Albert Vaca
299e7e8375 Handling device type. Added device type icons (still unused). 2015-05-08 23:24:01 -07:00
Albert Vaca
f82c9c08cf Added icons to plugins (still unused). 2015-05-08 23:24:01 -07:00
Albert Vaca
25e1505df0 New interface for plugins 2015-05-08 23:23:36 -07:00
Albert Vaca
4d65382fa1 Moved icons from drawable to drawable-mdpi. We don't use drawable anymore. 2015-05-08 23:22:52 -07:00
Albert Vaca
bf02f639b7 Unpair if something goes wrong while loading a remembered device 2015-05-08 23:20:23 -07:00
Albert Vaca Cintora
067f01134a Added readme file. 2015-05-08 23:20:14 -07:00
l10n daemon script
7e2df27adb SVN_SILENT made messages (after extraction) 2015-04-14 02:47:49 +00:00
Albert Vaca
45bbed6d72 Increased version number to release 2015-04-11 23:53:24 -07:00
Albert Vaca
42f2f425a1 Commented out sendIcons logic until we fix the incomplete file transfers. 2015-04-11 23:53:24 -07:00
Albert Vaca
801c7cbd45 Default priority is not enough to intercept SMS with some apps.
Trying raising it to 500 (maximum is 999).

BUG: 342215
2015-04-11 23:53:24 -07:00
Albert Vaca
366aaea282 Removed unused styles.xml 2015-04-11 23:53:23 -07:00
Albert Vaca
02f5ce2581 Using setSoTimeout instead of implementing the timeout ourselves 2015-04-11 23:53:23 -07:00
l10n daemon script
a360ca0a01 SVN_SILENT made messages (after extraction) 2015-04-12 02:27:37 +00:00
l10n daemon script
d356a9e964 SVN_SILENT made messages (after extraction) 2015-04-08 02:03:18 +00:00
l10n daemon script
e588428812 SVN_SILENT made messages (after extraction) 2015-04-07 02:32:08 +00:00
l10n daemon script
db0f6288ff SVN_SILENT made messages (after extraction) 2015-04-06 02:03:40 +00:00
Albert Vaca
86236169d1 Increase version to release 2015-04-04 18:20:57 -07:00
Albert Vaca
32d9f199ff Let's flush this socket just in case 2015-04-04 18:08:53 -07:00
Albert Vaca
1d51c8792d Do not disconnect the devices when refreshing the listeners
This caused the devices to flicker in the main activity
2015-04-04 17:09:38 -07:00
Albert Vaca
6124b9a206 Minor changes trying to debug discovery issue reported by Aleix on the list 2015-04-04 17:08:26 -07:00
Albert Vaca
c3ad265490 Fixed crash 2015-04-04 14:41:22 -07:00
Albert Vaca
9cf9f43118 Fixes some potential null pointer exceptions reported by Coverity 2015-04-04 14:29:20 -07:00
Albert Vaca
11012e21e5 Added a different notification message for failed file transfers 2015-04-04 14:29:16 -07:00
Albert Vaca
b7faa97292 Handle closing some resources that we were missing to close 2015-04-04 14:29:11 -07:00
Albert Vaca
cc17402609 Fixed NioSocketConnector being kept open after every connection received
And other fixes in the LanLinkProvider
2015-04-04 12:55:52 -07:00
Albert Vaca
a0b82d17b4 Added some logging to help debugging an issue, now commented for future use
Also we prepend KDE/ to these logs to ease filtering them
2015-04-04 11:37:12 -07:00
Albert Vaca
8550de5e7f Coding style 2015-04-04 10:43:49 -07:00
Albert Vaca
46c70639ac Only unpair when receiving unknown packages if I'm not requesting pairing
In case the other device thinks we are paired and answers my identity
packet with unexpected stuff.
2015-03-30 23:26:57 -07:00
l10n daemon script
fb2b1232fb SVN_SILENT made messages (after extraction) 2015-03-31 02:22:21 +00:00
l10n daemon script
c2011831a9 SVN_SILENT made messages (after extraction) 2015-03-30 02:06:46 +00:00
l10n daemon script
ac3ab375ab SVN_SILENT made messages (after extraction) 2015-03-21 02:14:46 +00:00
Albert Vaca
ab4a1079cc Increased version number to release 2015-03-15 17:52:25 -07:00
Albert Vaca
57871802d8 Only try to mount the root of the phone if we have read access to it
BUG: 336043
2015-03-15 17:52:25 -07:00
Albert Vaca
838be381c3 Establishing connection only worked one way (bug introduced in 459fe40) 2015-03-15 16:58:28 -07:00
l10n daemon script
53ad94ef32 SVN_SILENT made messages (after extraction) 2015-03-14 02:09:03 +00:00
Albert Vaca
53031a0ff1 Increased version number to release 2015-03-07 20:16:19 -08:00
Albert Vaca
459fe403a8 Increased the maximum length of incoming NetworkPackages from 1KB to 512KB
BUG: 343417
2015-03-07 20:13:35 -08:00
Albert Vaca
c15263b416 MPRIS Activity kept the last song played while showing "No players found" 2015-03-07 13:44:45 -08:00
Albert Vaca
6e2b3289e6 Increased version number to release 2015-03-07 13:37:03 -08:00
Albert Vaca
7d7f10f022 MPRIS Activity didn't get any info from the plugin if there were no players 2015-03-07 13:31:09 -08:00
Vineet Garg
ea514c0a19 Previous commit was blocking links.add(link) for unpaired devices
Public key was set to null for unpaired devices and its Base64 encoding
was causing an exception.

REVIEW: 122806
2015-03-04 18:32:55 -08:00
l10n daemon script
1e34a42b8f SVN_SILENT made messages (after extraction) 2015-03-03 03:06:33 +00:00
Albert Vaca
db3f4a2fec We now update the name of a device if it changed the next time we see it 2015-03-01 20:57:45 -08:00
Albert Vaca
63a3b6afe4 Fixed crash when answering a pair request after the device is gone 2015-03-01 19:19:11 -08:00
Albert Vaca
66c137d11d Increased version number to release 2015-03-01 16:08:13 -08:00
Albert Vaca
7f26472665 Fixed crash when browsing the settings if the device got disconnected. 2015-03-01 16:06:49 -08:00
l10n daemon script
3c3cfa9c94 SVN_SILENT made messages (after extraction) 2015-03-01 02:13:28 +00:00
l10n daemon script
7f808a2e0f SVN_SILENT made messages (after extraction) 2015-02-27 02:17:02 +00:00
l10n daemon script
970f8c63b0 SVN_SILENT made messages (after extraction) 2015-02-26 02:06:37 +00:00
l10n daemon script
d2dbfd6384 SVN_SILENT made messages (after extraction) 2015-02-23 02:17:59 +00:00
l10n daemon script
d1b2cba609 SVN_SILENT made messages (after extraction) 2015-02-21 02:22:00 +00:00
l10n daemon script
bd6ab61594 SVN_SILENT made messages (after extraction) 2015-02-19 02:11:34 +00:00
l10n daemon script
73356a3ef7 SVN_SILENT made messages (after extraction) 2015-02-17 02:31:28 +00:00
l10n daemon script
71352bff0e SVN_SILENT made messages (after extraction) 2015-02-16 02:15:33 +00:00
Albert Vaca
f76977ef21 Fixed release build failing on lint errors 2015-02-01 12:31:51 -08:00
Albert Vaca
0510182866 De-duplicated code 2015-02-01 12:31:51 -08:00
Albert Vaca
88b38f224b Increased version number to release 2015-02-01 12:31:42 -08:00
Albert Vaca
3d415c5959 Fixes to the new sendPackage logic 2015-02-01 12:31:42 -08:00
Albert Vaca
bda6e3cb7f Fixed battery plugin 2015-02-01 12:31:42 -08:00
Albert Vaca
86261bd105 Lint fixes 2015-02-01 12:31:42 -08:00
Albert Vaca
f0935ebb8a Trying to simplify the sendPackage logic. 2015-02-01 12:31:41 -08:00
Albert Vaca
288ca01e44 Log cleanup 2015-02-01 12:31:41 -08:00
Albert Vaca
83a22cab9d Payload sizes are now longs instead of ints 2015-02-01 12:31:41 -08:00
Albert Vaca
e4f9c15b36 Explicit exceptions in NetworkPackage's encrypt/decrypt 2015-02-01 12:31:41 -08:00
Albert Vaca
b6b4850355 De-duplicated code 2015-02-01 00:08:49 -08:00
l10n daemon script
ba64b42711 SVN_SILENT made messages (after extraction) 2015-02-01 02:01:09 +00:00
l10n daemon script
f218d61f71 SVN_SILENT made messages (after extraction) 2015-01-27 02:02:36 +00:00
l10n daemon script
2dbbfa70c4 SVN_SILENT made messages (after extraction) 2015-01-25 02:04:39 +00:00
l10n daemon script
92be045f3a SVN_SILENT made messages (after extraction) 2015-01-23 02:09:35 +00:00
Albert Vaca
8765b7c692 Made notifications from KDE Connect silent
Flag "requestAnswer" should be renamed to "silent", using both for now.
2015-01-20 23:11:55 -08:00
Albert Vaca
39af8f96e6 Hide notifications for Google Now 2015-01-20 23:11:55 -08:00
Albert Vaca
823531ddea Code cleanup 2015-01-20 23:11:55 -08:00
Albert Vaca
2a224e5757 Hide empty facebook messenger notification 2015-01-20 23:11:55 -08:00
l10n daemon script
a45a56e779 SVN_SILENT made messages (after extraction) 2015-01-20 02:02:59 +00:00
l10n daemon script
f4ac548eeb SVN_SILENT made messages (after extraction) 2015-01-19 02:01:35 +00:00
l10n daemon script
b488aeaeee SVN_SILENT made messages (after extraction) 2015-01-18 02:00:17 +00:00
Albert Vaca
79480d0b23 In some cases file size was being incorrectly set when sharing a file.
It was set as a field in the network package instead of with the payload.
2015-01-17 16:40:57 -08:00
Vineet Garg
1edca5e45c Added progress bar in notification while sending file
REVIEW: 121980
2015-01-17 16:40:57 -08:00
Albert Vaca
ded027d3cc Revert "Added MPRIS controls from the notifications panel"
This reverts commit 816a6f5c79.

Conflicts:
	src/org/kde/kdeconnect/Plugins/MprisPlugin/MprisActivity.java
	src/org/kde/kdeconnect/Plugins/MprisPlugin/NotificationPanel.java
	src/org/kde/kdeconnect/Plugins/MprisPlugin/NotificationReturnSlot.java
2015-01-17 16:40:57 -08:00
l10n daemon script
e1cec047d8 SVN_SILENT made messages (after extraction) 2015-01-17 01:59:03 +00:00
l10n daemon script
ad3046118b SVN_SILENT made messages (after extraction) 2015-01-16 02:04:47 +00:00
l10n daemon script
f951f4769e SVN_SILENT made messages (after extraction) 2015-01-15 01:58:17 +00:00
l10n daemon script
a67f7cdfbd SVN_SILENT made messages (after extraction) 2015-01-14 02:04:34 +00:00
l10n daemon script
8acb022c80 SVN_SILENT made messages (after extraction) 2015-01-13 02:00:22 +00:00
l10n daemon script
0d575016ed SVN_SILENT made messages (after extraction) 2015-01-12 02:06:27 +00:00
Albert Vaca
391b61867d Added a comment 2015-01-10 22:46:18 -08:00
Albert Vaca
74bec9a7de Fixed not being able to read some customized notifications
Fixed error "Expected String but value was a android.text.SpannableString"
2015-01-10 00:47:13 -08:00
Albert Vaca
c4a87ecb50 Added a new setting to do nothing when using two/three finger taps. 2015-01-10 00:33:47 -08:00
Albert Vaca
e2b2e91f73 Improvements to plugins settings.
Added a startPreferencesActivity method to Plugin so we don't need to do a
hack to launch a custom activity for the notifications plugin.

CCMAIL: grg.vineet@gmail.com
2015-01-10 00:33:47 -08:00
Vineet Garg
5e905ddd63 Added setting to filter notifications from certain applications
REVIEW: 121687
2015-01-10 00:33:31 -08:00
Vineet Garg
75697cedca Added a progress bar in the notification while receiving a file
RB: 121910
2015-01-09 21:40:06 -08:00
l10n daemon script
41aa3fe53e SVN_SILENT made messages (after extraction) 2015-01-09 02:06:39 +00:00
Albert Vaca
332c2d4856 Added support for Ctrl, Alt, Shift combinations and F keys to keyboard.
To use with keyboards like Hacker's Keyboard (tested with it).
2015-01-06 00:05:44 -08:00
Mikhail Ivchenko
96e8610363 Implemented functionality to mute an incoming call.
REVIEW: 121855
2015-01-05 21:59:09 -08:00
l10n daemon script
820b32d260 SVN_SILENT made messages (after extraction) 2015-01-03 01:58:12 +00:00
l10n daemon script
63c47d201e SVN_SILENT made messages (after extraction) 2015-01-02 02:02:08 +00:00
l10n daemon script
7e24d87db0 SVN_SILENT made messages (after extraction) 2014-12-31 01:58:56 +00:00
l10n daemon script
2d60a25192 SVN_SILENT made messages (after extraction) 2014-12-30 01:52:18 +00:00
Albert Vaca
7e9b61a4fb Updated device names list 2014-12-28 21:09:48 -08:00
l10n daemon script
527381104d SVN_SILENT made messages (after extraction) 2014-12-27 01:54:34 +00:00
Da-Jin Chu
8d67e0b0f1 Added a "No players found" message to MPRIS Plugin when player list is empty 2014-12-24 20:51:55 -08:00
Albert Vaca
6328a01d1e Added comment 2014-12-21 20:32:12 -08:00
Albert Vaca
1c76720794 Detect shared youtube videos and open them in a browser instead of as text 2014-12-21 20:31:29 -08:00
Albert Vaca
e4d683f27c Moved ShareToReceiver to SharePlugin 2014-12-21 19:59:31 -08:00
Albert Vaca
227bb855dd Made the mousepad activity full screen. 2014-12-21 19:13:39 -08:00
Albert Vaca
0f612c195d Made the mousepad activity keep the screen on. 2014-12-21 17:14:53 -08:00
l10n daemon script
39db2180a7 SVN_SILENT made messages (after extraction) 2014-12-21 02:04:46 +00:00
l10n daemon script
c03cdf8a6d SVN_SILENT made messages (after extraction) 2014-12-20 01:56:01 +00:00
l10n daemon script
631635498d SVN_SILENT made messages (after extraction) 2014-12-18 02:03:48 +00:00
l10n daemon script
a33e1fa0d0 SVN_SILENT made messages (after extraction) 2014-12-17 02:00:14 +00:00
l10n daemon script
b36dc23028 SVN_SILENT made messages (after extraction) 2014-12-16 02:02:59 +00:00
Albert Vaca
b519bc5e1d Improvements and bugs fixed in the mpris plugin 2014-12-14 01:14:35 -08:00
Da-Jin Chu
816a6f5c79 Added MPRIS controls from the notifications panel 2014-12-13 21:55:36 -08:00
Albert Vaca
26b321ee76 Do not send notifications with the flag "local only" 2014-12-13 21:48:54 -08:00
Albert Vaca
1a7697009d Better support for seeking long media:
-Displaying duration in hours if longer than 60 minutes.
-Using miliseconds instead of nanoseconds for time.
-Using longs instead of ints to store time.

CCMAIL: zelitomas@gmail.com
2014-12-13 18:43:05 -08:00
Tomáš Zelina
8e23ff5cf6 Implemented current/total time and progress slider in MPRIS plugin
CCMAIL: zelitomas@gmail.com.
2014-12-13 14:43:20 -08:00
Albert Vaca
edff3a86bc Added haptic feedback for drag'n drop.
CCMAIL: michael@hathaways.me.uk
2014-12-10 23:39:28 -08:00
Michael Hathaway
d7e7de4079 Implemented drag'n drop in the mousepad plugin.
REVIEW: 121415
CCMAIL: michael@hathaways.me.uk
2014-12-10 23:38:34 -08:00
Albert Vaca
59c0a06143 For some reason my Android Studio doesn't like 21.0.3, rolling back to .2 2014-12-10 23:32:07 -08:00
Albert Vaca
fd91c3f27d Updated build.gradle to be used with the just released Android Studio 1.0 2014-12-10 21:57:58 -08:00
l10n daemon script
49b1e5c467 SVN_SILENT made messages (after extraction) 2014-12-11 01:59:40 +00:00
l10n daemon script
6829dac516 SVN_SILENT made messages (after extraction) 2014-12-10 01:58:24 +00:00
l10n daemon script
0fdb649ee4 SVN_SILENT made messages (after extraction) 2014-12-08 02:02:05 +00:00
Luigi Toscano
580c3ff30b Ignore fuzzy messages when importing translations
Fuzzy messages are de-facto untranslated messages.

CCBUG: 341632
2014-12-07 16:14:27 +01:00
l10n daemon script
27d853d778 SVN_SILENT made messages (after extraction) 2014-12-07 01:56:33 +00:00
l10n daemon script
4e2a264ab9 SVN_SILENT made messages (after extraction) 2014-12-04 01:58:45 +00:00
l10n daemon script
d9aae111fe SVN_SILENT made messages (after extraction) 2014-12-03 01:57:46 +00:00
Albert Vaca
c0f103fdde More fixes to the store translations system 2014-12-01 21:32:59 -08:00
l10n daemon script
4f3ff37712 SVN_SILENT made messages (after extraction) 2014-12-02 02:03:25 +00:00
Albert Vaca
872372f694 Increased version number to release 2014-11-30 22:44:49 -08:00
Albert Vaca
6fccbe99ad Fixed untranslated string 2014-11-30 22:43:42 -08:00
Albert Vaca
240c566124 Wrong condition added in commit 5dd3d02052 2014-11-30 22:25:56 -08:00
Albert Vaca
3b64199ee2 Removed line breaks from the pot file 2014-11-30 01:40:56 -08:00
Albert Vaca
38a6b0be81 Had to increase the version again because I screwed up the store upload 2014-11-30 01:40:34 -08:00
Albert Vaca
8aa2c08aff Merge branch 'master' of git.kde.org:kdeconnect-android 2014-11-29 23:30:30 -08:00
Albert Vaca
615eaff458 Increased version number to release 2014-11-29 23:22:06 -08:00
Albert Vaca
5dd3d02052 Only report mounted items on /storage 2014-11-29 23:21:50 -08:00
Albert Vaca
2b043aaaab Reverted hack of including our own design for selectors
Switched to the standard abc_list_selector_holo_dark, that has no problems
in the current appcompat library. Using it from XML file instead of source.

This reverts changes from 03ede77bd1
2014-11-29 22:04:21 -08:00
Albert Vaca
e8c792927d Removed some sample custom dimens.xml files that I think have no use 2014-11-29 22:03:53 -08:00
Albert Vaca
a9df032793 Moved ic_action_keyboard from drawable-mdpi to drawable like the others 2014-11-29 22:03:53 -08:00
Albert Vaca
f685c4f25d Added some nice padding to the device names in the main list 2014-11-29 21:21:14 -08:00
Albert Vaca
4f2512a9c6 Probably "Available devices" sounds better than "Not paired devices" for
a new user that just opens the app and maybe sees no devices yet.
2014-11-29 21:19:35 -08:00
Albert Vaca
c12ee997e9 MPRIS Activity should be an ActionBarActivity 2014-11-29 20:17:52 -08:00
l10n daemon script
dbdaa07502 SVN_SILENT made messages (after extraction) 2014-11-30 02:03:10 +00:00
l10n daemon script
3a27818b0a SVN_SILENT made messages (after extraction) 2014-11-29 02:03:26 +00:00
l10n daemon script
236f0df240 SVN_SILENT made messages (after extraction) 2014-11-28 02:07:32 +00:00
Albert Astals Cid
d565a50460 Make repack-pot.pl happier 2014-11-27 22:05:04 +01:00
Albert Vaca
b8df0fab00 Changed way to fetch translations for the store, following aacid's advice 2014-11-25 23:54:31 -08:00
l10n daemon script
7a50d2e96a SVN_SILENT made messages (after extraction) 2014-11-26 01:57:18 +00:00
l10n daemon script
436e835f64 SVN_SILENT made messages (after extraction) 2014-11-25 02:02:32 +00:00
Albert Vaca
9e8742935a Added store content to the repo so it can be translated 2014-11-23 22:59:00 -08:00
l10n daemon script
070f41b44a SVN_SILENT made messages (after extraction) 2014-11-24 02:06:45 +00:00
Albert Vaca
efe49ad650 Fixed translations script 2014-11-23 09:49:24 -08:00
Albert Vaca
e2eb886cca Increased version number to release 2014-11-22 17:05:01 -08:00
Albert Vaca
f01811446a Migrated project to latest Android SDK and moved sources out of 'main' dir
Sorry for the conflicts caused by moving the sources!
2014-11-22 17:04:37 -08:00
Albert Vaca
cf0456755b Try to find 'camera pictures' in every storage dir, not only the main one
BUG: 340327
2014-11-22 17:03:54 -08:00
Albert Vaca
40d4561c9b Fixed StorageHelper on Lollipop 2014-11-22 17:03:53 -08:00
Albert Vaca
e7d3e6c8ff CustomDevicesActivity was missing the license header 2014-11-20 23:51:04 -08:00
Achilleas Koutsou
7283caa09c Manual IP connection
This patch adds a new menu to add and remove IP addresses and hostnames,
and makes LanBackend read that list of addresses and send identity packets
to them. This bypasses the autodiscovery which usually happens via
broadcast packets, and allows the pairing and communication of devices even
if broadcast is not possible between them.

BUG: 326509
REVIEW: 121104
2014-11-20 23:49:45 -08:00
l10n daemon script
e3dfc69ca1 SVN_SILENT made messages (after extraction) 2014-11-18 02:00:49 +00:00
Albert Vaca
78438a2522 Added license header to source files 2014-11-16 23:14:06 -08:00
Albert Vaca
04ad41dd09 Fixed crash 2014-11-16 20:19:15 -08:00
Albert Vaca
933cc9be2d Fixed crash 2014-11-16 20:19:15 -08:00
l10n daemon script
f2480e4d97 SVN_SILENT made messages (after extraction) 2014-11-17 02:02:54 +00:00
l10n daemon script
f4f7fb2ee3 SVN_SILENT made messages (after extraction) 2014-11-16 01:59:34 +00:00
l10n daemon script
19c4caadf4 SVN_SILENT made messages (after extraction) 2014-11-15 02:04:01 +00:00
l10n daemon script
25a947fd29 SVN_SILENT made messages (after extraction) 2014-11-14 02:09:42 +00:00
l10n daemon script
8f33a609aa SVN_SILENT made messages (after extraction) 2014-11-13 02:01:22 +00:00
l10n daemon script
e9d9780fd0 SVN_SILENT made messages (after extraction) 2014-11-11 02:04:58 +00:00
Albert Vaca
156b77a729 Small changes to the appearance of the plugin list activity 2014-11-09 16:46:39 -08:00
Rahil Momin
1189f257e0 Added settings to mousepad plugin to allow changing the default behaviour
for multi-tap input.

REVIEW: 120955
2014-11-09 16:46:39 -08:00
l10n daemon script
0bc782f91a SVN_SILENT made messages (after extraction) 2014-11-02 01:54:19 +00:00
l10n daemon script
b42f1e44b2 SVN_SILENT made messages (after extraction) 2014-10-21 02:00:57 +00:00
Albert Vaca
debbe4fe2c Increased version number to release 2014-10-20 01:31:54 -07:00
Albert Vaca
5724a66561 Added some extra safety checks 2014-10-20 01:30:02 -07:00
Albert Vaca
91fe9d63b0 Removed incorrect translation. 2014-10-20 01:14:45 -07:00
Albert Vaca
a90928188a Fixed crash. 2014-10-20 01:13:41 -07:00
Albert Vaca
256ca60036 Updated version number to release. 2014-10-18 21:19:15 -07:00
Albert Vaca
05fd6fe5b0 Extra safety check 2014-10-18 21:19:15 -07:00
Albert Vaca
6b9a691f24 Fixed warning 2014-10-18 21:19:15 -07:00
l10n daemon script
d18b61f2a1 SVN_SILENT made messages (after extraction) 2014-10-19 01:58:23 +00:00
Albert Vaca
6448258648 Wrong translations sneaked in again
Revert "SVN_SILENT made messages (after extraction)"

This reverts commit f3fbe4d035.
2014-10-17 19:12:36 -07:00
Albert Vaca
e5e9490f19 Resize window when the keyboard appears, so text is always centered. 2014-10-17 19:11:38 -07:00
Albert Vaca
9f7c5be533 Do not restart the activity when orientation changes. 2014-10-17 19:11:38 -07:00
Albert Vaca
f690105181 "Show keyboard" button now actually toggles it. 2014-10-17 19:11:38 -07:00
Albert Vaca
dafe9eb023 Keyboard won't use the full screen when in landscape mode. 2014-10-17 19:11:38 -07:00
Albert Vaca
cfbe6775d0 Linefeed was sent instead of return when return was pressed. 2014-10-17 19:11:38 -07:00
Albert Vaca
6365143c2c Added icon to open the keyboard from the action bar 2014-10-17 19:11:38 -07:00
l10n daemon script
f3fbe4d035 SVN_SILENT made messages (after extraction) 2014-10-15 01:56:22 +00:00
Albert Vaca
2862e5164e Oops 2014-10-14 01:31:51 -07:00
Albert Vaca
6fae1d350d Android Studio decided to change the order of some lines 2014-10-14 01:12:39 -07:00
Albert Vaca
647f71bf98 Removed incorrect translations to release 2014-10-13 21:56:21 -07:00
Albert Vaca
343b2ed5e8 Increased version number to release 2014-10-13 21:56:07 -07:00
l10n daemon script
eb7351a803 SVN_SILENT made messages (after extraction) 2014-10-14 02:00:37 +00:00
l10n daemon script
7e7d6c4d82 SVN_SILENT made messages (after extraction) 2014-10-13 01:59:04 +00:00
l10n daemon script
59d01763c7 SVN_SILENT made messages (after extraction) 2014-10-12 01:56:58 +00:00
Albert Vaca
5b2756b7f8 Added support for devices with more than one external storage
BUG: 336043
2014-10-10 15:49:27 -07:00
Albert Vaca
5912611aab Fixed onPluginsChanged not being always called after calling addPlugin 2014-10-10 12:38:11 -07:00
l10n daemon script
54d24848e5 SVN_SILENT made messages (after extraction) 2014-10-10 02:11:27 +00:00
l10n daemon script
638c9df328 SVN_SILENT made messages (after extraction) 2014-10-07 01:58:52 +00:00
Albert Vaca
9943c36877 Minor layout changes 2014-10-04 21:13:12 -07:00
Albert Vaca
03bcfecb88 Fixed previous commit to work on Android API < 19 2014-10-04 21:07:57 -07:00
Albert Vaca
1b4ade0ae1 MPRIS controls now adapt to tablet resolutions
BUG: 339684
2014-10-04 20:58:14 -07:00
l10n daemon script
b9890210ad SVN_SILENT made messages (after extraction) 2014-10-05 01:58:53 +00:00
l10n daemon script
1509bfaf6d SVN_SILENT made messages (after extraction) 2014-10-04 01:53:54 +00:00
Albert Vaca
a22ffd611a Simplified device activity layout to use a single ListView
This fixes some layout problems that prevented us of having the height of
the lists adapted automatically to the content and had to use fixed height.
2014-09-29 19:03:31 -07:00
Albert Vaca
adb88560b5 Minor changes 2014-09-29 19:03:31 -07:00
Albert Vaca
03ede77bd1 Highlight device when selected from the main activity list.
I had to include the style files, made with http://android-holo-colors.com
because, from kitkat on, the background color of highlighted elements is
gray instead of blue, but that's not reflected in the resources included
in the support library v7 appcompat jar, that are still blue.
2014-09-29 19:03:31 -07:00
Albert Vaca
6afbe93c2d Made error list header not selectable 2014-09-29 19:03:31 -07:00
l10n daemon script
dd4421dce2 SVN_SILENT made messages (after extraction) 2014-09-30 01:55:45 +00:00
Albert Vaca
262f811bba Implemented custom ping messages. 2014-09-26 20:45:28 -07:00
Albert Vaca
0b52cbe36f Fixed bug where plugin errors were not shown if all enabled plugins fail. 2014-09-26 20:45:28 -07:00
Albert Vaca
8542aaf4fa Fixed bug were list of enabled plugins didn't refresh itself.
Removed PreferenceListAdapter
2014-09-26 20:45:27 -07:00
l10n daemon script
c9d11f650c SVN_SILENT made messages (after extraction) 2014-09-27 02:00:12 +00:00
l10n daemon script
6c5ed3094b SVN_SILENT made messages (after extraction) 2014-09-26 02:01:30 +00:00
l10n daemon script
5aaec15e79 SVN_SILENT made messages (after extraction) 2014-09-24 01:50:30 +00:00
Albert Vaca
b0a632fe10 Fixed error list always empty the second time it is loaded. 2014-09-23 16:42:26 +02:00
Albert Vaca
4d1464484e Commented priority sort of links because we don't use it and causes crashes 2014-09-23 16:41:57 +02:00
Albert Vaca
d6cc84ccfb Fixed crash 2014-09-23 16:40:54 +02:00
Albert Vaca
624cee5d87 Workaround for bug where plugins are not loaded for a device 2014-09-23 16:40:34 +02:00
Albert Vaca
a8664d01ec Updated project files 2014-09-23 16:39:28 +02:00
l10n daemon script
bd68f71af6 SVN_SILENT made messages (after extraction) 2014-09-22 01:59:00 +00:00
Albert Vaca
8ec828d6e4 Reload plugins list when user gives permission to access notifications.
This way the error message disappears without having to reload the app.
2014-09-20 10:52:03 +02:00
Albert Vaca
a44d48d527 Separated arrays.xml and strings.xml were causing confusion to the script
that extracts the translations, because it expects a single output file.
2014-09-20 10:24:01 +02:00
Albert Vaca
804642c5fc Fixed bug causing some plugin settings having checkbox when they shouldn't
and viceversa.
2014-09-17 16:06:23 +02:00
Albert Vaca
8e0daa69cc Added preference to disable incoming file notification sound. 2014-09-17 16:05:54 +02:00
Albert Vaca
400b35216d Minor changes 2014-09-17 16:05:16 +02:00
Albert Vaca
4a5545529a Those static will never work
Because class statics are called the first time the class is instantiated.
2014-09-17 10:36:45 +02:00
Ronny Yabar Aizcorbe
b2fa8ab506 Plugin-specific settings
Added support for specific plugin settings.
Added interval time preference to fast forward or rewind a multimedia file
instead of hardcording the time.

REVIEW: 120005
2014-09-16 15:45:58 +02:00
l10n daemon script
b9a0b3d2f0 SVN_SILENT made messages (after extraction) 2014-09-11 01:59:39 +00:00
l10n daemon script
e8c6784ce0 SVN_SILENT made messages (after extraction) 2014-09-03 01:58:03 +00:00
l10n daemon script
e3b8bb5ffc SVN_SILENT made messages (after extraction) 2014-08-28 02:01:02 +00:00
l10n daemon script
103bc69347 SVN_SILENT made messages (after extraction) 2014-08-25 02:00:05 +00:00
l10n daemon script
2b45c82a2e SVN_SILENT made messages (after extraction) 2014-08-22 02:05:13 +00:00
l10n daemon script
0d3232a5a1 SVN_SILENT made messages (after extraction) 2014-08-20 01:58:04 +00:00
l10n daemon script
ed5ddc37c8 SVN_SILENT made messages (after extraction) 2014-08-18 02:03:00 +00:00
l10n daemon script
48bc56f52a SVN_SILENT made messages (after extraction) 2014-08-17 02:00:27 +00:00
l10n daemon script
5de10b05e7 SVN_SILENT made messages (after extraction) 2014-08-16 01:56:50 +00:00
Albert Vaca
1fe2590ec8 Changes to the detection of keyboard input.
Now it detects more special keys.
It does not detect modifiers anymore.
Moved to a view that keeps the focus and prevents focusing the back button.
Changed bitmasks for a hashmap to make it more readable with lots of keys.
Separated sendSpecialKey from sendKey for non-representable keys.

CCMAIL: saiarcot895@gmail.com
2014-08-14 21:50:19 +02:00
Saikrishna Arcot
d02684c714 Add support for using the keyboard.
This patch adds a menu entry to display the keyboard in the mousepad plugin
and allow the user to send keystrokes. Dead keys are not yet supported, and
behavior is unknown if entered.

REVIEW: 119255
2014-08-14 21:50:19 +02:00
Job Noorman
80ed8a58d5 Properly restore the selected MPRIS player after a plugin reconnect.
Whenever the link with a device goes down (the easiest way to test this is to
lock the phone's screen), the connection with the MPRIS plugin is
re-established when the link goes up again. This patch makes sure that the
currently selected player (the one stored on the MprisPlugin instance) is also
selected in the MprisActivity. Currently, the first player in the list is
always selected.

REVIEW: 119692
2014-08-13 22:52:52 +02:00
l10n daemon script
962501fe38 SVN_SILENT made messages (after extraction) 2014-08-07 01:48:38 +00:00
l10n daemon script
60c1e67e66 SVN_SILENT made messages (after extraction) 2014-07-25 02:14:34 +00:00
l10n daemon script
318b82941f SVN_SILENT made messages (after extraction) 2014-07-16 02:16:36 +00:00
Albert Vaca
acdf8d467e This has to be public for some reason 2014-07-12 20:03:08 +02:00
Albert Vaca
ceee1ee1f6 Increased version number to release 2014-07-12 20:03:08 +02:00
Albert Vaca
071f71cb9c Silly changes proposed by lint 2014-07-12 20:03:08 +02:00
Albert Vaca
4adf2cfbbd Updated project to new Android Build Tools. 2014-07-12 20:03:08 +02:00
l10n daemon script
de4fa31b2a SVN_SILENT made messages (after extraction) 2014-07-07 02:01:50 +00:00
l10n daemon script
4deba4ea4f SVN_SILENT made messages (after extraction) 2014-07-05 01:59:05 +00:00
l10n daemon script
07a8b107eb SVN_SILENT made messages (after extraction) 2014-07-03 01:51:49 +00:00
Ahmed I. Khalil
3b750c78ab Added Triple and Double finger gestures.
For right and middle clicking.

REVIEW: 119072
2014-07-02 17:19:44 +02:00
l10n daemon script
47790a710a SVN_SILENT made messages (after extraction) 2014-07-02 02:04:42 +00:00
l10n daemon script
92451df32f SVN_SILENT made messages (after extraction) 2014-07-01 02:06:59 +00:00
l10n daemon script
55eada9dfc SVN_SILENT made messages (after extraction) 2014-06-30 02:05:57 +00:00
Albert Vaca
0ed73f6729 Ooops, added missing file that was untracked! 2014-06-29 19:44:30 +02:00
Albert Vaca
c8e24bf07d Increased version number to release 2014-06-29 18:52:18 +02:00
Albert Vaca
f016a06c32 Notify the system when we receive a file, so it gets added to the gallery, etc. 2014-06-29 18:50:50 +02:00
Ahmed I. Khalil
23463afc33 Added Right and Middle Clicks as Menu Items.
I've made them as "never" to be shown on the ActionBar,
until hopefully we could get icons for them.

REVIEW: 119016
2014-06-29 18:37:28 +02:00
Albert Vaca
45fd3f88e8 Added methods for right and middle click, not yet used 2014-06-29 17:58:33 +02:00
Albert Vaca
b54e2ea36e Made scrolling less sensitive
CCMAIL: ahmedibrahimkhali@gmail.com
2014-06-29 17:58:21 +02:00
Albert Vaca
3043ca5d05 Increased the version number to release 2014-06-29 17:17:43 +02:00
Albert Vaca
47368a27fd Trying to fix a "jumpy mouse" issue when scrolling
CCMAIL: ahmedibrahimkhali@gmail.com
2014-06-29 17:17:22 +02:00
Albert Vaca
046a1cb676 Implemented two finger scrolling on Android, by handling the onScroll method
that it is called from the GestureDetector.

REVIEW: 119007
2014-06-29 17:17:22 +02:00
Albert Vaca
43c6742e21 Device names could contain characters not allowed for a dir name, fixed. 2014-06-29 17:17:22 +02:00
Albert Vaca
5b2f863e0e Added padding to text 2014-06-29 17:17:22 +02:00
Albert Vaca
a12e64ca59 Renamed mousepad -> touchpad 2014-06-29 17:17:22 +02:00
Albert Vaca
e99ba38eac Removed unnecesary import 2014-06-29 17:17:22 +02:00
Albert Vaca
0730c52741 Started implementing receiving shared files 2014-06-29 17:17:22 +02:00
l10n daemon script
093b722f00 SVN_SILENT made messages (after extraction) 2014-06-29 01:58:07 +00:00
Albert Vaca
162fc8b8dd Increased version number to release 2014-06-27 17:33:03 +02:00
Antoni Bella Pérez
c648185ffa Added Sony Xperia Z2 human readable name 2014-06-27 17:29:13 +02:00
Albert Vaca
af915b5756 I like the Nexus phones being called only "Nexus" :P 2014-06-27 17:28:50 +02:00
Albert Vaca
dc60968a35 Merge branch 'feature/mousepad' 2014-06-27 17:22:52 +02:00
Albert Vaca
c122a0d2f3 Removed two error dialogs that were not used 2014-06-27 15:55:22 +02:00
Ahmed I. Khalil
ce597f2e51 Android Implementation of MousePad feature
CCMAIL: ahmedibrahimkhali@gmail.com
2014-06-27 15:48:11 +02:00
Albert Vaca
7ae687ae11 Explicitly capturing plugins exceptions to avoid them being lost magically 2014-06-27 14:47:10 +02:00
Albert Vaca
53bb376990 More projet updates 2014-06-27 14:47:10 +02:00
Albert Vaca
cc10538dcb Added more device names 2014-06-27 14:47:10 +02:00
Albert Vaca
9c7aaf2ed9 Merge https://github.com/R4md4c/kdeconnect-android into feature/mousepad 2014-06-27 14:45:05 +02:00
l10n daemon script
0283b0112e SVN_SILENT made messages (after extraction) 2014-06-24 01:52:25 +00:00
l10n daemon script
906fc35abb SVN_SILENT made messages (after extraction) 2014-06-21 01:56:44 +00:00
l10n daemon script
8bc3e69ce6 SVN_SILENT made messages (after extraction) 2014-06-20 02:08:24 +00:00
l10n daemon script
020d2bca2a SVN_SILENT made messages (after extraction) 2014-06-19 01:48:31 +00:00
Albert Vaca
50682935e0 Explicitly capturing plugins exceptions to avoid them being lost magically 2014-06-18 22:53:52 +02:00
Albert Vaca
1da74a6c68 More projet updates 2014-06-18 22:53:11 +02:00
Aleix Pol
aa33f4cd08 Submit .reviewboardrc file
Simplifies reviewboard patches submision
2014-06-18 02:43:41 +02:00
l10n daemon script
0c142928f9 SVN_SILENT made messages (after extraction) 2014-06-16 01:57:09 +00:00
Albert Vaca
24aefebb0e Added more device names 2014-06-14 19:08:25 +02:00
l10n daemon script
7a47bd0b9c SVN_SILENT made messages (after extraction) 2014-06-14 01:52:05 +00:00
l10n daemon script
cbb3787a15 SVN_SILENT made messages (after extraction) 2014-06-12 01:48:42 +00:00
l10n daemon script
61048e5df4 SVN_SILENT made messages (after extraction) 2014-06-11 01:54:17 +00:00
Albert Vaca
8644f7ee15 Paired unreachable devices show an "unpair" button instead of an empty view 2014-06-09 13:25:50 +02:00
Albert Vaca
77f9a30bd3 Fixed bug causing plugins to load for unreachable devices 2014-06-09 13:25:50 +02:00
Albert Vaca
1dbc93ec73 Inform other devices we don't trust them when they talk to us 2014-06-09 13:25:50 +02:00
Albert Vaca
64c5362b1c Updated android build tools 2014-06-09 13:25:50 +02:00
l10n daemon script
0c4ae62061 SVN_SILENT made messages (after extraction) 2014-06-06 02:02:50 +00:00
l10n daemon script
727c845624 SVN_SILENT made messages (after extraction) 2014-05-31 01:52:48 +00:00
l10n daemon script
577d9a5dc8 SVN_SILENT made messages (after extraction) 2014-05-18 01:54:52 +00:00
Albert Vaca
0311163829 Updated version number to release 2014-05-14 01:23:34 +02:00
Albert Vaca
76fd6d1e08 Better exception handling in sendMessage 2014-05-14 01:21:28 +02:00
l10n daemon script
a79e8f83ce SVN_SILENT made messages (after extraction) 2014-05-05 01:59:18 +00:00
Albert Vaca
3f6ec6a2d7 Broadcast device name after changing it 2014-04-12 20:50:19 +02:00
Albert Vaca
726f623eea Project settings: changed from release to debug 2014-04-12 20:44:39 +02:00
l10n daemon script
0db8f7c1d4 SVN_SILENT made messages (after extraction) 2014-03-29 01:59:41 +00:00
Albert Vaca
7a289fbe38 Fixed silly stuff reported by the lint analyzer 2014-03-29 01:47:15 +01:00
Albert Vaca
41bb2ed916 Increased version number to release 2014-03-27 23:19:58 +01:00
Sven Nobis
4598f080a2 Read notifications ticker text from extras Bundle.
Many Apps don't set a useful ticker text. On Android version KitKat or
newer, the title and text of a notification is stored in the extras Bundle.
This patch make use of it, to provide a better ticker text.
2014-03-27 23:18:56 +01:00
l10n daemon script
ecf22e889b SVN_SILENT made messages (after extraction) 2014-03-26 01:55:42 +00:00
l10n daemon script
8598cf5f2e SVN_SILENT made messages (after extraction) 2014-03-24 01:49:14 +00:00
l10n daemon script
1def9cc9ce SVN_SILENT made messages (after extraction) 2014-03-20 01:52:22 +00:00
l10n daemon script
0772a37f4e SVN_SILENT made messages (after extraction) 2014-03-19 04:23:04 +00:00
l10n daemon script
16edb35a0e SVN_SILENT made messages (after extraction) 2014-03-18 01:46:41 +00:00
Albert Vaca
8f9bad7a0f Increased version number to release 2014-03-15 17:47:50 +01:00
Mariusz Fik
4fd96062f6 Fix crash when user tries to unload plugin, which is not supported by platform. 2014-03-15 17:32:16 +01:00
l10n daemon script
a0a9eca060 SVN_SILENT made messages (after extraction) 2014-03-10 01:56:44 +00:00
Albert Vaca
5999ef7c8e Increased version number to release 2014-03-08 00:21:17 +01:00
Albert Vaca
9542597424 Updated project to latest version of Android build tools 2014-03-08 00:21:06 +01:00
Mariusz Fik
11e5563d9a Use hardware buttons to control multimedia player volume.
REVIEW: 116652
2014-03-07 23:27:01 +01:00
Albert Vaca
f31afdb6d0 Increased version number to release 2014-03-07 23:25:42 +01:00
l10n daemon script
27ec7c5bfb SVN_SILENT made messages (after extraction) 2014-03-03 01:48:29 +00:00
l10n daemon script
49360816a3 SVN_SILENT made messages (after extraction) 2014-02-24 01:51:22 +00:00
Albert Vaca
dd364bd562 New icon by Malcer <malcer@gmx.com> 2014-02-19 21:20:15 +01:00
Albert Vaca
809f37a541 More project changes 2014-02-19 17:03:47 +01:00
Albert Vaca
36c3df7a07 Version should be 0.5 instead of 0.6! 2014-02-19 16:33:08 +01:00
l10n daemon script
34aec7120e SVN_SILENT made messages (after extraction) 2014-02-19 02:37:41 +00:00
l10n daemon script
0a494b002d SVN_SILENT made messages (after extraction) 2014-02-18 01:46:47 +00:00
l10n daemon script
7298247dfc SVN_SILENT made messages (after extraction) 2014-02-17 02:14:15 +00:00
l10n daemon script
72a97d9e1c SVN_SILENT made messages (after extraction) 2014-02-16 03:52:01 +00:00
l10n daemon script
7cc80baf16 SVN_SILENT made messages (after extraction) 2014-02-15 01:46:20 +00:00
Albert Vaca
0600b1ee2e Oops, duplicate library 2014-02-14 20:11:22 +01:00
Albert Vaca
2f0059938d Increased version number to tag and release 2014-02-14 17:08:30 +01:00
Albert Vaca
a023316609 Renamed sftp plugin to "filesystem browser" 2014-02-14 17:08:30 +01:00
Albert Vaca
d94ed56c4e oops 2014-02-14 17:08:30 +01:00
Samoilenko Yuri
15a11cce02 Publick key auth for sftp plugin 2014-02-14 17:08:07 +01:00
Albert Vaca
36530b9580 Prefer IPv4 over IPv6 2014-02-14 17:07:42 +01:00
Samoilenko Yuri
f54acd7308 fix 2014-02-14 17:07:42 +01:00
Samoilenko Yuri
cfe9ccdc31 WORKAROUND new gradle android plugin bug 2014-02-14 17:07:42 +01:00
Samoilenko Yuri
52c7581f42 moved to updated gradle and Android Studio 2014-02-14 17:07:12 +01:00
Albert Vaca
a57dc71ad1 Libs are now included from Maven repo 2014-02-14 17:05:31 +01:00
Samoilenko Yuri
77d06cfe77 sftp implementations splits from sftpplugin 2014-02-14 17:04:36 +01:00
Samoilenko Yuri
13a7c1e5fe first draft SFTP implementation 2014-02-14 17:04:30 +01:00
l10n daemon script
5ccf215a54 SVN_SILENT made messages (after extraction) 2014-02-06 01:38:48 +00:00
l10n daemon script
fddf3c64b5 SVN_SILENT made messages (after extraction) 2014-02-01 01:41:08 +00:00
l10n daemon script
fb02b9bdf1 SVN_SILENT made messages (after extraction) 2014-01-29 01:40:11 +00:00
l10n daemon script
8453156d16 SVN_SILENT made messages (after extraction) 2014-01-23 01:37:44 +00:00
Albert Vaca
9bbe2908ed We will only sync actual notifications from now on
BUG: 325668
2014-01-10 19:29:50 +01:00
Albert Vaca
fb843f8789 Notifications with FLAG_FOREGROUND_SERVICE are not shown anymore
Actually, they are not 'notifications'.
2014-01-10 18:00:26 +01:00
Albert Vaca
c85619dfd2 Phone number shown next to contact name for calls/sms
BUG: 328197
2014-01-10 17:59:50 +01:00
Albert Vaca
de9f78adf3 Gradle upgrade to make Android Studio 4.2 happy 2014-01-10 17:07:00 +01:00
Samoilenko Yuri
9021ab9454 Partial impl of clipboard sync in early Android
Syncronization works only in one direction - incoming
2014-01-08 02:17:37 +04:00
Samoilenko Yuri
10210b3972 Fixed Ping notification on old phones
On old phones(LG P698) notification does not shown ultil all
fields are filles correctly: setContentIntent.
Added pendingIntent to notification as describved into official documentation for Notifications, to
fit support library requirements.
2014-01-08 01:20:24 +04:00
l10n daemon script
f83b9cbe0c SVN_SILENT made messages (after extraction) 2013-12-29 01:40:33 +00:00
l10n daemon script
7d821e7c88 SVN_SILENT made messages (after extraction) 2013-12-10 01:38:14 +00:00
l10n daemon script
02070343fe SVN_SILENT made messages (after extraction) 2013-11-28 01:42:19 +00:00
l10n daemon script
416a000dd3 SVN_SILENT made messages (after extraction) 2013-11-25 01:41:50 +00:00
Albert Vaca
a15cad9ec5 Increased version number to release 2013-11-24 17:49:15 +01:00
l10n daemon script
e98100f5f0 SVN_SILENT made messages (after extraction) 2013-11-24 01:37:28 +00:00
Albert Vaca
d19e7d2052 Missing permission (how could this work before?) 2013-11-23 01:49:34 +01:00
Albert Vaca
4e02c674f8 Still trying to fix the concurrency exception
I hope this doesn't cause infinite recursion.
2013-11-23 01:49:34 +01:00
Albert Vaca
6aa49757fc Fixed bug retrieving incorrect file sizes for file transfers
For some reason querying the content provider returns a different size than
using File.length()
2013-11-23 01:49:33 +01:00
Albert Vaca
3c10312d15 More Android Studio nonsensical project changes 2013-11-23 01:49:33 +01:00
l10n daemon script
26e3363b30 SVN_SILENT made messages (after extraction) 2013-11-19 01:37:14 +00:00
l10n daemon script
4033233ec1 SVN_SILENT made messages (after extraction) 2013-11-18 01:45:52 +00:00
Albert Vaca
34e53576e1 Trying to fix a concurrency exception 2013-11-15 15:31:38 +01:00
Albert Vaca
a15d76c588 Android Studio keeps changing the project files... 2013-11-14 18:41:35 +01:00
Albert Vaca
1acea73383 The battery percentage for low battery level is now signaled by the device
BatteryPlugin is now subscribed to the BATTERY_LOW event

REVIEW: 113838
2013-11-14 18:24:44 +01:00
Albert Vaca
6c8fdb0be7 Increased version number to release 2013-11-14 18:20:57 +01:00
l10n daemon script
749170a29c SVN_SILENT made messages (after extraction) 2013-11-14 01:36:45 +00:00
l10n daemon script
81b08cf89f SVN_SILENT made messages (after extraction) 2013-11-11 01:40:35 +00:00
Albert Vaca
786ea7658f Fixed bugs in NotificationsPlugin
Already existing notifications were not retrieved
Notifications without tickerText were crashing the plugin
2013-11-06 21:15:49 +01:00
Albert Vaca
996516ec88 Fixed a bug while pairing
Timeout was being fired after the pairing was done
Added lots of Log.e for debugging, now commented
2013-11-06 21:13:37 +01:00
Albert Vaca
a36e4a0c88 Added deviceType to the identity packages
This will tell if we are a phone, tablet, laptop or desktop
2013-11-06 19:06:18 +01:00
l10n daemon script
e08de81c73 SVN_SILENT made messages (after extraction) 2013-11-05 01:33:50 +00:00
Albert Vaca
30d2665b12 Upgraded project to new Android SDK
Now using gradle magic imports instead of jar files for libraries
2013-11-02 17:46:20 +01:00
l10n daemon script
c14946e9e4 SVN_SILENT made messages (after extraction) 2013-11-02 01:35:34 +00:00
l10n daemon script
1aab14fd50 SVN_SILENT made messages (after extraction) 2013-10-31 01:37:52 +00:00
l10n daemon script
549fc01c1d SVN_SILENT made messages (after extraction) 2013-10-30 01:42:44 +00:00
Albert Vaca
d59de8a0b6 Increased version to release 2013-10-30 01:46:00 +01:00
Mauro Panzeri
8823277e74 Follow the android guidelines for icons/drawables and their names.
Guidelines: http://goo.gl/E70Ez

REVIEW: 113200
2013-10-30 01:45:27 +01:00
Albert Vaca
30cf27e835 NetworkPackage.encrypt now returns a new package instead of changing itself
This was causing problems with plugins that keep a reference to the
packages they have already sent, like the telephony plugin, because the
package became encrypted (and thus inaccessible) after sending it.

BUG: 326275
2013-10-30 01:37:55 +01:00
Mauro Panzeri
9dbe1ec9cf Added a settings activity to change the publicly visible device name
When changed the new name will be used instead of the one from
HumanDeviceNames

REVIEW: 113204
BUG: 325061
2013-10-30 01:37:47 +01:00
Albert Vaca
0595662efc Spotify doesn't support seeking, disable mpris seek buttons for it 2013-10-30 01:31:21 +01:00
Albert Vaca
6609ae665c Fixed a crash trying to disconnect not-yet-active sessions. 2013-10-30 01:31:20 +01:00
Maksim Krylosov
2f26fa5188 Added rewind and fast-forward buttons to MPRIS controls 2013-10-30 01:31:20 +01:00
Albert Vaca
6471bafdd9 Fixed important bug trying to load device settings before deviceId was set
(Also improved code style and fixed minor TODOs)
2013-10-30 01:31:20 +01:00
Albert Vaca
0620810e4b Upgraded to build tools 18.1.1 and gradle 1.8 2013-10-30 01:31:20 +01:00
Albert Vaca
db9209765d Android Studio is getting confused if project name != directory name 2013-10-29 17:47:07 +01:00
Mauro Panzeri
e459d792d0 "Share to" now retrieves filename for file:// uris too
Querying the ContentProvider only works for content://... uris but when you
share a file from a file-manager, the uri you get has the form file://... and
ContentProvider returns a null cursor.

BUG: 325684
REVIEW: 113202
2013-10-29 17:47:07 +01:00
Albert Vaca
31fcc3e184 Project refactor because Android Studio was not able to open it
For some reason it was not detecting the directory as an Android project
Android Build Tools version increased from 18.0.1 to 18.1
2013-10-29 17:47:07 +01:00
l10n daemon script
544b5e8c87 SVN_SILENT made messages (after extraction) 2013-10-25 01:35:28 +00:00
l10n daemon script
7819ae1ca2 SVN_SILENT made messages (after extraction) 2013-10-18 01:44:45 +00:00
l10n daemon script
98885d6c35 SVN_SILENT made messages (after extraction) 2013-10-17 01:34:48 +00:00
l10n daemon script
485e646f6f SVN_SILENT made messages (after extraction) 2013-10-14 01:51:48 +00:00
l10n daemon script
dfece0a414 SVN_SILENT made messages (after extraction) 2013-10-11 01:53:05 +00:00
l10n daemon script
bbaf40165c SVN_SILENT made messages (after extraction) 2013-10-07 01:47:28 +00:00
Albert Vaca
b221fa04bf Increased version number for release 2013-10-05 17:26:51 +02:00
Albert Vaca
07bf1e9ebc Made sendPackage sync, so mutex hack in Device is no longer needed 2013-10-05 17:26:51 +02:00
Albert Vaca
a07c9a9fb7 Fixed warnings about cursors not closed 2013-10-05 17:26:51 +02:00
l10n daemon script
40a9171985 SVN_SILENT made messages (after extraction) 2013-10-04 01:52:34 +00:00
Albert Vaca
69197fd657 Increased version for release. 2013-10-03 15:52:10 +02:00
Albert Vaca
55e3861c5c Fixed a crash when pressing back from remote controls in action bar
Device activity isn't receiving the device id in that case.
2013-10-03 15:52:10 +02:00
Albert Vaca
5d00e6e168 Added a mutex to avoid files being sent all at the same time
It's a bit hackish but works.
2013-10-03 15:52:09 +02:00
l10n daemon script
967635a2f4 SVN_SILENT made messages (after extraction) 2013-10-03 01:46:02 +00:00
Albert Astals Cid
58b31fa032 Transition to the StaticMessages.sh thing
Let's see what next scripty run says
CCMAIL: albertvaka@gmail.com
2013-10-01 21:52:09 +02:00
Albert Vaca
f0d06cfcc4 Added license file 2013-10-01 14:35:30 +02:00
Albert Vaca
0fe3b6cd1e Increased version number to release on Google Play 2013-10-01 03:34:08 +02:00
Albert Vaca
f8f58ef2a2 Merge branch 'filetransfer' 2013-10-01 03:29:51 +02:00
Albert Vaca
d66f8442fa Commented raw json debug output 2013-10-01 03:28:12 +02:00
Albert Vaca
4b3af91c71 Commented app icon sending code of notifications plugin
Because it was not used from desktop
2013-10-01 03:27:48 +02:00
Albert Vaca
87174cfb28 Renamed kdeconnect.filetransfer to kdeconnect.share 2013-10-01 03:25:18 +02:00
Albert Vaca
3517035605 Store device's protocol version and show a warning if it doesn't match 2013-10-01 03:24:42 +02:00
Albert Vaca
37c2a0e112 Added multi-file transfer and query for filename and file size 2013-09-27 02:58:16 +02:00
Albert Vaca
754123b9c5 Fixed bugs with file transfers
Finding open ports was not working (socked became closed after first try)
AsyncTask on Device's sendPackage was blocking execution when stuck sending
2013-09-27 00:07:14 +02:00
Albert Vaca
fa11204365 Added Messages.sh 2013-09-20 19:05:49 +02:00
Albert Vaca
7cd5b905be Moved sharetoreceiver
Removed buggish cursor code, causing null pointer exception
2013-09-20 19:05:04 +02:00
Albert Vaca
cda2f573bf Merge branch 'master' into filetransfer
Conflicts:
	KdeConnect/src/main/AndroidManifest.xml
2013-09-20 17:27:59 +02:00
Albert Vaca
50cb2b9f7f Implemented ShareToReceiver to send files 2013-09-20 16:12:24 +02:00
Albert Vaca
513a2b32f4 Fixed file transfer (both lan and loopback)
Added file size to protocol (optional)
Increased protocol version to 5
2013-09-20 16:12:24 +02:00
Albert Vaca
1757b2e650 Share menu now displays "KDE Connect" instead of "Share to" 2013-09-20 16:12:24 +02:00
Albert Vaca
091836646a Added a simple kind of item (only a title) for the generic item list 2013-09-20 16:12:24 +02:00
Albert Vaca
0d8f84037b Added a send to activity (untested at all) 2013-09-20 16:12:24 +02:00
Albert Vaca
aabd06f5cb Notifications plugin now uses payloads to send app icons (untested) 2013-09-20 16:12:23 +02:00
Albert Vaca
6dbe7bac91 Implemented payload transfer in LanLink (untested)
Some silly fixes to NetworkPackage added too
2013-09-20 16:12:23 +02:00
Albert Vaca
593cf8cac0 Added missing getter and setter in NetworkPackage 2013-09-20 16:12:23 +02:00
Albert Vaca
46ad74f539 Payload transfer in loopback link (not tested) 2013-09-20 16:12:23 +02:00
Albert Vaca
66766e8ab0 Added payload to NetworkPackage
Matching KDED's implementation
2013-09-20 16:12:23 +02:00
Albert Vaca
34fe3ac272 Refactor to move backend to its own package
Matching kde project structure
2013-09-20 16:12:23 +02:00
Albert Vaca
8800c4503c Parent activities where not correctly set
BUG: 325060
2013-09-20 15:58:18 +02:00
Albert Vaca
5200ceaab5 Commented loopbacklinkprovider 2013-09-20 15:58:18 +02:00
Albert Vaca
6a9419401e Project changed 2013-09-18 18:04:20 +02:00
Albert Vaca
b1ca8757c6 Parent activities where not correctly set
BUG: 325060
2013-09-18 17:28:43 +02:00
Albert Vaca
e735e0ecf3 Moved cryptography layer down from Device to Backend
Matching KDED structure
2013-09-16 17:36:26 +02:00
Albert Vaca
63f0458096 Refactor to move backend to its own package
Matching kde project structure
2013-09-16 15:24:21 +02:00
408 changed files with 30572 additions and 4960 deletions

3
.arcconfig Normal file
View File

@@ -0,0 +1,3 @@
{
"phabricator.uri" : "https://phabricator.kde.org/project/profile/159/"
}

16
.gitignore vendored
View File

@@ -1,4 +1,14 @@
local.properties
.gradle
.idea
out
.gradle/
.idea/
out/
gen/
bin/
build/
target/
classes/
gradle
*.iml
*.keystore
.directory
GPUCache/

3
.reviewboardrc Normal file
View File

@@ -0,0 +1,3 @@
REVIEWBOARD_URL = "https://git.reviewboard.kde.org"
REPOSITORY = 'git://anongit.kde.org/kdeconnect-android'
TARGET_GROUPS = 'kdeconnect'

279
AndroidManifest.xml Normal file
View File

@@ -0,0 +1,279 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.kde.kdeconnect_tp"
android:versionCode="11006"
android:versionName="1.10">
<supports-screens
android:anyDensity="true"
android:largeScreens="true"
android:normalScreens="true"
android:smallScreens="true"
android:xlargeScreens="true" />
<uses-feature
android:name="android.hardware.telephony"
android:required="false" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.INTERNET" />
<!-- <uses-permission android:name="android.permission.BLUETOOTH" /> -->
<!-- <uses-permission android:name="android.permission.BLUETOOTH_ADMIN" /> -->
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.DOWNLOAD_WITHOUT_NOTIFICATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
<application
android:icon="@drawable/icon"
android:label="KDE Connect"
android:supportsRtl="true"
android:theme="@style/KdeConnectTheme">
<service
android:name="org.kde.kdeconnect.BackgroundService"
android:enabled="true" />
<service
android:name="org.kde.kdeconnect.Plugins.RemoteKeyboardPlugin.RemoteKeyboardService"
android:label="KDE Connect Remote Keyboard"
android:permission="android.permission.BIND_INPUT_METHOD">
<intent-filter>
<action android:name="android.view.InputMethod" />
</intent-filter>
<meta-data
android:name="android.view.im"
android:resource="@xml/remotekeyboardplugin_method" />
</service>
<activity
android:name="org.kde.kdeconnect.UserInterface.MainActivity"
android:label="KDE Connect"
android:theme="@style/KdeConnectTheme.NoActionBar">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name="org.kde.kdeconnect.UserInterface.DeviceSettingsActivity"
android:label="@string/device_menu_plugins"
android:parentActivityName="org.kde.kdeconnect.UserInterface.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.MainActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.UserInterface.CustomDevicesActivity"
android:label="@string/custom_devices_settings"
android:parentActivityName="org.kde.kdeconnect.UserInterface.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.MainActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.Plugins.SharePlugin.SendFileActivity"
android:label="KDE Connect"
android:parentActivityName="org.kde.kdeconnect.UserInterface.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.MainActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.UserInterface.PluginSettingsActivity"
android:label="@string/device_menu_plugins"
android:parentActivityName="org.kde.kdeconnect.UserInterface.DeviceSettingsActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.DeviceSettingsActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.Plugins.SharePlugin.ShareSettingsActivity"
android:label="@string/device_menu_plugins"
android:parentActivityName="org.kde.kdeconnect.UserInterface.DeviceSettingsActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.Plugins.SharePlugin.ShareSettingsActivity" />
</activity>
<receiver android:name="org.kde.kdeconnect.KdeConnectBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<data
android:host="kdeconnect"
android:path="/"
android:scheme="package" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
<intent-filter>
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
</intent-filter>
</receiver>
<activity
android:name="org.kde.kdeconnect.Plugins.FindMyPhonePlugin.FindMyPhoneActivity"
android:configChanges="orientation|screenSize"
android:excludeFromRecents="true"
android:label="@string/findmyphone_title"
android:launchMode="singleInstance" />
<!-- Plugin-related activities and services -->
<activity
android:name="org.kde.kdeconnect.Plugins.MprisPlugin.MprisActivity"
android:label="@string/remote_control"
android:launchMode="singleTop"
android:parentActivityName="org.kde.kdeconnect.UserInterface.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.MainActivity" />
</activity>
<receiver android:name="org.kde.kdeconnect.Plugins.MprisPlugin.MprisMediaNotificationReceiver">
<intent-filter>
<action android:name="android.intent.action.MEDIA_BUTTON" />
</intent-filter>
</receiver>
<activity
android:name="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandActivity"
android:label="@string/remote_control"
android:parentActivityName="org.kde.kdeconnect.UserInterface.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.MainActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandWidgetDeviceSelector"
android:excludeFromRecents="true"
android:label="@string/pref_plugin_runcommand"
android:launchMode="singleTask"
android:noHistory="true"
android:screenOrientation="user"
android:theme="@style/Theme.AppCompat.Light.Dialog" />
<service
android:name="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandWidgetDataProviderService"
android:exported="false"
android:permission="android.permission.BIND_REMOTEVIEWS" />
<receiver
android:name="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandWidget"
android:label="@string/pref_plugin_runcommand">
<intent-filter>
<action android:name="android.appwidget.action.APPWIDGET_UPDATE" />
</intent-filter>
<intent-filter>
<action android:name="RUN_COMMAND_ACTION" />
</intent-filter>
<meta-data
android:name="android.appwidget.provider"
android:resource="@xml/remotecommandplugin_widget" />
</receiver>
<activity android:name="org.kde.kdeconnect.Plugins.RunCommandPlugin.RunCommandUrlActivity">
<intent-filter>
<action android:name="android.intent.action.VIEW" />
<action android:name="android.nfc.action.NDEF_DISCOVERED" />
<category android:name="android.intent.category.DEFAULT" />
<category android:name="android.intent.category.BROWSABLE" />
<data
android:host="runcommand"
android:scheme="kdeconnect" />
</intent-filter>
</activity>
<activity
android:name="org.kde.kdeconnect.Plugins.MousePadPlugin.MousePadActivity"
android:label="@string/remote_control"
android:parentActivityName="org.kde.kdeconnect.UserInterface.MainActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.MainActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.Plugins.PresenterPlugin.PresenterActivity"
android:configChanges="orientation|keyboardHidden|screenSize"
android:label="@string/pref_plugin_presenter"
android:parentActivityName="org.kde.kdeconnect.UserInterface.MainActivity"
android:windowSoftInputMode="stateHidden|adjustResize">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.MainActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.Plugins.SharePlugin.ShareActivity"
android:label="KDE Connect">
<intent-filter>
<action android:name="android.intent.action.SEND" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.SEND_MULTIPLE" />
<category android:name="android.intent.category.DEFAULT" />
<data android:mimeType="*/*" />
</intent-filter>
<meta-data
android:name="android.service.chooser.chooser_target_service"
android:value="org.kde.kdeconnect.Plugins.SharePlugin.ShareChooserTargetService" />
</activity>
<provider
android:name="android.support.v4.content.FileProvider"
android:authorities="org.kde.kdeconnect_tp.fileprovider"
android:exported="false"
android:grantUriPermissions="true">
<meta-data
android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/fileprovider_paths" />
</provider>
<service
android:name="org.kde.kdeconnect.Plugins.NotificationsPlugin.NotificationReceiver"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
<intent-filter>
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>
</service>
<service
android:name="org.kde.kdeconnect.Plugins.SharePlugin.ShareChooserTargetService"
android:permission="android.permission.BIND_CHOOSER_TARGET_SERVICE">
<intent-filter>
<action android:name="android.service.chooser.ChooserTargetService" />
</intent-filter>
</service>
<activity
android:name="org.kde.kdeconnect.Plugins.NotificationsPlugin.NotificationFilterActivity"
android:label="@string/title_activity_notification_filter"
android:parentActivityName="org.kde.kdeconnect.UserInterface.PluginSettingsActivity">
<meta-data
android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.kdeconnect.UserInterface.PluginSettingsActivity" />
</activity>
</application>
</manifest>

339
COPYING Normal file
View File

@@ -0,0 +1,339 @@
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
<one line to give the program's name and a brief idea of what it does.>
Copyright (C) <year> <name of author>
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
<signature of Ty Coon>, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.

View File

@@ -1 +0,0 @@
build/

View File

@@ -1,79 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="FacetManager">
<facet type="android" name="Android">
<configuration>
<option name="SELECTED_BUILD_VARIANT" value="Debug" />
<option name="ASSEMBLE_TASK_NAME" value="assembleDebug" />
<option name="ASSEMBLE_TEST_TASK_NAME" value="assembleTest" />
<option name="SOURCE_GEN_TASK_NAME" value="TODO" />
<option name="ALLOW_USER_CONFIGURATION" value="false" />
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
</configuration>
</facet>
<facet type="android-gradle" name="Android-Gradle">
<configuration>
<option name="GRADLE_PROJECT_PATH" value=":KdeConnect" />
</configuration>
</facet>
</component>
<component name="NewModuleRootManager" inherit-compiler-output="false">
<output url="file://$MODULE_DIR$/build/classes/debug" />
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/build/source/r/debug" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/debug" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/debug" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/debug" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/debug" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/build/source/r/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/aidl/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/rs/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/source/buildConfig/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/build/res/rs/test" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/assets" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/res" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/debug/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/aidl" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/assets" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/jni" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/rs" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/res" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/main/resources" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/aidl" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/assets" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/java" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/jni" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/rs" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/res" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/instrumentTest/resources" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build/apk" />
<excludeFolder url="file://$MODULE_DIR$/build/assets" />
<excludeFolder url="file://$MODULE_DIR$/build/bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/classes" />
<excludeFolder url="file://$MODULE_DIR$/build/dependency-cache" />
<excludeFolder url="file://$MODULE_DIR$/build/exploded-bundles" />
<excludeFolder url="file://$MODULE_DIR$/build/incremental" />
<excludeFolder url="file://$MODULE_DIR$/build/libs" />
<excludeFolder url="file://$MODULE_DIR$/build/manifests" />
<excludeFolder url="file://$MODULE_DIR$/build/symbols" />
<excludeFolder url="file://$MODULE_DIR$/build/tmp" />
</content>
<orderEntry type="jdk" jdkName="Android 4.3 Platform" jdkType="Android SDK" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" exported="" name="android-support-v4" level="project" />
<orderEntry type="library" exported="" name="mina-core-2.0.7" level="project" />
<orderEntry type="library" exported="" name="slf4j-api-1.6.6" level="project" />
<orderEntry type="library" exported="" name="support-v4-18.0.0" level="project" />
<orderEntry type="library" exported="" name="ComAndroidSupportAppcompatV71800.aar" level="project" />
</component>
</module>

View File

@@ -1,26 +0,0 @@
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:0.5.+'
}
}
apply plugin: 'android'
dependencies {
compile "com.android.support:appcompat-v7:18.0.+"
compile files('libs/android-support-v4.jar')
compile files('libs/mina-core-2.0.7.jar')
compile files('libs/slf4j-api-1.6.6.jar')
}
android {
compileSdkVersion 18
buildToolsVersion "18.0.1"
defaultConfig {
minSdkVersion 9
targetSdkVersion 18
}
}

Binary file not shown.

Binary file not shown.

View File

@@ -1,129 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.kde.kdeconnect_tp"
android:versionCode="4"
android:versionName="0.2.1">
<uses-sdk android:minSdkVersion="9"
android:targetSdkVersion="18" />
<supports-screens
android:smallScreens="true"
android:normalScreens="true"
android:largeScreens="true"
android:xlargeScreens="true"
android:anyDensity="true"
/>
<uses-feature android:name="android.hardware.telephony" android:required="false" />
<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.INTERNET"/>
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE"/>
<uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE"/>
<uses-permission android:name="android.permission.READ_PHONE_STATE" android:required="false"/>
<uses-permission android:name="android.permission.BATTERY_STATS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" android:required="false"/>
<uses-permission android:name="android.permission.READ_CONTACTS" />
<application
android:allowBackup="true"
android:icon="@drawable/icon"
android:label="KDE Connect"
>
<activity
android:theme="@style/Theme.AppCompat"
android:name="org.kde.kdeconnect.UserInterface.MainActivity"
android:label="KDE Connect" >
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:theme="@style/Theme.AppCompat"
android:name="org.kde.kdeconnect.UserInterface.DeviceActivity"
android:label="@string/device"
android:parentActivityName="org.kde.connect.UserInterface.MainActivity"
>
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.connect.UserInterface.MainActivity" />
</activity>
<activity
android:theme="@style/Theme.AppCompat"
android:name="org.kde.kdeconnect.UserInterface.PairActivity"
android:label="@string/pair_device"
android:parentActivityName="org.kde.connect.UserInterface.MainActivity"
>
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value="org.kde.connect.UserInterface.MainActivity" />
</activity>
<activity
android:theme="@style/Theme.AppCompat"
android:name="org.kde.kdeconnect.Plugins.MprisPlugin.MprisActivity"
android:label="@string/remote_control"
>
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value=".DeviceActivity" />
</activity>
<activity
android:name="org.kde.kdeconnect.UserInterface.SettingsActivity"
android:label="@string/settings"
>
<meta-data android:name="android.support.PARENT_ACTIVITY"
android:value=".DeviceActivity" />
</activity>
<service
android:enabled="true"
android:name="org.kde.kdeconnect.BackgroundService">
</service>
<service android:name="org.kde.kdeconnect.Plugins.NotificationsPlugin.NotificationReceiver"
android:permission="android.permission.BIND_NOTIFICATION_LISTENER_SERVICE">
<intent-filter>
<action android:name="android.service.notification.NotificationListenerService" />
</intent-filter>
</service>
<receiver android:name="org.kde.kdeconnect.KdeConnectBroadcastReceiver">
<intent-filter>
<action android:name="android.intent.action.PACKAGE_REPLACED" />
<data android:scheme="package" android:path="org.kde.kdeconnect" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.BOOT_COMPLETED" />
</intent-filter>
<intent-filter>
<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
</intent-filter>
<intent-filter>
<action android:name="android.net.wifi.WIFI_STATE_CHANGED" />
</intent-filter>
<!--<intent-filter>
<action android:name="android.provider.Telephony.SMS_RECEIVED" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.PHONE_STATE" />
</intent-filter>
<intent-filter>
<action android:name="android.intent.action.BATTERY_CHANGED" />
</intent-filter>-->
</receiver>
</application>
</manifest>

View File

@@ -1,296 +0,0 @@
package org.kde.kdeconnect;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.content.SharedPreferences;
import android.os.Binder;
import android.os.IBinder;
import android.preference.PreferenceManager;
import android.util.Base64;
import android.util.Log;
import org.kde.kdeconnect.ComputerLinks.BaseComputerLink;
import org.kde.kdeconnect.LinkProviders.BaseLinkProvider;
import org.kde.kdeconnect.LinkProviders.LanLinkProvider;
import org.kde.kdeconnect.LinkProviders.LoopbackLinkProvider;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.Set;
import java.util.concurrent.locks.Lock;
import java.util.concurrent.locks.ReentrantLock;
public class BackgroundService extends Service {
private ArrayList<BaseLinkProvider> linkProviders = new ArrayList<BaseLinkProvider>();
private HashMap<String, Device> devices = new HashMap<String, Device>();
private Device.PairingCallback devicePairingCallback = new Device.PairingCallback() {
@Override
public void incomingRequest() {
if (deviceListChangedCallback != null) deviceListChangedCallback.onDeviceListChanged();
}
@Override
public void pairingSuccessful() {
if (deviceListChangedCallback != null) deviceListChangedCallback.onDeviceListChanged();
}
@Override
public void pairingFailed(String error) {
if (deviceListChangedCallback != null) deviceListChangedCallback.onDeviceListChanged();
}
@Override
public void unpaired() {
if (deviceListChangedCallback != null) deviceListChangedCallback.onDeviceListChanged();
}
};
private void loadRememberedDevicesFromSettings() {
SharedPreferences preferences = getSharedPreferences("trusted_devices", Context.MODE_PRIVATE);
Set<String> trustedDevices = preferences.getAll().keySet();
for(String deviceId : trustedDevices) {
if (preferences.getBoolean(deviceId, false)) {
Device device = new Device(getBaseContext(), deviceId);
devices.put(deviceId,device);
device.addPairingCallback(devicePairingCallback);
}
}
}
public void registerLinkProviders() {
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
//if (settings.getBoolean("loopback_link", true)) {
// linkProviders.add(new LoopbackLinkProvider(this));
//}
if (settings.getBoolean("lan_link", true)) {
linkProviders.add(new LanLinkProvider(this));
}
}
public Device getDevice(String id) {
return devices.get(id);
}
private BaseLinkProvider.ConnectionReceiver deviceListener = new BaseLinkProvider.ConnectionReceiver() {
@Override
public void onConnectionReceived(final NetworkPackage identityPackage, final BaseComputerLink link) {
Log.i("BackgroundService", "Connection accepted!");
String deviceId = identityPackage.getString("deviceId");
Device device = devices.get(deviceId);
if (device != null) {
Log.i("BackgroundService", "addLink, known device: " + deviceId);
device.addLink(link);
} else {
Log.i("BackgroundService", "addLink,unknown device: " + deviceId);
String name = identityPackage.getString("deviceName");
device = new Device(getBaseContext(), deviceId, name, link);
devices.put(deviceId, device);
device.addPairingCallback(devicePairingCallback);
}
if (deviceListChangedCallback != null) deviceListChangedCallback.onDeviceListChanged();
}
@Override
public void onConnectionLost(BaseComputerLink link) {
Device d = devices.get(link.getDeviceId());
Log.i("onConnectionLost", "removeLink, deviceId: " + link.getDeviceId());
if (d != null) {
d.removeLink(link);
if (!d.isReachable() && !d.isPaired()) {
devices.remove(link.getDeviceId());
d.removePairingCallback(devicePairingCallback);
}
} else {
Log.e("onConnectionLost","Removing connection to unknown device, this should not happen");
}
if (deviceListChangedCallback != null) deviceListChangedCallback.onDeviceListChanged();
}
};
public HashMap<String, Device> getDevices() {
return devices;
}
public void startDiscovery() {
Log.i("BackgroundService","StartDiscovery");
for (BaseLinkProvider a : linkProviders) {
a.onStart();
}
}
public void stopDiscovery() {
Log.i("BackgroundService","StopDiscovery");
for (BaseLinkProvider a : linkProviders) {
a.onStop();
}
}
public void onNetworkChange() {
Log.i("BackgroundService","OnNetworkChange");
for (BaseLinkProvider a : linkProviders) {
a.onNetworkChange();
}
}
public void addConnectionListener(BaseLinkProvider.ConnectionReceiver cr) {
Log.i("BackgroundService","Registering connection listener");
for (BaseLinkProvider a : linkProviders) {
a.addConnectionReceiver(cr);
}
}
public void removeConnectionListener(BaseLinkProvider.ConnectionReceiver cr) {
for (BaseLinkProvider a : linkProviders) {
a.removeConnectionReceiver(cr);
}
}
public interface DeviceListChangedCallback {
void onDeviceListChanged();
}
private DeviceListChangedCallback deviceListChangedCallback = null;
public void setDeviceListChangedCallback(DeviceListChangedCallback callback) {
this.deviceListChangedCallback = callback;
}
//This will called only once, even if we launch the service intent several times
@Override
public void onCreate() {
super.onCreate();
// Register screen on listener
IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);
registerReceiver(new KdeConnectBroadcastReceiver(), filter);
Log.i("BackgroundService","Service not started yet, initializing...");
initializeRsaKeys();
loadRememberedDevicesFromSettings();
registerLinkProviders();
//Link Providers need to be already registered
addConnectionListener(deviceListener);
startDiscovery();
}
private void initializeRsaKeys() {
SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(this);
if (!settings.contains("publicKey") || !settings.contains("privateKey")) {
KeyPair keyPair;
try {
KeyPairGenerator keyGen = KeyPairGenerator.getInstance("RSA");
keyGen.initialize(2048);
keyPair = keyGen.genKeyPair();
} catch(Exception e) {
e.printStackTrace();
Log.e("initializeRsaKeys","Exception");
return;
}
byte[] publicKey = keyPair.getPublic().getEncoded();
byte[] privateKey = keyPair.getPrivate().getEncoded();
SharedPreferences.Editor edit = settings.edit();
edit.putString("publicKey",Base64.encodeToString(publicKey, 0).trim()+"\n");
edit.putString("privateKey",Base64.encodeToString(privateKey, 0));
edit.commit();
}
/*
// Encryption and decryption test
//================================
try {
NetworkPackage np = NetworkPackage.createIdentityPackage(this);
SharedPreferences globalSettings = PreferenceManager.getDefaultSharedPreferences(this);
byte[] publicKeyBytes = Base64.decode(globalSettings.getString("publicKey",""), 0);
PublicKey publicKey = KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(publicKeyBytes));
np.encrypt(publicKey);
byte[] privateKeyBytes = Base64.decode(globalSettings.getString("privateKey",""), 0);
PrivateKey privateKey = KeyFactory.getInstance("RSA").generatePrivate(new PKCS8EncodedKeySpec(privateKeyBytes));
NetworkPackage decrypted = np.decrypt(privateKey);
Log.e("ENCRYPTION AND DECRYPTION TEST", decrypted.serialize());
} catch (Exception e) {
e.printStackTrace();
Log.e("ENCRYPTION AND DECRYPTION TEST","Exception: "+e);
}
*/
}
@Override
public void onDestroy() {
Log.i("BackgroundService", "Destroying");
stopDiscovery();
super.onDestroy();
}
@Override
public IBinder onBind (Intent intent) {
return new Binder();
}
//To use the service from the gui
public interface InstanceCallback {
void onServiceStart(BackgroundService service);
}
private static ArrayList<InstanceCallback> callbacks = new ArrayList<InstanceCallback>();
private static final Lock mutex = new ReentrantLock(true);
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
//This will be called for each intent launch, even if the service is already started and it is reused
Log.i("BackgroundService","onStartCommand");
mutex.lock();
for (InstanceCallback c : callbacks) {
c.onServiceStart(this);
}
callbacks.clear();
mutex.unlock();
return Service.START_STICKY;
}
public static void Start(Context c) {
RunCommand(c, null);
}
public static void RunCommand(Context c, final InstanceCallback callback) {
if (callback != null) {
mutex.lock();
callbacks.add(callback);
mutex.unlock();
}
Intent serviceIntent = new Intent(c, BackgroundService.class);
c.startService(serviceIntent);
}
}

View File

@@ -1,50 +0,0 @@
package org.kde.kdeconnect.ComputerLinks;
import org.kde.kdeconnect.LinkProviders.BaseLinkProvider;
import org.kde.kdeconnect.NetworkPackage;
import java.util.ArrayList;
public abstract class BaseComputerLink {
private BaseLinkProvider linkProvider;
private String deviceId;
private ArrayList<PackageReceiver> receivers = new ArrayList<PackageReceiver>();
protected BaseComputerLink(String deviceId, BaseLinkProvider linkProvider) {
this.linkProvider = linkProvider;
this.deviceId = deviceId;
}
public String getDeviceId() {
return deviceId;
}
public BaseLinkProvider getLinkProvider() {
return linkProvider;
}
public interface PackageReceiver {
public void onPackageReceived(NetworkPackage np);
}
public void addPackageReceiver(PackageReceiver pr) {
receivers.add(pr);
}
public void removePackageReceiver(PackageReceiver pr) {
receivers.remove(pr);
}
//Should be called from a background thread listening to packages
protected void packageReceived(NetworkPackage np) {
for(PackageReceiver pr : receivers) {
pr.onPackageReceived(np);
}
}
//TO OVERRIDE
public abstract boolean sendPackage(NetworkPackage np);
}

View File

@@ -1,37 +0,0 @@
package org.kde.kdeconnect.ComputerLinks;
import android.util.Log;
import org.apache.mina.core.session.IoSession;
import org.kde.kdeconnect.LinkProviders.BaseLinkProvider;
import org.kde.kdeconnect.NetworkPackage;
public class LanComputerLink extends BaseComputerLink {
private IoSession session = null;
public void disconnect() {
Log.i("LanComputerLink","Disconnect: "+session.getRemoteAddress().toString());
session.close(true);
}
public LanComputerLink(IoSession session, String deviceId, BaseLinkProvider linkProvider) {
super(deviceId, linkProvider);
this.session = session;
}
@Override
public boolean sendPackage(NetworkPackage np) {
if (session == null) {
Log.e("LanComputerLink","sendPackage failed: not yet connected");
return false;
} else {
session.write(np.serialize());
return true;
}
}
public void injectNetworkPackage(NetworkPackage np) {
packageReceived(np);
}
}

View File

@@ -1,23 +0,0 @@
package org.kde.kdeconnect.ComputerLinks;
import android.util.Log;
import org.apache.mina.core.session.IoSession;
import org.kde.kdeconnect.LinkProviders.BaseLinkProvider;
import org.kde.kdeconnect.NetworkPackage;
public class LoopbackComputerLink extends BaseComputerLink {
public LoopbackComputerLink(BaseLinkProvider linkProvider) {
super("loopback", linkProvider);
}
@Override
public boolean sendPackage(NetworkPackage in) {
String s = in.serialize();
NetworkPackage out= NetworkPackage.unserialize(s);
packageReceived(out);
return true;
}
}

View File

@@ -1,604 +0,0 @@
package org.kde.kdeconnect;
import android.app.Notification;
import android.app.NotificationManager;
import android.app.PendingIntent;
import android.content.Context;
import android.content.Intent;
import android.content.SharedPreferences;
import android.content.res.Resources;
import android.os.AsyncTask;
import android.os.Handler;
import android.os.Looper;
import android.preference.PreferenceManager;
import android.support.v4.app.NotificationCompat;
import android.util.Base64;
import android.util.Log;
import org.kde.kdeconnect.ComputerLinks.BaseComputerLink;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect.Plugins.PluginFactory;
import org.kde.kdeconnect.UserInterface.PairActivity;
import org.kde.kdeconnect_tp.R;
import java.security.KeyFactory;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.security.spec.PKCS8EncodedKeySpec;
import java.security.spec.X509EncodedKeySpec;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Comparator;
import java.util.HashMap;
import java.util.Set;
import java.util.Timer;
import java.util.TimerTask;
public class Device implements BaseComputerLink.PackageReceiver {
private Context context;
private String deviceId;
private String name;
private PublicKey publicKey;
private int notificationId;
private enum PairStatus {
NotPaired,
Requested,
RequestedByPeer,
Paired
}
public interface PairingCallback {
abstract void incomingRequest();
abstract void pairingSuccessful();
abstract void pairingFailed(String error);
abstract void unpaired();
}
private PairStatus pairStatus;
private ArrayList<PairingCallback> pairingCallback = new ArrayList<PairingCallback>();
private Timer pairingTimer;
private ArrayList<BaseComputerLink> links = new ArrayList<BaseComputerLink>();
private HashMap<String, Plugin> plugins = new HashMap<String, Plugin>();
private HashMap<String, Plugin> failedPlugins = new HashMap<String, Plugin>();
SharedPreferences settings;
//Remembered trusted device, we need to wait for a incoming devicelink to communicate
Device(Context context, String deviceId) {
settings = context.getSharedPreferences(deviceId, Context.MODE_PRIVATE);
//Log.e("Device","Constructor A");
this.context = context;
this.deviceId = deviceId;
this.name = settings.getString("deviceName", "unknown device");
this.pairStatus = PairStatus.Paired;
try {
byte[] publicKeyBytes = Base64.decode(settings.getString("publicKey", ""), 0);
publicKey = KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(publicKeyBytes));
} catch (Exception e) {
e.printStackTrace();
Log.e("Device","Exception");
}
reloadPluginsFromSettings();
}
//Device known via an incoming connection sent to us via a devicelink, we know everything but we don't trust it yet
Device(Context context, String deviceId, String name, BaseComputerLink dl) {
settings = context.getSharedPreferences(deviceId, Context.MODE_PRIVATE);
//Log.e("Device","Constructor B");
this.context = context;
this.deviceId = deviceId;
this.name = name;
this.pairStatus = PairStatus.NotPaired;
this.publicKey = null;
addLink(dl);
}
public String getName() {
return name != null? name : context.getString(R.string.unknown_device);
}
public String getDeviceId() {
return deviceId;
}
//
// Pairing-related functions
//
public boolean isPaired() {
return pairStatus == PairStatus.Paired;
}
public boolean isPairRequested() {
return pairStatus == PairStatus.Requested;
}
public void addPairingCallback(PairingCallback callback) {
pairingCallback.add(callback);
if (pairStatus == PairStatus.RequestedByPeer) {
callback.incomingRequest();
}
}
public void removePairingCallback(PairingCallback callback) {
pairingCallback.remove(callback);
}
public void requestPairing() {
Resources res = context.getResources();
if (pairStatus == PairStatus.Paired) {
for (PairingCallback cb : pairingCallback) cb.pairingFailed(res.getString(R.string.error_already_paired));
return;
}
if (pairStatus == PairStatus.Requested) {
for (PairingCallback cb : pairingCallback) cb.pairingFailed(res.getString(R.string.error_already_requested));
return;
}
if (!isReachable()) {
for (PairingCallback cb : pairingCallback) cb.pairingFailed(res.getString(R.string.error_not_reachable));
return;
}
//Send our own public key
NetworkPackage np = NetworkPackage.createPublicKeyPackage(context);
boolean success = sendPackage(np);
if (!success) {
for (PairingCallback cb : pairingCallback) cb.pairingFailed(res.getString(R.string.error_could_not_send_package));
return;
}
pairingTimer = new Timer();
pairingTimer.schedule(new TimerTask() {
@Override
public void run() {
for (PairingCallback cb : pairingCallback) cb.pairingFailed(context.getString(R.string.error_timed_out));
pairStatus = PairStatus.NotPaired;
}
}, 20*1000);
pairStatus = PairStatus.Requested;
}
public int getNotificationId() {
return notificationId;
}
public void unpair() {
if (!isPaired()) return;
pairStatus = PairStatus.NotPaired;
SharedPreferences preferences = context.getSharedPreferences("trusted_devices", Context.MODE_PRIVATE);
preferences.edit().remove(deviceId).commit();
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_PAIR);
np.set("pair", false);
sendPackage(np);
for (PairingCallback cb : pairingCallback) cb.unpaired();
reloadPluginsFromSettings();
}
public void acceptPairing() {
Log.i("Device","Accepted pairing");
//Send our own public key
NetworkPackage np = NetworkPackage.createPublicKeyPackage(context);
boolean success = sendPackage(np);
if (!success) return;
pairStatus = PairStatus.Paired;
//Store as trusted device
String encodedPublicKey = Base64.encodeToString(publicKey.getEncoded(), 0);
SharedPreferences preferences = context.getSharedPreferences("trusted_devices", Context.MODE_PRIVATE);
preferences.edit().putBoolean(deviceId,true).commit();
//Store device information needed to create a Device object in a future
SharedPreferences.Editor editor = settings.edit();
editor.putString("deviceName", getName());
editor.putString("publicKey", encodedPublicKey);
editor.commit();
reloadPluginsFromSettings();
for (PairingCallback cb : pairingCallback) cb.pairingSuccessful();
}
public void rejectPairing() {
Log.i("Device","Rejected pairing");
pairStatus = PairStatus.NotPaired;
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_PAIR);
np.set("pair", false);
sendPackage(np);
for (PairingCallback cb : pairingCallback) cb.pairingFailed(context.getString(R.string.error_canceled_by_user));
}
//
// ComputerLink-related functions
//
public boolean isReachable() {
return !links.isEmpty();
}
public void addLink(BaseComputerLink link) {
links.add(link);
Log.i("Device","addLink "+link.getLinkProvider().getName()+" -> "+getName() + " active links: "+ links.size());
Collections.sort(links, new Comparator<BaseComputerLink>() {
@Override
public int compare(BaseComputerLink o, BaseComputerLink o2) {
return o2.getLinkProvider().getPriority() - o.getLinkProvider().getPriority();
}
});
link.addPackageReceiver(this);
if (links.size() == 1) {
reloadPluginsFromSettings();
}
}
public void removeLink(BaseComputerLink link) {
link.removePackageReceiver(this);
links.remove(link);
Log.i("Device","removeLink: "+link.getLinkProvider().getName() + " -> "+getName() + " active links: "+ links.size());
if (links.isEmpty()) {
reloadPluginsFromSettings();
}
}
@Override
public void onPackageReceived(NetworkPackage np) {
if (np.getType().equals(NetworkPackage.PACKAGE_TYPE_PAIR)) {
Log.i("Device","Pair package");
boolean wantsPair = np.getBoolean("pair");
if (wantsPair == isPaired()) {
if (pairStatus == PairStatus.Requested) {
pairStatus = PairStatus.NotPaired;
pairingTimer.cancel();
for (PairingCallback cb : pairingCallback) cb.pairingFailed(context.getString(R.string.error_canceled_by_other_peer));
}
return;
}
if (wantsPair) {
//Retrieve their public key
try {
String publicKeyContent = np.getString("publicKey").replace("-----BEGIN PUBLIC KEY-----\n","").replace("-----END PUBLIC KEY-----\n","");
byte[] publicKeyBytes = Base64.decode(publicKeyContent, 0);
publicKey = KeyFactory.getInstance("RSA").generatePublic(new X509EncodedKeySpec(publicKeyBytes));
} catch(Exception e) {
e.printStackTrace();
Log.e("Device","Pairing exception: Received incorrect key");
for (PairingCallback cb : pairingCallback) cb.pairingFailed(context.getString(R.string.error_invalid_key));
return;
}
if (pairStatus == PairStatus.Requested) { //We started pairing
Log.i("Pairing","Pair answer");
pairStatus = PairStatus.Paired;
pairingTimer.cancel();
//Store as trusted device
String encodedPublicKey = Base64.encodeToString(publicKey.getEncoded(), 0);
SharedPreferences preferences = context.getSharedPreferences("trusted_devices", Context.MODE_PRIVATE);
preferences.edit().putBoolean(deviceId,true).commit();
//Store device information needed to create a Device object in a future
SharedPreferences.Editor editor = settings.edit();
editor.putString("deviceName", getName());
editor.putString("publicKey", encodedPublicKey);
editor.commit();
reloadPluginsFromSettings();
for (PairingCallback cb : pairingCallback) cb.pairingSuccessful();
} else {
Log.i("Pairing","Pair request");
Intent intent = new Intent(context, PairActivity.class);
intent.putExtra("deviceId", deviceId);
PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT);
Resources res = context.getResources();
Notification noti = new NotificationCompat.Builder(context)
.setContentTitle(res.getString(R.string.pairing_request_from, getName()))
.setContentText(res.getString(R.string.tap_to_answer))
.setContentIntent(pendingIntent)
.setTicker(res.getString(R.string.pair_requested))
.setSmallIcon(android.R.drawable.ic_menu_help)
.setAutoCancel(true)
.setDefaults(Notification.DEFAULT_SOUND)
.build();
final NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationId = (int)System.currentTimeMillis();
notificationManager.notify(notificationId, noti);
pairingTimer = new Timer();
pairingTimer.schedule(new TimerTask() {
@Override
public void run() {
pairStatus = PairStatus.NotPaired;
notificationManager.cancel(notificationId);
}
}, 19*1000); //Time to show notification
pairStatus = PairStatus.RequestedByPeer;
for (PairingCallback cb : pairingCallback) cb.incomingRequest();
}
} else {
Log.i("Pairing","Unpair request");
if (pairStatus == PairStatus.Requested) {
pairingTimer.cancel();
for (PairingCallback cb : pairingCallback) cb.pairingFailed(context.getString(R.string.error_canceled_by_other_peer));
} else if (pairStatus == PairStatus.Paired) {
SharedPreferences preferences = context.getSharedPreferences("trusted_devices", Context.MODE_PRIVATE);
preferences.edit().remove(deviceId).commit();
reloadPluginsFromSettings();
}
pairStatus = PairStatus.NotPaired;
for (PairingCallback cb : pairingCallback) cb.unpaired();
}
} else if (!isPaired()) {
//TODO: Notify the other side that we don't trust them
Log.e("onPackageReceived","Device not paired, ignoring package!");
} else {
if (np.getType().equals(NetworkPackage.PACKAGE_TYPE_ENCRYPTED)) {
try {
//TODO: Do not read the key every time
SharedPreferences globalSettings = PreferenceManager.getDefaultSharedPreferences(context);
byte[] privateKeyBytes = Base64.decode(globalSettings.getString("privateKey",""), 0);
PrivateKey privateKey = KeyFactory.getInstance("RSA").generatePrivate(new PKCS8EncodedKeySpec(privateKeyBytes));
np = np.decrypt(privateKey);
} catch(Exception e) {
e.printStackTrace();
Log.e("onPackageReceived","Exception reading the key needed to decrypt the package");
}
} else {
//TODO: The other side doesn't know that we are already paired, do something
Log.e("onPackageReceived","WARNING: Received unencrypted package from paired device!");
}
for (Plugin plugin : plugins.values()) {
plugin.onPackageReceived(np);
}
}
}
public boolean sendPackage(final NetworkPackage np) {
if (!np.getType().equals(NetworkPackage.PACKAGE_TYPE_PAIR) && isPaired()) {
try {
np.encrypt(publicKey);
} catch(Exception e) {
e.printStackTrace();
Log.e("Device","sendPackage exception - could not encrypt");
}
}
new AsyncTask<Void,Void,Void>() {
@Override
protected Void doInBackground(Void... voids) {
for(BaseComputerLink link : links) {
//Log.e("sendPackage","Trying "+link.getLinkProvider().getName());
if (link.sendPackage(np)) {
//Log.e("sent using", link.getLinkProvider().getName());
return null;
}
}
Log.e("sendPackage","Error: Package could not be sent ("+links.size()+" links available)");
return null;
}
}.execute();
//TODO: Detect when unable to send a package and try again somehow
return !links.isEmpty();
}
//
// Plugin-related functions
//
public Plugin getPlugin(String name) {
return plugins.get(name);
}
private void addPlugin(final String name) {
Plugin existing = plugins.get(name);
if (existing != null) {
Log.w("addPlugin","plugin already present:" + name);
return;
}
final Plugin plugin = PluginFactory.instantiatePluginForDevice(context, name, this);
if (plugin == null) {
Log.e("addPlugin","could not instantiate plugin: "+name);
failedPlugins.put(name, plugin);
return;
}
new Handler(Looper.getMainLooper()).post(new Runnable() {
@Override
public void run() {
try {
boolean success = plugin.onCreate();
if (!success) {
Log.e("addPlugin", "plugin failed to load " + name);
failedPlugins.put(name, plugin);
return;
}
} catch (Exception e) {
failedPlugins.put(name, plugin);
e.printStackTrace();
Log.e("addPlugin", "Exception loading plugin " + name);
return;
}
//Log.e("addPlugin","added " + name);
failedPlugins.remove(name);
plugins.put(name, plugin);
for (PluginsChangedListener listener : pluginsChangedListeners) {
listener.onPluginsChanged(Device.this);
}
}
});
}
private boolean removePlugin(String name) {
Plugin plugin = plugins.remove(name);
Plugin failedPlugin = failedPlugins.remove(name);
if (plugin == null) {
if (failedPlugin == null) {
return false;
}
plugin = failedPlugin;
}
try {
plugin.onDestroy();
} catch (Exception e) {
e.printStackTrace();
Log.e("removePlugin","Exception calling onDestroy for plugin "+name);
return false;
}
//Log.e("removePlugin","removed " + name);
for (PluginsChangedListener listener : pluginsChangedListeners) {
listener.onPluginsChanged(this);
}
return true;
}
public void setPluginEnabled(String pluginName, boolean value) {
settings.edit().putBoolean(pluginName,value).commit();
if (value) addPlugin(pluginName);
else removePlugin(pluginName);
}
public boolean isPluginEnabled(String pluginName) {
boolean enabledByDefault = PluginFactory.getPluginInfo(context, pluginName).isEnabledByDefault();
boolean enabled = settings.getBoolean(pluginName, enabledByDefault);
return enabled;
}
public void reloadPluginsFromSettings() {
failedPlugins.clear();
Set<String> availablePlugins = PluginFactory.getAvailablePlugins();
for(String pluginName : availablePlugins) {
boolean enabled = false;
if (isPaired() && isReachable()) {
enabled = isPluginEnabled(pluginName);
}
if (enabled) {
addPlugin(pluginName);
} else {
removePlugin(pluginName);
}
}
for (PluginsChangedListener listener : pluginsChangedListeners) {
listener.onPluginsChanged(this);
}
}
public HashMap<String,Plugin> getLoadedPlugins() {
return plugins;
}
public HashMap<String,Plugin> getFailedPlugins() {
return failedPlugins;
}
public interface PluginsChangedListener {
void onPluginsChanged(Device device);
}
private ArrayList<PluginsChangedListener> pluginsChangedListeners = new ArrayList<PluginsChangedListener>();
public void addPluginsChangedListener(PluginsChangedListener listener) {
pluginsChangedListeners.add(listener);
}
public void removePluginsChangedListener(PluginsChangedListener listener) {
pluginsChangedListeners.remove(listener);
}
}

View File

@@ -1,52 +0,0 @@
package org.kde.kdeconnect.Helpers;
import android.content.Context;
import android.content.pm.ApplicationInfo;
import android.content.pm.PackageManager;
import android.graphics.drawable.Drawable;
import android.util.Log;
public class AppsHelper {
public static String appNameLookup(Context context, String packageName) {
try {
PackageManager pm = context.getPackageManager();
ApplicationInfo ai = pm.getApplicationInfo( packageName, 0);
return pm.getApplicationLabel(ai).toString();
} catch (final PackageManager.NameNotFoundException e) {
e.printStackTrace();
Log.e("AppsHelper","Could not resolve name "+packageName);
return null;
}
}
public static Drawable appIconLookup(Context context, String packageName) {
try {
PackageManager pm = context.getPackageManager();
ApplicationInfo ai = pm.getApplicationInfo( packageName, 0);
return pm.getApplicationIcon(ai);
} catch (final PackageManager.NameNotFoundException e) {
e.printStackTrace();
Log.e("AppsHelper","Could not find icon for "+packageName);
return null;
}
}
}

View File

@@ -1,45 +0,0 @@
package org.kde.kdeconnect.Helpers;
import android.content.Context;
import android.database.Cursor;
import android.net.Uri;
import android.provider.ContactsContract;
import android.provider.ContactsContract.PhoneLookup;
import android.util.Log;
public class ContactsHelper {
public static String phoneNumberLookup(Context context, String number) {
//Log.e("PhoneNumberLookup", number);
Uri uri = Uri.withAppendedPath(PhoneLookup.CONTENT_FILTER_URI, Uri.encode(number));
Cursor cursor = null;
try {
cursor = context.getContentResolver().query(
uri,
new String[] {
PhoneLookup.DISPLAY_NAME
/*, PhoneLookup.TYPE
, PhoneLookup.LABEL
, PhoneLookup.ID */
},
null, null, null);
} catch (IllegalArgumentException e) {
return number;
}
// Take the first match only
if (cursor != null && cursor.moveToFirst()) {
int nameIndex = cursor.getColumnIndex(ContactsContract.PhoneLookup.DISPLAY_NAME);
if (nameIndex != -1) {
String name = cursor.getString(nameIndex);
//Log.e("PhoneNumberLookup", "success: " + name);
return name;
}
}
return number;
}
}

View File

@@ -1,23 +0,0 @@
package org.kde.kdeconnect.Helpers;
import android.graphics.Bitmap;
import android.graphics.Canvas;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
public class ImagesHelper {
public static Bitmap drawableToBitmap (Drawable drawable) {
if (drawable instanceof BitmapDrawable) {
return ((BitmapDrawable)drawable).getBitmap();
}
Bitmap bitmap = Bitmap.createBitmap(drawable.getIntrinsicWidth(), drawable.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
drawable.setBounds(0, 0, canvas.getWidth(), canvas.getHeight());
drawable.draw(canvas);
return bitmap;
}
}

View File

@@ -1,170 +0,0 @@
package org.kde.kdeconnect;
import android.os.Build;
import java.util.HashMap;
public class HumanDeviceNames {
//from https://github.com/meetup/android-device-names
//Converted to java using:
//cat android_models.properties | awk -F'=' '{sub(/ *$/, "", $1)} sub(/^ */, "", $2) { if ($2 != "") print "humanReadableNames.put(\""$1"\",\"" $2 "\");"}'
private static HashMap<String,String> humanReadableNames = new HashMap<String,String>();
static {
humanReadableNames.put("5860E","Coolpad Quattro 4G");
humanReadableNames.put("ADR6300","HTC Droid Incredible");
humanReadableNames.put("ADR6330VW","HTC Rhyme");
humanReadableNames.put("ADR6350","HTC Droid Incredible 2");
humanReadableNames.put("ADR6400L","HTC Thunderbolt");
humanReadableNames.put("ADR6410LVW","HTC Droid Incredible 4G");
humanReadableNames.put("ADR6425LVW","HTC Rezound 4G");
humanReadableNames.put("ASUS_Transformer_Pad_TF300T","Asus Transformer Pad");
humanReadableNames.put("C5155","Kyocera Rise");
humanReadableNames.put("C5170","Kyocera Hydro");
humanReadableNames.put("C6603","Sony Xperia Z");
humanReadableNames.put("Desire_HD","HTC Desire HD");
humanReadableNames.put("DROID2_GLOBAL","Motorola Droid 2 Global");
humanReadableNames.put("DROID2","Motorola Droid 2");
humanReadableNames.put("DROID3","Motorola Droid 3");
humanReadableNames.put("DROID4","Motorola Droid 4");
humanReadableNames.put("DROID_BIONIC","Motorola Droid Bionic");
humanReadableNames.put("Droid","Motorola Droid");
humanReadableNames.put("DROID_Pro","Motorola Droid Pro");
humanReadableNames.put("DROID_RAZR_HD","Motorola Droid Razr HD");
humanReadableNames.put("DROID_RAZR","Motorola Droid Razr");
humanReadableNames.put("DROID_X2","Motorola Droid X2");
humanReadableNames.put("DROIDX","Motorola Droid X");
humanReadableNames.put("EVO","HTC Evo");
humanReadableNames.put("Galaxy_Nexus","Samsung Galaxy Nexus");
humanReadableNames.put("google_sdk","Android Emulator");
humanReadableNames.put("GT-I8160","Samsung Galaxy Ace 2");
humanReadableNames.put("GT-I8190","Samsung Galaxy S III Mini");
humanReadableNames.put("GT-I9000","Samsung Galaxy S");
humanReadableNames.put("GT-I9001","Samsung Galaxy S Plus");
humanReadableNames.put("GT-I9100M","Samsung Galaxy S II");
humanReadableNames.put("GT-I9100P","Samsung Galaxy S II");
humanReadableNames.put("GT-I9100","Samsung Galaxy S II");
humanReadableNames.put("GT-I9100T","Samsung Galaxy S II");
humanReadableNames.put("GT-I9300","Samsung Galaxy S III");
humanReadableNames.put("GT-I9300T","Samsung Galaxy S III");
humanReadableNames.put("GT-I9305","Samsung Galaxy S III");
humanReadableNames.put("GT-I9505","Samsung Galaxy S 4");
humanReadableNames.put("GT-N7000","Samsung Galaxy Note");
humanReadableNames.put("GT-N7100","Samsung Galaxy Note II");
humanReadableNames.put("GT-N7105","Samsung Galaxy Note II");
humanReadableNames.put("GT-N8013","Samsung Galaxy Note 10.1");
humanReadableNames.put("GT-P3113","Samsung Galaxy Tab 2 7.0");
humanReadableNames.put("GT-P5113","Samsnung Galaxy Tab 2 10.1");
humanReadableNames.put("GT-P7510","Samsung Galaxy Tab 10.1");
humanReadableNames.put("GT-S5360","Samsung Galaxy Y");
humanReadableNames.put("GT-S5570","Samsung Galaxy Mini");
humanReadableNames.put("GT-S5830i","Samsung Galaxy Ace");
humanReadableNames.put("GT-S5830","Samsung Galaxy Ace");
humanReadableNames.put("HTC6435LVW","HTC Droid DNA");
humanReadableNames.put("HTC_Desire_HD_A9191","HTC Desire HD");
humanReadableNames.put("HTCEVODesign4G","HTC Evo Design 4G");
humanReadableNames.put("HTCEVOV4G","HTC Evo V 4G");
humanReadableNames.put("HTCONE","HTC One");
humanReadableNames.put("HTC_PH39100","HTC Vivid 4G");
humanReadableNames.put("HTC_Sensation_Z710e","HTC Sensation");
humanReadableNames.put("HTC_VLE_U","HTC One S");
humanReadableNames.put("KFJWA","Kindle Fire HD 8.9");
humanReadableNames.put("KFJWI","Kindle Fire HD 8.9");
humanReadableNames.put("KFOT","Kindle Fire");
humanReadableNames.put("KFTT","Kindle Fire HD 7");
humanReadableNames.put("LG-C800","LG myTouch Q");
humanReadableNames.put("LG-E739","LG MyTouch e739");
humanReadableNames.put("LGL55C","LG LGL55C");
humanReadableNames.put("LG-LS970","LG Optimus G");
humanReadableNames.put("LG-MS770","LG Motion 4G");
humanReadableNames.put("LG-MS910","LG Esteem");
humanReadableNames.put("LG-P509","LG Optimus T");
humanReadableNames.put("LG-P769","LG Optimus L9");
humanReadableNames.put("LG-P999","LG G2X P999");
humanReadableNames.put("LG-VM696","LG Optimus Elite");
humanReadableNames.put("LS670","LG Optimus S");
humanReadableNames.put("LT26i","Sony Xperia S");
humanReadableNames.put("MB855","Motorola Photon 4G");
humanReadableNames.put("MB860","Motorola Atrix 4G");
humanReadableNames.put("MB865","Motorola Atrix 2");
humanReadableNames.put("MB886","Motorola Atrix HD");
humanReadableNames.put("MOTWX435KT","Motorola Triumph");
humanReadableNames.put("myTouch_4G_Slide","HTC myTouch 4G Slide");
humanReadableNames.put("N860","ZTE Warp N860");
humanReadableNames.put("Nexus_10","Google Nexus 10");
humanReadableNames.put("Nexus_4","Google Nexus 4");
humanReadableNames.put("Nexus_7","Asus Nexus 7");
humanReadableNames.put("Nexus_S_4G","Samsung Nexus S 4G");
humanReadableNames.put("Nexus_S","Samsung Nexus S");
humanReadableNames.put("PantechP9070","Pantech Burst");
humanReadableNames.put("PC36100","HTC Evo 4G");
humanReadableNames.put("PG06100","HTC EVO Shift 4G");
humanReadableNames.put("PG86100","HTC Evo 3D");
humanReadableNames.put("PH44100","HTC Evo Design 4G");
humanReadableNames.put("SAMSUNG-SGH-I317","Samsung Galaxy Note II");
humanReadableNames.put("SAMSUNG-SGH-I337","Samsung Galaxy S 4");
humanReadableNames.put("SAMSUNG-SGH-I717","Samsung Galaxy Note");
humanReadableNames.put("SAMSUNG-SGH-I727","Samsung Skyrocket");
humanReadableNames.put("SAMSUNG-SGH-I747","Samsung Galaxy S III");
humanReadableNames.put("SAMSUNG-SGH-I777","Samsung Galaxy S II");
humanReadableNames.put("SAMSUNG-SGH-I897","Samsung Captivate");
humanReadableNames.put("SAMSUNG-SGH-I927","Samsung Captivate Glide");
humanReadableNames.put("SAMSUNG-SGH-I997","Samsung Infuse 4G");
humanReadableNames.put("SCH-I200","Samsung Galaxy Stellar");
humanReadableNames.put("SCH-I405","Samsung Stratosphere");
humanReadableNames.put("SCH-I500","Samsung Fascinate");
humanReadableNames.put("SCH-I510","Samsung Droid Charge");
humanReadableNames.put("SCH-I535","Samsung Galaxy S III");
humanReadableNames.put("SCH-I545","Samsung Galaxy S 4");
humanReadableNames.put("SCH-I605","Samsung Galaxy Note II");
humanReadableNames.put("SCH-I800","Samsung Galaxy Tab 7.0");
humanReadableNames.put("SCH-R530M","Samsung Galaxy S III");
humanReadableNames.put("SCH-R530U","Samsung Galaxy S III");
humanReadableNames.put("SCH-R720","Samsung Admire");
humanReadableNames.put("SCH-S720C","Samsung Proclaim");
humanReadableNames.put("SGH-I317M","Samsung Galaxy Note II");
humanReadableNames.put("SGH-I727R","Samsung Galaxy S II");
humanReadableNames.put("SGH-I747M","Samsung Galaxy S III");
humanReadableNames.put("SGH-M919","Samsung Galaxy S 4");
humanReadableNames.put("SGH-T679","Samsung Exhibit II");
humanReadableNames.put("SGH-T769","Samsung Galaxy S Blaze");
humanReadableNames.put("SGH-T889","Samsung Galaxy Note II");
humanReadableNames.put("SGH-T959","Samsung Galaxy S Vibrant");
humanReadableNames.put("SGH-T959V","Samsung Galaxy S 4G");
humanReadableNames.put("SGH-T989D","Samsung Galaxy S II");
humanReadableNames.put("SGH-T989","Samsung Galaxy S II");
humanReadableNames.put("SGH-T999","Samsung Galaxy S III");
humanReadableNames.put("SPH-D600","Samsung Conquer 4G");
humanReadableNames.put("SPH-D700","Samsung Epic 4G");
humanReadableNames.put("SPH-D710BST","Samsung Galaxy S II");
humanReadableNames.put("SPH-D710","Samsung Epic");
humanReadableNames.put("SPH-D710VMUB","Samsung Galaxy S II");
humanReadableNames.put("SPH-L710","Samsung Galaxy S III");
humanReadableNames.put("SPH-L720","Samsung Galaxy S 4");
humanReadableNames.put("SPH-L900","Samsung Galaxy Note II");
humanReadableNames.put("SPH-M820-BST","Samsung Galaxy Prevail");
humanReadableNames.put("SPH-M930BST","Samsung Transform Ultra");
humanReadableNames.put("Transformer_Prime_TF201","Asus Eee Pad Transformer Prime");
humanReadableNames.put("Transformer_TF101","Asus Eee Pad Transformer");
humanReadableNames.put("VM670","LG Optimus V");
humanReadableNames.put("VS840_4G","LG Lucid 4G");
humanReadableNames.put("VS910_4G","LG Revolution 4G");
humanReadableNames.put("VS920_4G","LG Spectrum 4G");
humanReadableNames.put("Xoom","Motorola Xoom");
humanReadableNames.put("XT907","Motorola Droid Razr M");
}
static String getDeviceName() {
String dictName = humanReadableNames.get(Build.MODEL.replace(' ','_'));
if (dictName != null) return dictName;
if (Build.BRAND.equals("samsung") || Build.BRAND.equals("Samsung")) {
return "Samsung" + Build.MODEL;
}
return Build.MODEL;
}
}

View File

@@ -1,66 +0,0 @@
package org.kde.kdeconnect;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.net.ConnectivityManager;
import android.net.wifi.WifiManager;
import android.util.Log;
public class KdeConnectBroadcastReceiver extends BroadcastReceiver
{
public void onReceive(Context context, Intent intent) {
//Log.e("KdeConnect", "Broadcast event: "+intent.getAction());
String action = intent.getAction();
if(action.equals(Intent.ACTION_PACKAGE_REPLACED)) {
Log.i("KdeConnect", "UpdateReceiver");
if (!intent.getData().getSchemeSpecificPart().equals(context.getPackageName())) {
Log.i("KdeConnect", "Ignoring, it's not me!");
return;
}
BackgroundService.RunCommand(context, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
}
});
} else if (action.equals(Intent.ACTION_BOOT_COMPLETED)) {
Log.i("KdeConnect", "KdeConnectBroadcastReceiver");
BackgroundService.RunCommand(context, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
}
});
} else if (action.equals(WifiManager.SUPPLICANT_CONNECTION_CHANGE_ACTION)
|| action.equals(WifiManager.WIFI_STATE_CHANGED_ACTION)
|| action.equals(ConnectivityManager.CONNECTIVITY_ACTION)
) {
Log.i("KdeConnect", "Connection state changed, trying to connect");
BackgroundService.RunCommand(context, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
service.onNetworkChange();
}
});
} else if (action.equals(Intent.ACTION_SCREEN_ON)) {
BackgroundService.RunCommand(context, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
service.onNetworkChange();
}
});
} else {
Log.i("KdeConnectBroadcastReceiver", "Ignoring broadcast event: "+intent.getAction());
}
}
}

View File

@@ -1,49 +0,0 @@
package org.kde.kdeconnect.LinkProviders;
import android.util.Log;
import org.kde.kdeconnect.ComputerLinks.BaseComputerLink;
import org.kde.kdeconnect.NetworkPackage;
import java.util.ArrayList;
public abstract class BaseLinkProvider {
private ArrayList<ConnectionReceiver> connectionReceivers = new ArrayList<ConnectionReceiver>();
public interface ConnectionReceiver {
public void onConnectionReceived(NetworkPackage identityPackage, BaseComputerLink link);
public void onConnectionLost(BaseComputerLink link);
}
public void addConnectionReceiver(ConnectionReceiver cr) {
connectionReceivers.add(cr);
}
public boolean removeConnectionReceiver(ConnectionReceiver cr) {
return connectionReceivers.remove(cr);
}
//These two should be called when the provider links to a new computer
protected void connectionAccepted(NetworkPackage identityPackage, BaseComputerLink link) {
Log.i("LinkProvider", "connectionAccepted");
for(ConnectionReceiver cr : connectionReceivers) {
cr.onConnectionReceived(identityPackage, link);
}
}
protected void connectionLost(BaseComputerLink link) {
Log.i("LinkProvider", "connectionLost");
for(ConnectionReceiver cr : connectionReceivers) {
cr.onConnectionLost(link);
}
}
//To override
public abstract void onStart();
public abstract void onStop();
public abstract void onNetworkChange();
public abstract int getPriority();
public abstract String getName();
}

View File

@@ -1,283 +0,0 @@
package org.kde.kdeconnect.LinkProviders;
import android.content.Context;
import android.os.AsyncTask;
import android.util.Log;
import org.apache.mina.core.future.ConnectFuture;
import org.apache.mina.core.future.IoFuture;
import org.apache.mina.core.future.IoFutureListener;
import org.apache.mina.core.service.IoHandler;
import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFilter;
import org.apache.mina.filter.codec.textline.LineDelimiter;
import org.apache.mina.filter.codec.textline.TextLineCodecFactory;
import org.apache.mina.transport.socket.nio.NioDatagramAcceptor;
import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
import org.apache.mina.transport.socket.nio.NioSocketConnector;
import org.kde.kdeconnect.ComputerLinks.LanComputerLink;
import org.kde.kdeconnect.NetworkPackage;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.nio.charset.Charset;
import java.util.HashMap;
public class LanLinkProvider extends BaseLinkProvider {
private final static int port = 1714;
private Context context;
private HashMap<String, LanComputerLink> visibleComputers = new HashMap<String, LanComputerLink>();
private HashMap<Long, LanComputerLink> nioSessions = new HashMap<Long, LanComputerLink>();
private NioSocketAcceptor tcpAcceptor = null;
private NioDatagramAcceptor udpAcceptor = null;
private final IoHandler tcpHandler = new IoHandlerAdapter() {
@Override
public void sessionClosed(IoSession session) throws Exception {
LanComputerLink brokenLink = nioSessions.remove(session.getId());
if (brokenLink != null) {
connectionLost(brokenLink);
brokenLink.disconnect();
String deviceId = brokenLink.getDeviceId();
if (visibleComputers.get(deviceId) == brokenLink) {
visibleComputers.remove(deviceId);
}
}
}
@Override
public void messageReceived(IoSession session, Object message) throws Exception {
super.messageReceived(session, message);
//Log.e("LanLinkProvider","Incoming package, address: "+session.getRemoteAddress()).toString());
String theMessage = (String) message;
NetworkPackage np = NetworkPackage.unserialize(theMessage);
LanComputerLink prevLink = nioSessions.get(session.getId());
if (np.getType().equals(NetworkPackage.PACKAGE_TYPE_IDENTITY)) {
String myId = NetworkPackage.createIdentityPackage(context).getString("deviceId");
if (np.getString("deviceId").equals(myId)) {
return;
}
LanComputerLink link = new LanComputerLink(session, np.getString("deviceId"), LanLinkProvider.this);
nioSessions.put(session.getId(),link);
addLink(np, link);
} else {
if (prevLink == null) {
Log.e("LanLinkProvider","2 Expecting an identity package");
} else {
prevLink.injectNetworkPackage(np);
}
}
}
};
private IoHandler udpHandler = new IoHandlerAdapter() {
@Override
public void messageReceived(IoSession udpSession, Object message) throws Exception {
super.messageReceived(udpSession, message);
//Log.e("LanLinkProvider", "Udp message received (" + message.getClass() + ") " + message.toString());
NetworkPackage np = null;
try {
//We should receive a string thanks to the TextLineCodecFactory filter
String theMessage = (String) message;
np = NetworkPackage.unserialize(theMessage);
} catch (Exception e) {
e.printStackTrace();
Log.e("LanLinkProvider", "Could not unserialize package");
}
if (np != null) {
final NetworkPackage identityPackage = np;
if (!np.getType().equals(NetworkPackage.PACKAGE_TYPE_IDENTITY)) {
Log.e("LanLinkProvider", "1 Expecting an identity package");
return;
} else {
String myId = NetworkPackage.createIdentityPackage(context).getString("deviceId");
if (np.getString("deviceId").equals(myId)) {
return;
}
}
Log.i("LanLinkProvider", "Identity package received, creating link");
try {
final InetSocketAddress address = (InetSocketAddress) udpSession.getRemoteAddress();
final NioSocketConnector connector = new NioSocketConnector();
connector.setHandler(tcpHandler);
//TextLineCodecFactory will split incoming data delimited by the given string
connector.getFilterChain().addLast("codec",
new ProtocolCodecFilter(
new TextLineCodecFactory(Charset.defaultCharset(), LineDelimiter.UNIX, LineDelimiter.UNIX)
)
);
connector.getSessionConfig().setKeepAlive(true);
int tcpPort = np.getInt("tcpPort",port);
ConnectFuture future = connector.connect(new InetSocketAddress(address.getAddress(), tcpPort));
future.addListener(new IoFutureListener<IoFuture>() {
@Override
public void operationComplete(IoFuture ioFuture) {
IoSession session = ioFuture.getSession();
Log.i("LanLinkProvider", "Connection successful: " + session.isConnected());
LanComputerLink link = new LanComputerLink(session, identityPackage.getString("deviceId"), LanLinkProvider.this);
NetworkPackage np2 = NetworkPackage.createIdentityPackage(context);
link.sendPackage(np2);
nioSessions.put(session.getId(), link);
addLink(identityPackage, link);
}
});
} catch (Exception e) {
Log.e("LanLinkProvider","Exception!!");
e.printStackTrace();
}
}
}
};
private void addLink(NetworkPackage identityPackage, LanComputerLink link) {
String deviceId = identityPackage.getString("deviceId");
Log.i("LanLinkProvider","addLink to "+deviceId);
LanComputerLink oldLink = visibleComputers.get(deviceId);
visibleComputers.put(deviceId, link);
connectionAccepted(identityPackage, link);
if (oldLink != null) {
Log.i("LanLinkProvider","Removing old connection to same device");
oldLink.disconnect();
connectionLost(oldLink);
}
}
public LanLinkProvider(Context context) {
this.context = context;
//This handles the case when I'm the new device in the network and somebody answers my introduction package
tcpAcceptor = new NioSocketAcceptor();
tcpAcceptor.setHandler(tcpHandler);
tcpAcceptor.getSessionConfig().setKeepAlive(true);
tcpAcceptor.getSessionConfig().setReuseAddress(true);
tcpAcceptor.setCloseOnDeactivation(false);
//TextLineCodecFactory will split incoming data delimited by the given string
tcpAcceptor.getFilterChain().addLast("codec",
new ProtocolCodecFilter(
new TextLineCodecFactory(Charset.defaultCharset(), LineDelimiter.UNIX, LineDelimiter.UNIX)
)
);
udpAcceptor = new NioDatagramAcceptor();
udpAcceptor.getSessionConfig().setReuseAddress(true); //Share port if existing
//TextLineCodecFactory will split incoming data delimited by the given string
udpAcceptor.getFilterChain().addLast("codec",
new ProtocolCodecFilter(
new TextLineCodecFactory(Charset.defaultCharset(), LineDelimiter.UNIX, LineDelimiter.UNIX)
)
);
}
@Override
public void onStart() {
//This handles the case when I'm the existing device in the network and receive a "hello" UDP package
udpAcceptor.setHandler(udpHandler);
try {
udpAcceptor.bind(new InetSocketAddress(port));
} catch(Exception e) {
Log.e("LanLinkProvider", "Error: Could not bind udp socket");
e.printStackTrace();
}
boolean success = false;
int tcpPort = port;
while(!success) {
try {
tcpAcceptor.bind(new InetSocketAddress(tcpPort));
success = true;
} catch(Exception e) {
tcpPort++;
}
}
Log.i("LanLinkProvider","Using tcpPort "+tcpPort);
//I'm on a new network, let's be polite and introduce myself
final int finalTcpPort = tcpPort;
new AsyncTask<Void,Void,Void>() {
@Override
protected Void doInBackground(Void... voids) {
try {
NetworkPackage identity = NetworkPackage.createIdentityPackage(context);
identity.set("tcpPort",finalTcpPort);
byte[] b = identity.serialize().getBytes("UTF-8");
DatagramPacket packet = new DatagramPacket(b, b.length, InetAddress.getByAddress(new byte[]{-1,-1,-1,-1}), port);
DatagramSocket socket = new DatagramSocket();
socket.setReuseAddress(true);
socket.setBroadcast(true);
socket.send(packet);
//Log.e("LanLinkProvider","Udp identity package sent");
} catch(Exception e) {
e.printStackTrace();
Log.e("LanLinkProvider","Sending udp identity package failed");
}
return null;
}
}.execute();
}
@Override
public void onNetworkChange() {
onStop();
onStart();
}
@Override
public void onStop() {
udpAcceptor.unbind();
tcpAcceptor.unbind();
}
@Override
public int getPriority() {
return 1000;
}
@Override
public String getName() {
return "LanLinkProvider";
}
}

View File

@@ -1,65 +0,0 @@
package org.kde.kdeconnect.LinkProviders;
import android.content.Context;
import android.os.AsyncTask;
import android.util.Log;
import org.apache.mina.core.future.ConnectFuture;
import org.apache.mina.core.future.IoFuture;
import org.apache.mina.core.future.IoFutureListener;
import org.apache.mina.core.service.IoHandler;
import org.apache.mina.core.service.IoHandlerAdapter;
import org.apache.mina.core.session.IoSession;
import org.apache.mina.filter.codec.ProtocolCodecFilter;
import org.apache.mina.filter.codec.textline.LineDelimiter;
import org.apache.mina.filter.codec.textline.TextLineCodecFactory;
import org.apache.mina.transport.socket.nio.NioDatagramAcceptor;
import org.apache.mina.transport.socket.nio.NioSocketAcceptor;
import org.apache.mina.transport.socket.nio.NioSocketConnector;
import org.kde.kdeconnect.ComputerLinks.LanComputerLink;
import org.kde.kdeconnect.ComputerLinks.LoopbackComputerLink;
import org.kde.kdeconnect.NetworkPackage;
import java.net.DatagramPacket;
import java.net.DatagramSocket;
import java.net.InetAddress;
import java.net.InetSocketAddress;
import java.nio.charset.Charset;
import java.util.HashMap;
public class LoopbackLinkProvider extends BaseLinkProvider {
private Context context;
public LoopbackLinkProvider(Context context) {
this.context = context;
}
@Override
public void onStart() {
onNetworkChange();
}
@Override
public void onStop() {
}
@Override
public void onNetworkChange() {
NetworkPackage np = NetworkPackage.createIdentityPackage(context);
connectionAccepted(np, new LoopbackComputerLink(this));
}
@Override
public int getPriority() {
return 0;
}
@Override
public String getName() {
return "LoopbackLinkProvider";
}
}

View File

@@ -1,211 +0,0 @@
package org.kde.kdeconnect;
import android.content.Context;
import android.content.SharedPreferences;
import android.preference.PreferenceManager;
import android.provider.Settings;
import android.util.Base64;
import android.util.Log;
import org.json.JSONArray;
import org.json.JSONException;
import org.json.JSONObject;
import java.nio.charset.Charset;
import java.security.PrivateKey;
import java.security.PublicKey;
import java.util.ArrayList;
import javax.crypto.Cipher;
public class NetworkPackage {
public final static int ProtocolVersion = 3;
public final static String PACKAGE_TYPE_IDENTITY = "kdeconnect.identity";
public final static String PACKAGE_TYPE_PAIR = "kdeconnect.pair";
public final static String PACKAGE_TYPE_ENCRYPTED = "kdeconnect.encrypted";
public final static String PACKAGE_TYPE_PING = "kdeconnect.ping";
public final static String PACKAGE_TYPE_TELEPHONY = "kdeconnect.telephony";
public final static String PACKAGE_TYPE_BATTERY = "kdeconnect.battery";
public final static String PACKAGE_TYPE_NOTIFICATION = "kdeconnect.notification";
public final static String PACKAGE_TYPE_CLIPBOARD = "kdeconnect.clipboard";
public final static String PACKAGE_TYPE_MPRIS = "kdeconnect.mpris";
private long mId;
private String mType;
private JSONObject mBody;
private NetworkPackage() {
}
public NetworkPackage(String type) {
mId = System.currentTimeMillis();
mType = type;
mBody = new JSONObject();
}
public String getType() {
return mType;
}
//Most commons getters and setters defined for convenience
public String getString(String key) { return mBody.optString(key,""); }
public String getString(String key, String defaultValue) { return mBody.optString(key,defaultValue); }
public void set(String key, String value) { if (value == null) return; try { mBody.put(key,value); } catch(Exception e) { } }
public int getInt(String key) { return mBody.optInt(key,-1); }
public int getInt(String key, int defaultValue) { return mBody.optInt(key,defaultValue); }
public void set(String key, int value) { try { mBody.put(key,value); } catch(Exception e) { } }
public boolean getBoolean(String key) { return mBody.optBoolean(key,false); }
public boolean getBoolean(String key, boolean defaultValue) { return mBody.optBoolean(key,defaultValue); }
public void set(String key, boolean value) { try { mBody.put(key,value); } catch(Exception e) { } }
public double getDouble(String key) { return mBody.optDouble(key,Double.NaN); }
public double getDouble(String key, double defaultValue) { return mBody.optDouble(key,defaultValue); }
public void set(String key, double value) { try { mBody.put(key,value); } catch(Exception e) { } }
public ArrayList<String> getStringList(String key) {
JSONArray jsonArray = mBody.optJSONArray(key);
ArrayList<String> list = new ArrayList<String>();
int length = jsonArray.length();
for (int i = 0; i < length; i++) {
try {
String str = jsonArray.getString(i);
list.add(str);
} catch(Exception e) {
}
}
return list;
}
public ArrayList<String> getStringList(String key, ArrayList<String> defaultValue) {
if (mBody.has(key)) return getStringList(key);
else return defaultValue;
}
public void set(String key, ArrayList<String> value) {
try {
JSONArray jsonArray = new JSONArray();
for(String str : value) {
jsonArray.put(str);
}
mBody.put(key,jsonArray);
} catch(Exception e) {
}
}
public boolean has(String key) { return mBody.has(key); }
public String serialize() {
JSONObject jo = new JSONObject();
try {
jo.put("id",mId);
jo.put("type",mType);
jo.put("body",mBody);
} catch(Exception e) {
}
//QJSon does not escape slashes, but Java JSONObject does. Converting to QJson format.
String json = jo.toString().replace("\\/","/")+"\n";
//Log.e("NetworkPackage.serialize",json);
return json;
}
static public NetworkPackage unserialize(String s) {
//Log.e("NetworkPackage.unserialize", s);
NetworkPackage np = new NetworkPackage();
try {
JSONObject jo = new JSONObject(s);
np.mId = jo.getLong("id");
np.mType = jo.getString("type");
np.mBody = jo.getJSONObject("body");
} catch (Exception e) {
return null;
}
return np;
}
public void encrypt(PublicKey publicKey) throws Exception {
String serialized = serialize();
int chunkSize = 128;
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1PADDING");
cipher.init(Cipher.ENCRYPT_MODE, publicKey);
JSONArray chunks = new JSONArray();
while (serialized.length() > 0) {
if (serialized.length() < chunkSize) {
chunkSize = serialized.length();
}
String chunk = serialized.substring(0, chunkSize);
serialized = serialized.substring(chunkSize);
byte[] chunkBytes = chunk.getBytes(Charset.defaultCharset());
byte[] encryptedChunk;
encryptedChunk = cipher.doFinal(chunkBytes);
chunks.put(Base64.encodeToString(encryptedChunk, Base64.NO_WRAP));
}
mId = System.currentTimeMillis();
mType = NetworkPackage.PACKAGE_TYPE_ENCRYPTED;
mBody = new JSONObject();
try {
mBody.put("data", chunks);
}catch(Exception e){
e.printStackTrace();
Log.e("NetworkPackage","Exception");
}
Log.i("NetworkPackage", "Encrypted " + chunks.length()+" chunks");
}
public NetworkPackage decrypt(PrivateKey privateKey) throws Exception {
JSONArray chunks = mBody.getJSONArray("data");
Cipher cipher = Cipher.getInstance("RSA/ECB/PKCS1PADDING");
cipher.init(Cipher.DECRYPT_MODE, privateKey);
String decryptedJson = "";
for (int i = 0; i < chunks.length(); i++) {
byte[] encryptedChunk = Base64.decode(chunks.getString(i), Base64.NO_WRAP);
String decryptedChunk = new String(cipher.doFinal(encryptedChunk));
decryptedJson += decryptedChunk;
}
return unserialize(decryptedJson);
}
static public NetworkPackage createIdentityPackage(Context context) {
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_IDENTITY);
String deviceId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);
try {
np.mBody.put("deviceId", deviceId);
np.mBody.put("deviceName", HumanDeviceNames.getDeviceName());
np.mBody.put("protocolVersion", NetworkPackage.ProtocolVersion);
} catch (JSONException e) {
}
return np;
}
static public NetworkPackage createPublicKeyPackage(Context context) {
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_PAIR);
np.set("pair", true);
SharedPreferences globalSettings = PreferenceManager.getDefaultSharedPreferences(context);
String publicKey = "-----BEGIN PUBLIC KEY-----\n" + globalSettings.getString("publicKey", "").trim()+ "\n-----END PUBLIC KEY-----\n";
np.set("publicKey", publicKey);
return np;
}
}

View File

@@ -1,121 +0,0 @@
package org.kde.kdeconnect.Plugins.BatteryPlugin;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.drawable.Drawable;
import android.os.BatteryManager;
import android.util.Log;
import android.widget.Button;
import org.kde.kdeconnect.NetworkPackage;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect_tp.R;
public class BatteryPlugin extends Plugin {
private NetworkPackage lastPackage = null;
private IntentFilter filter = new IntentFilter(Intent.ACTION_BATTERY_CHANGED);
/*static {
PluginFactory.registerPlugin(BatteryPlugin.class);
}*/
@Override
public String getPluginName() {
return "plugin_battery";
}
@Override
public String getDisplayName() {
return context.getResources().getString(R.string.pref_plugin_battery);
}
@Override
public String getDescription() {
return context.getResources().getString(R.string.pref_plugin_battery_desc);
}
@Override
public Drawable getIcon() {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean isEnabledByDefault() {
return true;
}
private BroadcastReceiver receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
Log.i("BatteryPlugin", "Battery event");
boolean isCharging = (0 != intent.getIntExtra(BatteryManager.EXTRA_PLUGGED, 0));
int currentCharge = 100;
int status = intent.getIntExtra(BatteryManager.EXTRA_STATUS, -1);
if (status != BatteryManager.BATTERY_STATUS_FULL) {
Intent batteryStatus = context.registerReceiver(null, filter);
int level = batteryStatus.getIntExtra(BatteryManager.EXTRA_LEVEL, -1);
int scale = batteryStatus.getIntExtra(BatteryManager.EXTRA_SCALE, -1);
currentCharge = level*100 / scale;
}
//Only notify if change is meaningful enough
if (lastPackage == null
|| (
isCharging != lastPackage.getBoolean("isCharging")
|| currentCharge != lastPackage.getInt("currentCharge")
)
) {
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_BATTERY);
np.set("isCharging", isCharging);
np.set("currentCharge", currentCharge);
device.sendPackage(np);
lastPackage = np;
}
}
};
@Override
public boolean onCreate() {
context.registerReceiver(receiver, filter);
return true;
}
@Override
public void onDestroy() {
context.unregisterReceiver(receiver);
}
@Override
public boolean onPackageReceived(NetworkPackage np) {
if (!np.getType().equals(NetworkPackage.PACKAGE_TYPE_BATTERY)) return false;
if (np.getBoolean("request")) {
if (lastPackage != null) {
device.sendPackage(lastPackage);
}
}
return true;
}
@Override
public AlertDialog getErrorDialog(Context baseContext) {
return null;
}
@Override
public Button getInterfaceButton(Activity activity) {
return null;
}
}

View File

@@ -1,52 +0,0 @@
package org.kde.kdeconnect.Plugins.ClibpoardPlugin;
import android.content.ClipData;
import android.content.Context;
import android.content.ClipboardManager;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.NetworkPackage;
public class ClipboardListener {
private String currentContent;
private ClipboardManager cm = null;
ClipboardManager.OnPrimaryClipChangedListener listener;
ClipboardListener(final Context context, final Device device) {
cm = (ClipboardManager)context.getSystemService(Context.CLIPBOARD_SERVICE);
listener = new ClipboardManager.OnPrimaryClipChangedListener() {
@Override
public void onPrimaryClipChanged() {
try {
ClipData.Item item = cm.getPrimaryClip().getItemAt(0);
String content = item.coerceToText(context).toString();
if (!content.equals(currentContent)) {
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_CLIPBOARD);
np.set("content", content);
device.sendPackage(np);
currentContent = content;
}
} catch(Exception e) {
//Probably clipboard was not text
}
}
};
cm.addPrimaryClipChangedListener(listener);
}
public void stop() {
cm.removePrimaryClipChangedListener(listener);
}
public void setText(String text) {
currentContent = text;
cm.setText(text);
}
}

View File

@@ -1,100 +0,0 @@
package org.kde.kdeconnect.Plugins.ClibpoardPlugin;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.DialogInterface;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.widget.Button;
import org.kde.kdeconnect.NetworkPackage;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect_tp.R;
public class ClipboardPlugin extends Plugin {
/*static {
PluginFactory.registerPlugin(ClipboardPlugin.class);
}*/
@Override
public String getPluginName() {
return "plugin_clipboard";
}
@Override
public String getDisplayName() {
return context.getResources().getString(R.string.pref_plugin_clipboard);
}
@Override
public String getDescription() {
return context.getResources().getString(R.string.pref_plugin_clipboard_desc);
}
@Override
public Drawable getIcon() {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean isEnabledByDefault() {
return (Build.VERSION.SDK_INT >= 11);
}
private ClipboardListener listener;
@Override
public boolean onCreate() {
if (Build.VERSION.SDK_INT < 11) {
return false;
}
listener = new ClipboardListener(context, device);
return true;
}
@Override
public void onDestroy() {
if (Build.VERSION.SDK_INT < 11) return;
listener.stop();
}
@Override
public boolean onPackageReceived(NetworkPackage np) {
if (!np.getType().equals(NetworkPackage.PACKAGE_TYPE_CLIPBOARD)) {
return false;
}
String content = np.getString("content");
listener.setText(content);
return true;
}
@Override
public AlertDialog getErrorDialog(Context baseContext) {
return new AlertDialog.Builder(baseContext)
.setTitle(R.string.pref_plugin_clipboard)
.setMessage(R.string.plugin_not_available)
.setPositiveButton("Ok",new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
})
.create();
}
@Override
public Button getInterfaceButton(Activity activity) {
return null;
}
}

View File

@@ -1,230 +0,0 @@
package org.kde.kdeconnect.Plugins.MprisPlugin;
import android.app.Activity;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.ImageButton;
import android.widget.SeekBar;
import android.widget.Spinner;
import android.widget.TextView;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.ComputerLinks.BaseComputerLink;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.LinkProviders.BaseLinkProvider;
import org.kde.kdeconnect.NetworkPackage;
import org.kde.kdeconnect_tp.R;
import java.util.ArrayList;
public class MprisActivity extends Activity {
//TODO: Add a loading spinner at the begginning (to distinguish the loading state from a no-players state).
//TODO 2: Add a message when no players are detected after loading completes
protected void connectToPlugin() {
final String deviceId = getIntent().getStringExtra("deviceId");
BackgroundService.RunCommand(this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
Device device = service.getDevice(deviceId);
final MprisPlugin mpris = (MprisPlugin) device.getPlugin("plugin_mpris");
if (mpris == null) {
Log.e("MprisActivity", "device has no mpris plugin!");
return;
}
mpris.setPlayerStatusUpdatedHandler(new Handler() {
@Override
public void handleMessage(Message msg) {
runOnUiThread(new Runnable() {
@Override
public void run() {
String s = mpris.getCurrentSong();
((TextView) findViewById(R.id.now_playing_textview)).setText(s);
int volume = mpris.getVolume();
((SeekBar) findViewById(R.id.volume_seek)).setProgress(volume);
boolean isPlaying = mpris.isPlaying();
if (isPlaying) {
((ImageButton) findViewById(R.id.play_button)).setImageResource(android.R.drawable.ic_media_pause);
} else {
((ImageButton) findViewById(R.id.play_button)).setImageResource(android.R.drawable.ic_media_play);
}
}
});
}
});
mpris.setPlayerListUpdatedHandler(new Handler() {
boolean firstLoad = true;
@Override
public void handleMessage(Message msg) {
final ArrayList<String> playerList = mpris.getPlayerList();
final ArrayAdapter<String> adapter = new ArrayAdapter<String>(MprisActivity.this,
android.R.layout.simple_spinner_item,
playerList.toArray(new String[playerList.size()])
);
adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);
runOnUiThread(new Runnable() {
@Override
public void run() {
Spinner spinner = (Spinner) findViewById(R.id.player_spinner);
//String prevPlayer = (String)spinner.getSelectedItem();
spinner.setAdapter(adapter);
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
@Override
public void onItemSelected(AdapterView<?> arg0, View arg1, int pos, long id) {
((TextView) findViewById(R.id.now_playing_textview)).setText("");
String player = playerList.get(pos);
mpris.setPlayer(player);
//Spotify doesn't support changing the volume yet...
if (player.equals("Spotify")) {
findViewById(R.id.volume_layout).setVisibility(View.INVISIBLE);
} else {
findViewById(R.id.volume_layout).setVisibility(View.VISIBLE);
}
}
@Override
public void onNothingSelected(AdapterView<?> arg0) {
}
});
}
});
if (firstLoad) {
firstLoad = false;
if (playerList.size() > 0) {
mpris.setPlayer(playerList.get(0));
}
}
}
});
}
});
}
BaseLinkProvider.ConnectionReceiver connectionReceiver = new BaseLinkProvider.ConnectionReceiver() {
@Override
public void onConnectionReceived(NetworkPackage identityPackage, BaseComputerLink link) {
connectToPlugin();
}
@Override
public void onConnectionLost(BaseComputerLink link) {
}
};
@Override
protected void onDestroy() {
super.onDestroy();
BackgroundService.RunCommand(MprisActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
service.removeConnectionListener(connectionReceiver);
}
});
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.mpris_control);
final String deviceId = getIntent().getStringExtra("deviceId");
BackgroundService.RunCommand(MprisActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
service.addConnectionListener(connectionReceiver);
}
});
connectToPlugin();
findViewById(R.id.play_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BackgroundService.RunCommand(MprisActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
Device device = service.getDevice(deviceId);
MprisPlugin mpris = (MprisPlugin)device.getPlugin("plugin_mpris");
if (mpris == null) return;
mpris.sendAction("PlayPause");
}
});
}
});
findViewById(R.id.prev_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BackgroundService.RunCommand(MprisActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
Device device = service.getDevice(deviceId);
MprisPlugin mpris = (MprisPlugin)device.getPlugin("plugin_mpris");
if (mpris == null) return;
mpris.sendAction("Previous");
}
});
}
});
findViewById(R.id.next_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BackgroundService.RunCommand(MprisActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
Device device = service.getDevice(deviceId);
MprisPlugin mpris = (MprisPlugin)device.getPlugin("plugin_mpris");
if (mpris == null) return;
mpris.sendAction("Next");
}
});
}
});
((SeekBar)findViewById(R.id.volume_seek)).setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {
@Override
public void onProgressChanged(SeekBar seekBar, int i, boolean b) { }
@Override
public void onStartTrackingTouch(SeekBar seekBar) { }
@Override
public void onStopTrackingTouch(final SeekBar seekBar) {
BackgroundService.RunCommand(MprisActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
Device device = service.getDevice(deviceId);
MprisPlugin mpris = (MprisPlugin) device.getPlugin("plugin_mpris");
if (mpris == null) return;
mpris.setVolume(seekBar.getProgress());
}
});
}
});
}
}

View File

@@ -1,217 +0,0 @@
package org.kde.kdeconnect.Plugins.MprisPlugin;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.content.Intent;
import android.graphics.drawable.Drawable;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.widget.Button;
import org.kde.kdeconnect.NetworkPackage;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect_tp.R;
import java.util.ArrayList;
public class MprisPlugin extends Plugin {
private String currentSong = "";
private int volume = 50;
private Handler playerStatusUpdated = null;
private ArrayList<String> playerList = new ArrayList<String>();
private Handler playerListUpdated = null;
private String player = "";
private boolean playing = false;
/*static {
PluginFactory.registerPlugin(MprisPlugin.class);
}*/
@Override
public String getPluginName() {
return "plugin_mpris";
}
@Override
public String getDisplayName() {
return context.getResources().getString(R.string.pref_plugin_mpris);
}
@Override
public String getDescription() {
return context.getResources().getString(R.string.pref_plugin_mpris_desc);
}
@Override
public Drawable getIcon() {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean isEnabledByDefault() {
return true;
}
@Override
public boolean onCreate() {
requestPlayerList();
return true;
}
@Override
public void onDestroy() {
playerList.clear();
}
public void sendAction(String s) {
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_MPRIS);
np.set("player",player);
np.set("action",s);
device.sendPackage(np);
}
public void setVolume(int volume) {
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_MPRIS);
np.set("player",player);
np.set("setVolume",volume);
device.sendPackage(np);
}
@Override
public boolean onPackageReceived(NetworkPackage np) {
if (!np.getType().equals(NetworkPackage.PACKAGE_TYPE_MPRIS)) return false;
if (np.has("nowPlaying") || np.has("volume") || np.has("isPlaying")) {
if (np.getString("player").equals(player)) {
currentSong = np.getString("nowPlaying", currentSong);
volume = np.getInt("volume", volume);
playing = np.getBoolean("isPlaying", playing);
if (playerStatusUpdated != null) {
try {
playerStatusUpdated.dispatchMessage(new Message());
} catch(Exception e) {
e.printStackTrace();
Log.e("MprisControl","Exception");
playerStatusUpdated = null;
}
}
}
}
if (np.has("playerList")) {
ArrayList<String> newPlayerList = np.getStringList("playerList");
boolean equals = false;
if (newPlayerList.size() == playerList.size()) {
equals = true;
for (int i=0; i<newPlayerList.size(); i++) {
if (!newPlayerList.get(i).equals(playerList.get(i))) {
equals = false;
break;
}
}
}
if (!equals) {
playerList = newPlayerList;
if (playerListUpdated != null) {
try {
playerListUpdated.dispatchMessage(new Message());
} catch(Exception e) {
e.printStackTrace();
Log.e("MprisControl","Exception");
playerListUpdated = null;
}
}
}
}
return true;
}
public void setPlayerStatusUpdatedHandler(Handler h) {
playerStatusUpdated = h;
if (currentSong.length() > 0) h.dispatchMessage(new Message());
requestPlayerStatus();
}
public String getCurrentSong() {
return currentSong;
}
public void setPlayerListUpdatedHandler(Handler h) {
playerListUpdated = h;
if (playerList.size() > 0) h.dispatchMessage(new Message());
requestPlayerList();
}
public ArrayList<String> getPlayerList() {
return playerList;
}
public void setPlayer(String s) {
player = s;
currentSong = "";
volume = 50;
playing = false;
if (playerStatusUpdated != null) {
try {
playerStatusUpdated.dispatchMessage(new Message());
} catch(Exception e) {
e.printStackTrace();
Log.e("MprisControl","Exception");
playerStatusUpdated = null;
}
}
requestPlayerStatus();
}
public int getVolume() {
return volume;
}
public boolean isPlaying() {
return playing;
}
private void requestPlayerList() {
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_MPRIS);
np.set("requestPlayerList",true);
device.sendPackage(np);
}
private void requestPlayerStatus() {
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_MPRIS);
np.set("player",player);
np.set("requestNowPlaying",true);
np.set("requestVolume",true);
device.sendPackage(np);
}
@Override
public AlertDialog getErrorDialog(Context baseContext) {
return null;
}
@Override
public Button getInterfaceButton(final Activity activity) {
Button b = new Button(activity);
b.setText(R.string.open_mpris_controls);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent = new Intent(activity, MprisActivity.class);
intent.putExtra("deviceId", device.getDeviceId());
activity.startActivity(intent);
}
});
return b;
}
}

View File

@@ -1,76 +0,0 @@
package org.kde.kdeconnect.Plugins.NotificationsPlugin;
import android.app.Service;
import android.content.Context;
import android.content.Intent;
import android.service.notification.NotificationListenerService;
import android.service.notification.StatusBarNotification;
import android.util.Log;
import java.util.ArrayList;
public class NotificationReceiver extends NotificationListenerService {
public interface NotificationListener {
void onNotificationPosted(StatusBarNotification statusBarNotification);
void onNotificationRemoved(StatusBarNotification statusBarNotification);
}
private ArrayList<NotificationListener> listeners = new ArrayList<NotificationListener>();
public void addListener(NotificationListener listener) {
listeners.add(listener);
}
public void removeListener(NotificationListener listener) {
listeners.remove(listener);
}
@Override
public void onNotificationPosted(StatusBarNotification statusBarNotification) {
Log.i("NotificationReceiver.onNotificationPosted","listeners: " + listeners.size());
for(NotificationListener listener : listeners) {
listener.onNotificationPosted(statusBarNotification);
}
}
@Override
public void onNotificationRemoved(StatusBarNotification statusBarNotification) {
for(NotificationListener listener : listeners) {
listener.onNotificationRemoved(statusBarNotification);
}
}
//To use the service from the outer (name)space
//This will be called for each intent launch, even if the service is already started and is reused
@Override
public int onStartCommand(Intent intent, int flags, int startId) {
Log.i("NotificationReceiver", "onStartCommand");
for (InstanceCallback c : callbacks) {
c.onServiceStart(this);
}
callbacks.clear();
return Service.START_STICKY;
}
public interface InstanceCallback {
void onServiceStart(NotificationReceiver service);
}
private static ArrayList<InstanceCallback> callbacks = new ArrayList<InstanceCallback>();
public static void Start(Context c) {
RunCommand(c, null);
}
public static void RunCommand(Context c, final InstanceCallback callback) {
if (callback != null) callbacks.add(callback);
Intent serviceIntent = new Intent(c, NotificationReceiver.class);
c.startService(serviceIntent);
}
}

View File

@@ -1,317 +0,0 @@
package org.kde.kdeconnect.Plugins.NotificationsPlugin;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Notification;
import android.content.Context;
import android.content.DialogInterface;
import android.content.Intent;
import android.content.pm.PackageManager;
import android.graphics.Bitmap;
import android.graphics.drawable.Drawable;
import android.os.Build;
import android.provider.Settings;
import android.service.notification.StatusBarNotification;
import android.util.Base64;
import android.util.Log;
import android.widget.Button;
import org.kde.kdeconnect.Helpers.AppsHelper;
import org.kde.kdeconnect.Helpers.ImagesHelper;
import org.kde.kdeconnect.NetworkPackage;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect_tp.R;
import java.io.ByteArrayOutputStream;
import java.nio.charset.Charset;
public class NotificationsPlugin extends Plugin implements NotificationReceiver.NotificationListener {
/*static {
PluginFactory.registerPlugin(NotificationsPlugin.class);
}*/
@Override
public String getPluginName() {
return "plugin_notifications";
}
@Override
public String getDisplayName() {
return context.getResources().getString(R.string.pref_plugin_notifications);
}
@Override
public String getDescription() {
return context.getResources().getString(R.string.pref_plugin_notifications_desc);
}
@Override
public Drawable getIcon() {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean isEnabledByDefault() {
return true;
}
static class NotificationId {
String packageName;
String tag;
int id;
public static NotificationId fromNotification(StatusBarNotification statusBarNotification) {
NotificationId nid = new NotificationId();
nid.packageName = statusBarNotification.getPackageName();
nid.tag = statusBarNotification.getTag();
nid.id = statusBarNotification.getId();
return nid;
}
public static NotificationId unserialize(String s) {
NotificationId nid = new NotificationId();
int first = s.indexOf(':');
int last = s.lastIndexOf(':');
nid.packageName = s.substring(0, first);
nid.tag = s.substring(first+1, last);
if (nid.tag.length() == 0) nid.tag = null;
String idString = s.substring(last+1);
try {
nid.id = Integer.parseInt(idString);
} catch(Exception e) {
nid.id = 0;
}
//Log.e("NotificationId","unserialize: " + nid.packageName+ ", "+nid.tag+ ", "+nid.id);
return nid;
}
public String serialize() {
//Log.e("NotificationId","serialize: " + packageName+ ", "+tag+ ", "+id);
String safePackageName = (packageName == null)? "" : packageName;
String safeTag = (tag == null)? "" : tag;
return safePackageName+":"+safeTag+":"+id;
}
public String getPackageName() {
return packageName;
}
public String getTag() {
return tag;
}
public int getId() {
return id;
}
@Override
public boolean equals(Object o) {
if (!(o instanceof NotificationId)) return false;
NotificationId other = (NotificationId)o;
return other.getTag().equals(tag) && other.getId() == id && other.getPackageName().equals(packageName);
}
}
@Override
public boolean onCreate() {
if (Build.VERSION.SDK_INT < 18) return false;
//Check for permissions
String notificationListenerList = Settings.Secure.getString(context.getContentResolver(), "enabled_notification_listeners");
if (notificationListenerList != null && notificationListenerList.contains(context.getPackageName())) {
NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() {
@Override
public void onServiceStart(NotificationReceiver service) {
try {
service.addListener(NotificationsPlugin.this);
/*
StatusBarNotification[] notifications = service.getActiveNotifications();
for (StatusBarNotification notification : notifications) {
onNotificationPosted(notification);
}
*/
} catch(Exception e) {
e.printStackTrace();
Log.e("NotificationsPlugin","Exception");
}
}
});
return true;
} else {
return false;
}
}
@Override
public void onDestroy() {
NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() {
@Override
public void onServiceStart(NotificationReceiver service) {
service.removeListener(NotificationsPlugin.this);
}
});
}
@Override
public void onNotificationRemoved(StatusBarNotification statusBarNotification) {
NotificationId id = NotificationId.fromNotification(statusBarNotification);
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_NOTIFICATION);
np.set("id", id.serialize());
np.set("isCancel", true);
device.sendPackage(np);
}
@Override
public void onNotificationPosted(StatusBarNotification statusBarNotification) {
onNotificationPosted(statusBarNotification, false);
}
public void onNotificationPosted(StatusBarNotification statusBarNotification, boolean requestAnswer) {
Notification notification = statusBarNotification.getNotification();
NotificationId id = NotificationId.fromNotification(statusBarNotification);
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_NOTIFICATION);
String packageName = statusBarNotification.getPackageName();
String appName = AppsHelper.appNameLookup(context, packageName);
try {
Drawable drawableAppIcon = AppsHelper.appIconLookup(context, packageName);
Bitmap appIcon = ImagesHelper.drawableToBitmap(drawableAppIcon);
ByteArrayOutputStream outStream = new ByteArrayOutputStream();
appIcon.compress(Bitmap.CompressFormat.PNG, 90, outStream);
byte[] bitmapData = outStream.toByteArray();
byte[] serializedBitmapData = Base64.encode(bitmapData, Base64.NO_WRAP);
String stringBitmapData = new String(serializedBitmapData, Charset.defaultCharset());
//The icon is super big, better sending it as a file transfer when we support that
//np.set("base64icon", stringBitmapData);
} catch(Exception e) {
e.printStackTrace();
Log.e("NotificationsPlugin","Error retrieving icon");
}
np.set("id", id.serialize());
np.set("appName", appName == null? packageName : appName);
np.set("isClearable", statusBarNotification.isClearable());
np.set("ticker", notification.tickerText.toString());
np.set("time", Long.toString(statusBarNotification.getPostTime()));
if (requestAnswer) np.set("requestAnswer", true);
device.sendPackage(np);
}
@Override
public boolean onPackageReceived(final NetworkPackage np) {
if (!np.getType().equals(NetworkPackage.PACKAGE_TYPE_NOTIFICATION)) return false;
if (np.getBoolean("request")) {
NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() {
private void sendCurrentNotifications(NotificationReceiver service) {
StatusBarNotification[] notifications = service.getActiveNotifications();
for (StatusBarNotification notification : notifications) {
onNotificationPosted(notification, true);
}
}
@Override
public void onServiceStart(final NotificationReceiver service) {
try {
//If service just started, this call will throw an exception because the answer is not ready yet
sendCurrentNotifications(service);
} catch(Exception e) {
Log.e("onPackageReceived","Error when answering 'request': Service failed to start. Retrying in 100ms...");
new Thread(new Runnable() {
@Override
public void run() {
try {
Thread.sleep(100);
Log.e("onPackageReceived","Error when answering 'request': Service failed to start. Retrying...");
sendCurrentNotifications(service);
} catch (Exception e) {
Log.e("onPackageReceived","Error when answering 'request': Service failed to start twice!");
e.printStackTrace();
}
}
}).start();
}
}
});
} else if (np.has("cancel")) {
NotificationReceiver.RunCommand(context, new NotificationReceiver.InstanceCallback() {
@Override
public void onServiceStart(NotificationReceiver service) {
NotificationId dismissedId = NotificationId.unserialize(np.getString("cancel"));
service.cancelNotification(dismissedId.getPackageName(), dismissedId.getTag(), dismissedId.getId());
}
});
} else {
Log.w("NotificationsPlugin","Nothing to do");
}
return true;
}
@Override
public AlertDialog getErrorDialog(final Context baseContext) {
if (Build.VERSION.SDK_INT < 18) {
return new AlertDialog.Builder(baseContext)
.setTitle(R.string.pref_plugin_notifications)
.setMessage(R.string.plugin_not_available)
.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
}
})
.create();
} else {
return new AlertDialog.Builder(baseContext)
.setTitle(R.string.pref_plugin_notifications)
.setMessage(R.string.no_permissions)
.setPositiveButton(R.string.open_settings, new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
Intent intent = new Intent("android.settings.ACTION_NOTIFICATION_LISTENER_SETTINGS");
baseContext.startActivity(intent);
}
})
.setNegativeButton(R.string.cancel,new DialogInterface.OnClickListener() {
@Override
public void onClick(DialogInterface dialogInterface, int i) {
//Do nothing
}
})
.create();
}
}
@Override
public Button getInterfaceButton(Activity activity) {
return null;
}
}

View File

@@ -1,101 +0,0 @@
package org.kde.kdeconnect.Plugins.PingPlugin;
import android.app.Activity;
import android.app.AlertDialog;
import android.app.Notification;
import android.app.NotificationManager;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.support.v4.app.NotificationCompat;
import android.view.View;
import android.widget.Button;
import org.kde.kdeconnect.NetworkPackage;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect_tp.R;
public class PingPlugin extends Plugin {
/*static {
PluginFactory.registerPlugin(PingPlugin.class);
}*/
@Override
public String getPluginName() {
return "plugin_ping";
}
@Override
public String getDisplayName() {
return context.getResources().getString(R.string.pref_plugin_ping);
}
@Override
public String getDescription() {
return context.getResources().getString(R.string.pref_plugin_ping_desc);
}
@Override
public Drawable getIcon() {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean isEnabledByDefault() {
return true;
}
@Override
public boolean onCreate() {
return true;
}
@Override
public void onDestroy() {
}
@Override
public boolean onPackageReceived(NetworkPackage np) {
//Log.e("PingPackageReceiver", "onPackageReceived");
if (np.getType().equals(NetworkPackage.PACKAGE_TYPE_PING)) {
//Log.e("PingPackageReceiver", "was a ping!");
Notification noti = new NotificationCompat.Builder(context)
.setContentTitle(device.getName())
.setContentText("Ping!")
.setTicker("Ping!")
.setSmallIcon(android.R.drawable.ic_dialog_alert)
.setAutoCancel(true)
.setDefaults(Notification.DEFAULT_SOUND)
.build();
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.notify(42 /*a unique id to create only one notification*/, noti);
return true;
}
return false;
}
@Override
public AlertDialog getErrorDialog(Context baseContext) {
return null;
}
@Override
public Button getInterfaceButton(Activity activity) {
Button b = new Button(activity);
b.setText(R.string.send_ping);
b.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
device.sendPackage(new NetworkPackage(NetworkPackage.PACKAGE_TYPE_PING));
}
});
return b;
}
}

View File

@@ -1,87 +0,0 @@
package org.kde.kdeconnect.Plugins;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.widget.Button;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.NetworkPackage;
public abstract class Plugin {
protected Device device;
protected Context context;
public void setContext(Context context, Device device) {
this.device = device;
this.context = context;
}
/**
* Return the internal plugin name, that will be used as a
* unique key to distinguish it. This function can not access
* this.context nor this.device.
*/
public abstract String getPluginName();
/**
* Return the human-readable plugin name. This function can
* access this.context to provide translated text.
*/
public abstract String getDisplayName();
/**
* Return the human-readable description of this plugin. This
* function can access this.context to provide translated text.
*/
public abstract String getDescription();
/**
* Return an icon associated to this plugin. This function can
* access this.context to load the image from resources.
*/
public abstract Drawable getIcon();
/**
* Return true if this plugin should be enabled on new devices.
* This function can access this.context and perform compatibility
* checks with the Android version, but can not access this.device.
*/
public abstract boolean isEnabledByDefault();
/**
* Initialize the listeners and structures in your plugin.
* Should return true if initialization was successful.
*/
public abstract boolean onCreate();
/**
* Finish any ongoing operations, remove listeners... so
* this object could be garbage collected.
*/
public abstract void onDestroy();
/**
* If onCreate returns false, should create a dialog explaining
* the problem (and how to fix it, if possible) to the user.
*/
public abstract boolean onPackageReceived(NetworkPackage np);
/**
* If onCreate returns false, should create a dialog explaining
* the problem (and how to fix it, if possible) to the user.
*/
public abstract AlertDialog getErrorDialog(Context baseContext);
/**
* Creates a button that will be displayed in the user interface
* It can open an activity or perform any other action that the
* plugin would wants to expose to the user. Return null if no
* button should be displayed.
*/
public abstract Button getInterfaceButton(Activity activity);
}

View File

@@ -1,123 +0,0 @@
package org.kde.kdeconnect.Plugins;
import android.content.Context;
import android.graphics.drawable.Drawable;
import android.util.Log;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.Plugins.BatteryPlugin.BatteryPlugin;
import org.kde.kdeconnect.Plugins.ClibpoardPlugin.ClipboardPlugin;
import org.kde.kdeconnect.Plugins.MprisPlugin.MprisPlugin;
import org.kde.kdeconnect.Plugins.NotificationsPlugin.NotificationsPlugin;
import org.kde.kdeconnect.Plugins.PingPlugin.PingPlugin;
import org.kde.kdeconnect.Plugins.TelephonyPlugin.TelephonyPlugin;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;
public class PluginFactory {
public static class PluginInfo {
public PluginInfo(String pluginName, String displayName, String description, Drawable icon, boolean enabledByDefault) {
this.pluginName = pluginName;
this.displayName = displayName;
this.description = description;
this.icon = icon;
this.enabledByDefault = enabledByDefault;
}
public String getPluginName() {
return pluginName;
}
public String getDisplayName() {
return displayName;
}
public String getDescription() {
return description;
}
public Drawable getIcon() {
return icon;
}
public boolean isEnabledByDefault() {
return enabledByDefault;
}
private String pluginName;
private String displayName;
private String description;
private final Drawable icon;
private boolean enabledByDefault;
}
private static final Map<String, Class> availablePlugins = new TreeMap<String, Class>();
private static final Map<String, PluginInfo> availablePluginsInfo = new TreeMap<String, PluginInfo>();
static {
//TODO: Avoid this factory having to know every plugin
PluginFactory.registerPlugin(TelephonyPlugin.class);
PluginFactory.registerPlugin(PingPlugin.class);
PluginFactory.registerPlugin(MprisPlugin.class);
PluginFactory.registerPlugin(ClipboardPlugin.class);
//PluginFactory.registerPlugin(BatteryPlugin.class);
PluginFactory.registerPlugin(NotificationsPlugin.class);
}
public static PluginInfo getPluginInfo(Context context, String pluginName) {
PluginInfo info = availablePluginsInfo.get(pluginName); //Is it cached?
if (info != null) return info;
try {
Plugin p = ((Plugin)availablePlugins.get(pluginName).newInstance());
p.setContext(context, null);
info = new PluginInfo(pluginName, p.getDisplayName(), p.getDescription(), p.getIcon(), p.isEnabledByDefault());
availablePluginsInfo.put(pluginName, info); //Cache it
return info;
} catch(Exception e) {
e.printStackTrace();
Log.e("PluginFactory","getPluginInfo exception");
return null;
}
}
public static Set<String> getAvailablePlugins() {
return availablePlugins.keySet();
}
public static Plugin instantiatePluginForDevice(Context context, String pluginName, Device device) {
Class c = availablePlugins.get(pluginName);
if (c == null) {
Log.e("PluginFactory", "Plugin not found: "+pluginName);
return null;
}
try {
Plugin plugin = (Plugin)c.newInstance();
plugin.setContext(context, device);
return plugin;
} catch(Exception e) {
e.printStackTrace();
Log.e("PluginFactory", "Could not instantiate plugin: "+pluginName);
return null;
}
}
public static void registerPlugin(Class pluginClass) {
try {
//I hate this but I need to create an instance because abstract static functions can't be declared
String pluginName = ((Plugin)pluginClass.newInstance()).getPluginName();
availablePlugins.put(pluginName, pluginClass);
} catch(Exception e) {
Log.e("PluginFactory","addPlugin exception");
e.printStackTrace();
}
}
}

View File

@@ -1,191 +0,0 @@
package org.kde.kdeconnect.Plugins.TelephonyPlugin;
import android.app.Activity;
import android.app.AlertDialog;
import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.content.IntentFilter;
import android.graphics.drawable.Drawable;
import android.os.Bundle;
import android.telephony.SmsMessage;
import android.telephony.TelephonyManager;
import android.util.Log;
import android.widget.Button;
import org.kde.kdeconnect.Helpers.ContactsHelper;
import org.kde.kdeconnect.NetworkPackage;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect_tp.R;
public class TelephonyPlugin extends Plugin {
/*static {
PluginFactory.registerPlugin(TelephonyPlugin.class);
}*/
@Override
public String getPluginName() {
return "plugin_telephony";
}
@Override
public String getDisplayName() {
return context.getResources().getString(R.string.pref_plugin_telephony);
}
@Override
public String getDescription() {
return context.getResources().getString(R.string.pref_plugin_telephony_desc);
}
@Override
public Drawable getIcon() {
return context.getResources().getDrawable(R.drawable.icon);
}
@Override
public boolean isEnabledByDefault() {
return true;
}
private BroadcastReceiver receiver = new BroadcastReceiver() {
@Override
public void onReceive(Context context, Intent intent) {
String action = intent.getAction();
//Log.e("TelephonyPlugin","Telephony event: " + action);
if("android.provider.Telephony.SMS_RECEIVED".equals(action)) {
final Bundle bundle = intent.getExtras();
if (bundle == null) return;
final Object[] pdus = (Object[]) bundle.get("pdus");
for (Object pdu : pdus) {
SmsMessage message = SmsMessage.createFromPdu((byte[])pdu);
smsBroadcastReceived(message);
}
} else if (TelephonyManager.ACTION_PHONE_STATE_CHANGED.equals(action)) {
String state = intent.getStringExtra(TelephonyManager.EXTRA_STATE);
int intState = TelephonyManager.CALL_STATE_IDLE;
if (state.equals(TelephonyManager.EXTRA_STATE_RINGING))
intState = TelephonyManager.CALL_STATE_RINGING;
else if (state.equals(TelephonyManager.EXTRA_STATE_OFFHOOK))
intState = TelephonyManager.CALL_STATE_OFFHOOK;
String number = intent.getStringExtra(Intent.EXTRA_PHONE_NUMBER);
if (number == null) number = intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER);
final int finalIntState = intState;
final String finalNumber = number;
callBroadcastReceived(finalIntState, finalNumber);
}
}
};
private int lastState = TelephonyManager.CALL_STATE_IDLE;
private NetworkPackage lastPackage = null;
public void callBroadcastReceived(int state, String phoneNumber) {
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_TELEPHONY);
if (phoneNumber != null) {
phoneNumber = ContactsHelper.phoneNumberLookup(context,phoneNumber);
np.set("phoneNumber", phoneNumber);
}
switch (state) {
case TelephonyManager.CALL_STATE_RINGING:
np.set("event", "ringing");
device.sendPackage(np);
break;
case TelephonyManager.CALL_STATE_OFFHOOK: //Ongoing call
np.set("event", "talking");
device.sendPackage(np);
break;
case TelephonyManager.CALL_STATE_IDLE:
if (lastState != TelephonyManager.CALL_STATE_IDLE && lastPackage != null) {
//Resend a cancel of the last event (can either be "ringing" or "talking")
lastPackage.set("isCancel","true");
device.sendPackage(lastPackage);
//Emit a missed call notification if needed
if (lastState == TelephonyManager.CALL_STATE_RINGING) {
np.set("event","missedCall");
np.set("phoneNumber", lastPackage.getString("phoneNumber",null));
device.sendPackage(np);
}
}
break;
}
lastPackage = np;
lastState = state;
}
public void smsBroadcastReceived(SmsMessage message) {
//Log.e("SmsBroadcastReceived", message.toString());
NetworkPackage np = new NetworkPackage(NetworkPackage.PACKAGE_TYPE_TELEPHONY);
np.set("event","sms");
String messageBody = message.getMessageBody();
if (messageBody != null) {
np.set("messageBody",messageBody);
}
String phoneNumber = message.getOriginatingAddress();
if (phoneNumber != null) {
phoneNumber = ContactsHelper.phoneNumberLookup(context, phoneNumber);
np.set("phoneNumber",phoneNumber);
}
device.sendPackage(np);
}
@Override
public boolean onCreate() {
IntentFilter filter = new IntentFilter("android.provider.Telephony.SMS_RECEIVED");
filter.addAction(TelephonyManager.ACTION_PHONE_STATE_CHANGED);
context.registerReceiver(receiver, filter);
return true;
}
@Override
public void onDestroy() {
context.unregisterReceiver(receiver);
}
@Override
public boolean onPackageReceived(NetworkPackage np) {
//Do nothing
return false;
}
@Override
public AlertDialog getErrorDialog(Context baseContext) {
return null;
}
@Override
public Button getInterfaceButton(Activity activity) {
return null;
}
}

View File

@@ -1,148 +0,0 @@
package org.kde.kdeconnect.UserInterface;
import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ArrayAdapter;
import android.widget.Button;
import android.widget.ListView;
import android.widget.TextView;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.Plugins.Plugin;
import org.kde.kdeconnect.UserInterface.List.ButtonItem;
import org.kde.kdeconnect.UserInterface.List.ListAdapter;
import org.kde.kdeconnect.UserInterface.List.SectionItem;
import org.kde.kdeconnect_tp.R;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
public class DeviceActivity extends ActionBarActivity {
private String deviceId;
private Device device;
private Device.PluginsChangedListener pluginsChangedListener = new Device.PluginsChangedListener() {
@Override
public void onPluginsChanged(final Device device) {
runOnUiThread(new Runnable() {
@Override
public void run() {
//Errors list
final HashMap<String, Plugin> failedPlugins = device.getFailedPlugins();
final String[] ids = failedPlugins.keySet().toArray(new String[failedPlugins.size()]);
String[] names = new String[failedPlugins.size()];
for(int i = 0; i < ids.length; i++) {
Plugin p = failedPlugins.get(ids[i]);
names[i] = p.getDisplayName();
}
ListView errorList = (ListView)findViewById(R.id.errors_list);
if (!failedPlugins.isEmpty() && errorList.getHeaderViewsCount() == 0) {
TextView header = new TextView(DeviceActivity.this);
header.setPadding(0,24,0,0);
header.setText(getResources().getString(R.string.plugins_failed_to_load));
errorList.addHeaderView(header);
}
errorList.setAdapter(new ArrayAdapter<String>(DeviceActivity.this, android.R.layout.simple_list_item_1, names));
errorList.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int position, long id) {
Plugin p = failedPlugins.get(ids[position - 1]); //Header is position 0, so we have to substract one
p.getErrorDialog(DeviceActivity.this).show();
}
});
//Buttons list
ArrayList<ListAdapter.Item> items = new ArrayList<ListAdapter.Item>();
final Collection<Plugin> plugins = device.getLoadedPlugins().values();
for (Plugin p : plugins) {
Button b = p.getInterfaceButton(DeviceActivity.this);
if (b != null) {
items.add(new SectionItem(p.getDisplayName()));
items.add(new ButtonItem(b));
}
}
ListView buttonsList = (ListView)findViewById(R.id.buttons_list);
buttonsList.setAdapter(new ListAdapter(DeviceActivity.this, items));
}
});
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_device);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE);
actionBar.setDisplayHomeAsUpEnabled(true);
deviceId = getIntent().getStringExtra("deviceId");
BackgroundService.RunCommand(DeviceActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
device = service.getDevice(deviceId);
setTitle(device.getName());
device.addPluginsChangedListener(pluginsChangedListener);
pluginsChangedListener.onPluginsChanged(device);
}
});
}
@Override
protected void onDestroy() {
BackgroundService.RunCommand(DeviceActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
Device device = service.getDevice(deviceId);
device.removePluginsChangedListener(pluginsChangedListener);
}
});
super.onDestroy();
}
@Override
public boolean onPrepareOptionsMenu(Menu menu) {
super.onPrepareOptionsMenu(menu);
menu.clear();
if (device.isPaired()) {
menu.add(R.string.device_menu_plugins).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem menuItem) {
Intent intent = new Intent(DeviceActivity.this, SettingsActivity.class);
intent.putExtra("deviceId", deviceId);
startActivity(intent);
return true;
}
});
menu.add(R.string.device_menu_unpair).setOnMenuItemClickListener(new MenuItem.OnMenuItemClickListener() {
@Override
public boolean onMenuItemClick(MenuItem menuItem) {
device.unpair();
finish();
return true;
}
});
return true;
} else {
return false;
}
}
}

View File

@@ -1,20 +0,0 @@
package org.kde.kdeconnect.UserInterface.List;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.Button;
public class ButtonItem implements ListAdapter.Item {
private final Button button;
public ButtonItem(Button b) {
this.button = b;
}
@Override
public View inflateView(LayoutInflater layoutInflater) {
return button;
}
}

View File

@@ -1,49 +0,0 @@
package org.kde.kdeconnect.UserInterface.List;
import android.app.Activity;
import android.content.Intent;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.UserInterface.DeviceActivity;
import org.kde.kdeconnect.UserInterface.PairActivity;
import org.kde.kdeconnect_tp.R;
public class DeviceItem implements ListAdapter.Item {
private final Device device;
private final Activity activity;
public DeviceItem(Activity activity, Device device) {
this.device = device;
this.activity = activity;
}
@Override
public View inflateView(LayoutInflater layoutInflater) {
View v = layoutInflater.inflate(R.layout.list_item_entry, null);
TextView titleView = (TextView)v.findViewById(R.id.list_item_entry_title);
if (titleView != null) titleView.setText(device.getName());
v.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
Intent intent;
if (device.isPaired()) {
intent = new Intent(activity, DeviceActivity.class);
} else {
intent = new Intent(activity, PairActivity.class);
}
intent.putExtra("deviceId", device.getDeviceId());
activity.startActivity(intent);
}
});
return v;
}
}

View File

@@ -1,33 +0,0 @@
package org.kde.kdeconnect.UserInterface.List;
import android.content.Context;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import java.util.ArrayList;
public class ListAdapter extends ArrayAdapter<ListAdapter.Item> {
public interface Item {
public View inflateView(LayoutInflater layoutInflater);
}
private ArrayList<Item> items;
private LayoutInflater layoutInflater;
public ListAdapter(Context context, ArrayList<Item> items) {
super(context, 0, items);
this.items = items;
layoutInflater = (LayoutInflater)context.getSystemService(Context.LAYOUT_INFLATER_SERVICE);
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
final Item i = items.get(position);
return i.inflateView(layoutInflater);
}
}

View File

@@ -1,37 +0,0 @@
package org.kde.kdeconnect.UserInterface.List;
import android.view.LayoutInflater;
import android.view.View;
import android.widget.TextView;
import org.kde.kdeconnect_tp.R;
public class SectionItem implements ListAdapter.Item {
private final String title;
public boolean isEmpty;
public SectionItem(String title) {
this.title = title;
}
@Override
public View inflateView(LayoutInflater layoutInflater) {
View v = layoutInflater.inflate(R.layout.list_item_category, null);
v.setOnClickListener(null);
v.setOnLongClickListener(null);
v.setLongClickable(false);
TextView sectionView = (TextView) v.findViewById(R.id.list_item_category_text);
sectionView.setText(title);
if (isEmpty) {
v.findViewById(R.id.list_item_category_empty_placeholder).setVisibility(View.VISIBLE);
}
return v;
}
}

View File

@@ -1,189 +0,0 @@
package org.kde.kdeconnect.UserInterface;
import android.content.res.Resources;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.util.Log;
import android.view.Menu;
import android.view.MenuInflater;
import android.view.MenuItem;
import android.view.View;
import android.widget.AdapterView;
import android.widget.ListView;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.UserInterface.List.DeviceItem;
import org.kde.kdeconnect.UserInterface.List.ListAdapter;
import org.kde.kdeconnect.UserInterface.List.SectionItem;
import org.kde.kdeconnect_tp.R;
import java.util.ArrayList;
import java.util.Collection;
public class MainActivity extends ActionBarActivity {
//
// Action bar
//
private MenuItem menuProgress;
@Override
public boolean onCreateOptionsMenu(Menu menu) {
MenuInflater inflater = getMenuInflater();
inflater.inflate(R.menu.main, menu);
menuProgress = menu.findItem(R.id.menu_progress);
return true;
}
@Override
public boolean onOptionsItemSelected(final MenuItem item) {
switch (item.getItemId()) {
case R.id.menu_refresh:
updateComputerList();
BackgroundService.RunCommand(MainActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
service.onNetworkChange();
}
});
item.setVisible(false);
menuProgress.setVisible(true);
new Thread(new Runnable() {
@Override
public void run() {
try { Thread.sleep(1500); } catch (InterruptedException e) { }
runOnUiThread(new Runnable() {
@Override
public void run() {
menuProgress.setVisible(false);
item.setVisible(true);
}
});
}
}).start();
break;
default:
break;
}
return true;
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_main);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE | ActionBar.DISPLAY_SHOW_CUSTOM);
}
//
// Device list
//
void updateComputerList() {
BackgroundService.RunCommand(MainActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(final BackgroundService service) {
Collection<Device> devices = service.getDevices().values();
final ArrayList<ListAdapter.Item> items = new ArrayList<ListAdapter.Item>();
SectionItem section;
Resources res = getResources();
section = new SectionItem(res.getString(R.string.category_connected_devices));
section.isEmpty = true;
items.add(section);
for(Device d : devices) {
if (d.isReachable() && d.isPaired()) {
items.add(new DeviceItem(MainActivity.this, d));
section.isEmpty = false;
}
}
section = new SectionItem(res.getString(R.string.category_not_paired_devices));
section.isEmpty = true;
items.add(section);
for(Device d : devices) {
if (d.isReachable() && !d.isPaired()) {
items.add(new DeviceItem(MainActivity.this, d));
section.isEmpty = false;
}
}
section = new SectionItem(res.getString(R.string.category_remembered_devices));
section.isEmpty = true;
items.add(section);
for(Device d : devices) {
if (!d.isReachable() && d.isPaired()) {
items.add(new DeviceItem(MainActivity.this, d));
section.isEmpty = false;
}
}
if (section.isEmpty) {
items.remove(items.size()-1); //Remove section
}
runOnUiThread(new Runnable() {
@Override
public void run() {
ListView list = (ListView)findViewById(R.id.listView1);
list.setAdapter(new ListAdapter(MainActivity.this, items));
list.setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
view.callOnClick();
}
});
}
});
}
});
}
@Override
protected void onStart() {
super.onStart();
BackgroundService.RunCommand(MainActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
service.onNetworkChange();
service.setDeviceListChangedCallback(new BackgroundService.DeviceListChangedCallback() {
@Override
public void onDeviceListChanged() {
updateComputerList();
}
});
}
});
}
@Override
protected void onStop() {
BackgroundService.RunCommand(MainActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
service.setDeviceListChangedCallback(null);
}
});
super.onStop();
}
@Override
protected void onResume() {
super.onResume();
updateComputerList();
}
}

View File

@@ -1,148 +0,0 @@
package org.kde.kdeconnect.UserInterface;
import android.app.NotificationManager;
import android.content.Context;
import android.os.Bundle;
import android.support.v7.app.ActionBar;
import android.support.v7.app.ActionBarActivity;
import android.view.View;
import android.widget.Button;
import android.widget.TextView;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect_tp.R;
public class PairActivity extends ActionBarActivity {
private String deviceId;
private Device device = null;
private Device.PairingCallback pairingCallback = new Device.PairingCallback() {
@Override
public void incomingRequest() {
runOnUiThread(new Runnable() {
@Override
public void run() {
((TextView) findViewById(R.id.pair_message)).setText(R.string.pair_requested);
findViewById(R.id.pair_progress).setVisibility(View.GONE);
findViewById(R.id.pair_button).setVisibility(View.GONE);
findViewById(R.id.pair_request).setVisibility(View.VISIBLE);
}
});
NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(device.getNotificationId());
}
@Override
public void pairingSuccessful() {
finish();
}
@Override
public void pairingFailed(final String error) {
runOnUiThread(new Runnable() {
@Override
public void run() {
((TextView) findViewById(R.id.pair_message)).setText(error);
findViewById(R.id.pair_progress).setVisibility(View.GONE);
findViewById(R.id.pair_button).setVisibility(View.VISIBLE);
findViewById(R.id.pair_request).setVisibility(View.GONE);
}
});
}
@Override
public void unpaired() {
}
};
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_pair);
ActionBar actionBar = getSupportActionBar();
actionBar.setDisplayOptions(ActionBar.DISPLAY_SHOW_HOME | ActionBar.DISPLAY_SHOW_TITLE);
actionBar.setDisplayHomeAsUpEnabled(true);
deviceId = getIntent().getStringExtra("deviceId");
BackgroundService.RunCommand(PairActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
device = service.getDevice(deviceId);
setTitle(device.getName());
NotificationManager notificationManager = (NotificationManager)getSystemService(Context.NOTIFICATION_SERVICE);
notificationManager.cancel(device.getNotificationId());
}
});
final Button pairButton = (Button)findViewById(R.id.pair_button);
pairButton.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
pairButton.setVisibility(View.GONE);
((TextView) findViewById(R.id.pair_message)).setText("");
findViewById(R.id.pair_progress).setVisibility(View.VISIBLE);
BackgroundService.RunCommand(PairActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
device = service.getDevice(deviceId);
device.requestPairing();
}
});
}
});
findViewById(R.id.accept_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BackgroundService.RunCommand(PairActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
device.acceptPairing();
finish();
}
});
}
});
findViewById(R.id.reject_button).setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View view) {
BackgroundService.RunCommand(PairActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
device.rejectPairing();
finish();
}
});
}
});
}
@Override
protected void onStart() {
super.onStart();
BackgroundService.RunCommand(PairActivity.this, new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
device.addPairingCallback(pairingCallback);
}
});
}
@Override
protected void onStop() {
if (device != null) device.removePairingCallback(pairingCallback);
super.onStop();
}
}

View File

@@ -1,28 +0,0 @@
package org.kde.kdeconnect.UserInterface;
import android.content.Context;
import android.preference.Preference;
import android.util.Log;
import android.view.View;
import android.view.ViewGroup;
import android.widget.ArrayAdapter;
import java.util.ArrayList;
public class PreferenceListAdapter extends ArrayAdapter<Preference> {
private ArrayList<Preference> localList;
public PreferenceListAdapter(Context context, ArrayList<Preference> items) {
super(context,0, items);
localList = items;
}
@Override
public View getView(int position, View convertView, ViewGroup parent) {
Preference preference = localList.get(position);
return preference.getView(convertView, parent);
}
}

View File

@@ -1,70 +0,0 @@
package org.kde.kdeconnect.UserInterface;
import android.app.ListActivity;
import android.os.Bundle;
import android.preference.CheckBoxPreference;
import android.preference.Preference;
import android.util.Log;
import android.view.View;
import android.widget.AdapterView;
import org.kde.kdeconnect.BackgroundService;
import org.kde.kdeconnect.Device;
import org.kde.kdeconnect.Plugins.PluginFactory;
import java.util.ArrayList;
import java.util.Set;
public class SettingsActivity extends ListActivity {
@Override
public void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
final String deviceId = getIntent().getStringExtra("deviceId");
BackgroundService.RunCommand(getApplicationContext(), new BackgroundService.InstanceCallback() {
@Override
public void onServiceStart(BackgroundService service) {
final Device device = service.getDevice(deviceId);
Set<String> plugins = PluginFactory.getAvailablePlugins();
final ArrayList<Preference> preferences = new ArrayList<Preference>();
for (final String pluginName : plugins) {
CheckBoxPreference pref = new CheckBoxPreference(getBaseContext());
PluginFactory.PluginInfo info = PluginFactory.getPluginInfo(getBaseContext(), pluginName);
pref.setKey(pluginName);
pref.setTitle(info.getDisplayName());
pref.setSummary(info.getDescription());
pref.setChecked(device.isPluginEnabled(pluginName));
preferences.add(pref);
}
setListAdapter(new PreferenceListAdapter(SettingsActivity.this, preferences));
getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {
@Override
public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {
CheckBoxPreference pref = (CheckBoxPreference)preferences.get(i);
boolean enabled = device.isPluginEnabled(pref.getKey());
device.setPluginEnabled(pref.getKey(), !enabled);
pref.setChecked(!enabled);
getListAdapter().getView(i, view, null); //This will refresh the view (yes, this is the way to do it)
}
});
getListView().setPadding(16,16,16,16);
}
});
}
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

View File

@@ -1,14 +0,0 @@
<ListView xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity"
android:id="@+id/listView1"
android:addStatesFromChildren="true"
android:orientation="vertical">
</ListView>

View File

@@ -1,60 +0,0 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="@dimen/activity_horizontal_margin"
android:paddingRight="@dimen/activity_horizontal_margin"
android:paddingTop="@dimen/activity_vertical_margin"
android:paddingBottom="@dimen/activity_vertical_margin"
tools:context=".MainActivity"
android:orientation="vertical">
<ProgressBar
android:visibility="gone"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/pair_progress" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:text="@string/device_not_paired"
android:id="@+id/pair_message"
android:layout_gravity="left|center_vertical"
/>
<Button
android:id="@+id/pair_button"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:text="@string/request_pairing"
/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="gone"
android:id="@+id/pair_request"
android:layout_gravity="center">
<Button
android:id="@+id/accept_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/pairing_accept"
android:layout_weight="1"
/>
<Button
android:id="@+id/reject_button"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:text="@string/pairing_reject"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>

View File

@@ -1,23 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
<include
android:id="@+id/list_item_category_text"
layout="@android:layout/preference_category" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dip"
android:visibility="gone"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="@string/device_list_empty"
android:id="@+id/list_item_category_empty_placeholder"
android:layout_gravity="center" />
</LinearLayout>

View File

@@ -1,48 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:baselineAligned="false"
android:layout_height="wrap_content"
android:minHeight="?android:attr/listPreferredItemHeight"
android:gravity="center_vertical"
android:paddingRight="?android:attr/scrollbarSize">
<!--
<ImageView
android:id="@+id/list_item_entry_drawable"
android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:src="@android:drawable/ic_menu_preferences"
android:paddingLeft="9dp"/>
<RelativeLayout
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:layout_marginLeft="10dip"
android:layout_marginRight="6dip"
android:layout_marginTop="3dip"
android:layout_marginBottom="3dip"
android:layout_weight="0">
-->
<TextView android:id="@+id/list_item_entry_title"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:singleLine="true"
android:textAppearance="?android:attr/textAppearanceLarge"
android:ellipsize="marquee"
android:fadingEdge="horizontal" />
<!--
<TextView android:id="@+id/list_item_entry_summary"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/list_item_entry_title"
android:layout_alignLeft="@id/list_item_entry_title"
android:textAppearance="?android:attr/textAppearanceSmall"
android:singleLine="true"
android:textColor="?android:attr/textColorSecondary" />
</RelativeLayout>
-->
</LinearLayout>

View File

@@ -1,110 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:orientation="vertical"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/mpris_control_view"
android:gravity="center">
<Spinner
android:layout_width="200dip"
android:layout_height="wrap_content"
android:id="@+id/player_spinner"
android:layout_gravity="center"
/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceMedium"
android:id="@+id/now_playing_textview"
android:singleLine="true"
android:gravity="center"
android:padding="5dip"
android:layout_gravity="center"
/>
<ImageButton
android:layout_width="200dip"
android:layout_height="75dip"
android:id="@+id/play_button"
android:src="@android:drawable/ic_media_play"
android:contentDescription="@string/mpris_play"
android:layout_gravity="center"
/>
<LinearLayout
android:orientation="horizontal"
android:layout_width="200dip"
android:layout_height="70dip"
android:layout_gravity="center"
>
<ImageButton
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:id="@+id/prev_button"
android:src="@android:drawable/ic_media_rew"
android:contentDescription="@string/mpris_previous"
android:layout_weight="0.5"
/>
<ImageButton
android:layout_width="match_parent"
android:layout_height="fill_parent"
android:id="@+id/next_button"
android:src="@android:drawable/ic_media_ff"
android:layout_gravity="center"
android:contentDescription="@string/mpris_next"
android:layout_weight="0.5"
/>
</LinearLayout>
<LinearLayout
android:orientation="horizontal"
android:layout_width="200dip"
android:layout_height="70dip"
android:id="@+id/volume_layout"
android:layout_gravity="center">
<ImageView
android:layout_width="50dip"
android:layout_height="50dip"
android:layout_marginRight="10dip"
android:id="@+id/imageView"
android:layout_weight="1"
android:layout_gravity="left|center_vertical"
android:contentDescription="@string/mpris_volume"
android:src="@drawable/volume"
/>
<SeekBar
android:layout_width="fill_parent"
android:layout_height="wrap_content"
android:id="@+id/volume_seek"
android:layout_weight="1"
android:max="100"
android:layout_gravity="center"
/>
</LinearLayout>
<!--
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/pause_button"
android:src="@android:drawable/ic_media_pause"
android:layout_gravity="center"/>
<ImageButton
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/pause_button"
android:src="@android:drawable/ic_media_stop"
android:layout_gravity="center"/>
-->
</LinearLayout>

View File

@@ -1,21 +0,0 @@
<menu xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:kdeconnect="http://schemas.android.com/apk/res-auto">
<item
android:id="@+id/menu_refresh"
android:icon="@drawable/navigation_refresh"
android:orderInCategory="200"
kdeconnect:showAsAction="always"
android:title="@string/reconnect"
/>
<item
android:id="@+id/menu_progress"
android:icon="@drawable/navigation_refresh"
android:orderInCategory="200"
android:visible="false"
kdeconnect:showAsAction="always"
kdeconnect:actionViewClass="android.widget.ProgressBar"
/>
</menu>

View File

@@ -1,4 +0,0 @@
<resources>
<!-- Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw600dp devices (e.g. 7" tablets) here. -->
</resources>

View File

@@ -1,5 +0,0 @@
<resources>
<!-- Customize dimensions originally defined in res/values/dimens.xml (such as
screen margins) for sw720dp devices (e.g. 10" tablets) in landscape here. -->
<dimen name="activity_horizontal_margin">128dp</dimen>
</resources>

View File

@@ -1,11 +0,0 @@
<resources>
<!--
Base application theme for API 11+. This theme completely replaces
AppBaseTheme from res/values/styles.xml on API 11+ devices.
-->
<style name="AppBaseTheme" parent="android:Theme.Holo">
<!-- API 11 theme customizations can go here. -->
</style>
</resources>

View File

@@ -1,56 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<string name="pref_plugin_telephony">Telephony notifier</string>
<string name="pref_plugin_telephony_desc">Send notifications for SMS and calls</string>
<string name="pref_plugin_battery">Battery report</string>
<string name="pref_plugin_battery_desc">Periodically report battery status</string>
<string name="pref_plugin_clipboard">Clipboard sync</string>
<string name="pref_plugin_clipboard_desc">Share the clipboard content</string>
<string name="pref_plugin_mpris">Multimedia remote controls</string>
<string name="pref_plugin_mpris_desc">Control audio/video from your phone</string>
<string name="pref_plugin_ping">Ping</string>
<string name="pref_plugin_ping_desc">Send and receive pings</string>
<string name="pref_plugin_notifications">Notification sync</string>
<string name="pref_plugin_notifications_desc">Access your notifications from other devices</string>
<string name="plugin_not_available">This feature is not available in your Android version</string>
<string name="device_list_empty">No devices</string>
<string name="ok">OK</string>
<string name="cancel">Cancel</string>
<string name="open_settings">Open settings</string>
<string name="no_permissions">You need to grant permission to access notifications</string>
<string name="send_ping">Send ping</string>
<string name="open_mpris_controls">Open remote control</string>
<string name="category_connected_devices">Connected devices</string>
<string name="category_not_paired_devices">Not paired devices</string>
<string name="category_remembered_devices">Remembered devices</string>
<string name="plugins_failed_to_load">Plugins failed to load (tap for more info):</string>
<string name="device_menu_plugins">Select plugins</string>
<string name="device_menu_unpair">Unpair</string>
<string name="unknown_device">Unknown device</string>
<string name="error_not_reachable">Device not reachable</string>
<string name="error_already_requested">Pairing already requested</string>
<string name="error_already_paired">Device already paired</string>
<string name="error_could_not_send_package">Could not send package</string>
<string name="error_timed_out">Timed out</string>
<string name="error_canceled_by_user">Canceled by user</string>
<string name="error_canceled_by_other_peer">Canceled by other peer</string>
<string name="error_invalid_key">Invalid key received</string>
<string name="pair_requested">Pair requested</string>
<string name="pairing_request_from">Pairing request from %1s</string>
<string name="tap_to_answer">Tap to answer</string>
<string name="reconnect">Reconnect</string>
<string name="device_not_paired">Device not paired</string>
<string name="request_pairing">Request pairing</string>
<string name="pairing_accept">Accept</string>
<string name="pairing_reject">Reject</string>
<string name="device">Device</string>
<string name="pair_device">Pair device</string>
<string name="remote_control">Remote control</string>
<string name="settings">KDE Connect Settings</string>
<string name="mpris_play">Play</string>
<string name="mpris_previous">Previous</string>
<string name="mpris_next">Next</string>
<string name="mpris_volume">Volume</string>
</resources>

View File

@@ -1,20 +0,0 @@
<resources>
<!--
Base application theme, dependent on API level. This theme is replaced
by AppBaseTheme from res/values-vXX/styles.xml on newer devices.
-->
<style name="AppBaseTheme" parent="android:Theme">
<!--
Theme customizations available in newer API levels can go in
res/values-vXX/styles.xml, while customizations related to
backward-compatibility can go here.
-->
</style>
<!-- Application theme. -->
<style name="AppTheme" parent="AppBaseTheme">
<!-- All customizations that are NOT specific to a particular API-level can go here. -->
</style>
</resources>

29
README.md Normal file
View File

@@ -0,0 +1,29 @@
# KDE Connect - Android app
KDE Connect is a multi-platform app that allows your devices to communicate (eg: your phone and your computer).
## (Some) Features
- **Shared clipboard**: copy and paste between your phone and your computer (or any other device).
- **Notification sync**: Read and reply to your Android notifications from the desktop.
- **Share files and URLs** instantly from one device to another.
- **Multimedia remote control**: Use your phone as a remote for Linux media players.
- **Virtual touchpad**: Use your phone screen as your computer's touchpad and keyboard.
All this without wires, over the already existing WiFi network, and using TLS encryption.
## About this app
This is a native Android port of the KDE Connect Qt app. You will find a more complete readme about KDE Connect [here](https://github.com/KDE/kdeconnect-kde).
## How to install this app
You can install this app from the [Play Store](https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp) as well as [F-Droid](https://f-droid.org/repository/browse/?fdid=org.kde.kdeconnect_tp). Note you will also need to install the [desktop app](https://github.com/KDE/kdeconnect-kde) for it to work.
## Contributing
To contribute patches, use [KDE Connect's Phabricator](https://phabricator.kde.org/project/profile/159/). There you can also find a task list with stuff to do, and links to other relevant resources. It is a good idea to also subscribe to the [KDE Connect mailing list](https://mail.kde.org/mailman/listinfo/kdeconnect).
## License
[GNU GPL v2](https://www.gnu.org/licenses/gpl-2.0.html) and [GNU GPL v3](https://www.gnu.org/licenses/gpl-3.0.html)
If you are reading this from Github, you should know that this is just a mirror of the [KDE Project repo](https://projects.kde.org/projects/extragear/network/kdeconnect-android/repository/).

23
StaticMessages.sh Normal file
View File

@@ -0,0 +1,23 @@
#!/usr/bin/env bash
# The name of catalog we create (without the.pot extension), sourced from the scripty scripts
FILENAME="kdeconnect-android"
function export_pot_file # First parameter will be the path of the pot file we have to create, includes $FILENAME
{
potfile=$1
mkdir outdir
ANSI_COLORS_DISABLED=1 a2po export --android res/ --gettext outdir
mv outdir/template.pot $potfile
rm -rf outdir
}
function import_po_files # First parameter will be a path that will contain several .po files with the format LANG.po
{
podir=$1
ANSI_COLORS_DISABLED=1 a2po import --ignore-fuzzy --android res/ --gettext $podir
#Android doesn't support languages with an @
rm -r res/values-*@*
}

View File

@@ -1,2 +1,89 @@
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
//multiDexEnabled true
//testInstrumentationRunner "com.android.test.runner.MultiDexTestRunner"
}
dexOptions {
javaMaxHeapSize "2g"
}
compileOptions {
sourceCompatibility JavaVersion.VERSION_1_8
targetCompatibility JavaVersion.VERSION_1_8
}
sourceSets {
main {
manifest.srcFile 'AndroidManifest.xml'
java.srcDirs = ['src']
resources.srcDirs = ['resources']
res.srcDirs = ['res']
assets.srcDirs = ['assets']
}
androidTest {
java.srcDirs = ['tests']
}
}
packagingOptions {
pickFirst "META-INF/DEPENDENCIES"
pickFirst "META-INF/LICENSE"
pickFirst "META-INF/NOTICE"
pickFirst "META-INF/BCKEY.SF"
pickFirst "META-INF/BCKEY.DSA"
pickFirst "META-INF/INDEX.LIST"
}
lintOptions {
abortOnError false
checkReleaseBuilds false
}
buildTypes {
debug {
minifyEnabled false
useProguard false
}
release { //keep on 'release' for faster builds, set to 'all' when testing to make sure proguard is not deleting important stuff
minifyEnabled true
useProguard true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
repositories {
jcenter()
google()
}
implementation 'com.android.support:support-media-compat:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:preference-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.jakewharton:disklrucache:2.0.2' //For caching album art bitmaps
implementation 'org.apache.sshd:sshd-core:0.14.0'
implementation 'org.apache.mina:mina-core:2.0.19' //For some reason, makes sshd-core:0.14.0 work without NIO, which isn't available until Android 8+
implementation 'com.madgag.spongycastle:bcpkix-jdk15on:1.58.0.0' //For SSL certificate generation
// Testing
androidTestImplementation 'org.mockito:mockito-core:1.10.19'
androidTestImplementation 'com.google.dexmaker:dexmaker-mockito:1.1'// Because mockito has some problems with dex environment
androidTestImplementation 'org.skyscreamer:jsonassert:1.3.0'
testImplementation 'junit:junit:4.12'
}

Binary file not shown.

View File

@@ -1,6 +1,5 @@
#Wed Apr 10 15:27:10 PDT 2013
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
distributionUrl=http\://services.gradle.org/distributions/gradle-1.6-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-4.6-all.zip

10
gradlew vendored
View File

@@ -42,11 +42,6 @@ case "`uname`" in
;;
esac
# For Cygwin, ensure paths are in UNIX format before anything is touched.
if $cygwin ; then
[ -n "$JAVA_HOME" ] && JAVA_HOME=`cygpath --unix "$JAVA_HOME"`
fi
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
PRG="$0"
@@ -61,9 +56,9 @@ while [ -h "$PRG" ] ; do
fi
done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >&-
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >&-
cd "$SAVED" >/dev/null
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
@@ -114,6 +109,7 @@ fi
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`

880
icon.svg Normal file
View File

@@ -0,0 +1,880 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="274.43201"
height="274.43201"
id="svg2"
version="1.1"
inkscape:version="0.91 r"
sodipodi:docname="icon.svg"
inkscape:export-filename="/home/vaka/kdeconnect/kdeconnect-android/res/drawable-mdpi/icon.png"
inkscape:export-xdpi="15.741604"
inkscape:export-ydpi="15.741604">
<defs
id="defs4">
<linearGradient
inkscape:collect="always"
id="linearGradient4123">
<stop
style="stop-color:#b3b3b3;stop-opacity:1;"
offset="0"
id="stop4125" />
<stop
style="stop-color:#b3b3b3;stop-opacity:0;"
offset="1"
id="stop4127" />
</linearGradient>
<linearGradient
id="linearGradient4022">
<stop
style="stop-color:#e64f3e;stop-opacity:1;"
offset="0"
id="stop4024" />
<stop
style="stop-color:#e63e47;stop-opacity:1;"
offset="1"
id="stop4026" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient4303">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4305" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop4307" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient4276">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4278" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop4280" />
</linearGradient>
<linearGradient
id="linearGradient3994">
<stop
style="stop-color:#00d1c9;stop-opacity:1;"
offset="0"
id="stop3996" />
<stop
style="stop-color:#0081e3;stop-opacity:1;"
offset="1"
id="stop3998" />
</linearGradient>
<linearGradient
inkscape:collect="always"
id="linearGradient3939">
<stop
style="stop-color:#006eff;stop-opacity:1;"
offset="0"
id="stop3941" />
<stop
style="stop-color:#006eff;stop-opacity:0;"
offset="1"
id="stop3943" />
</linearGradient>
<linearGradient
id="linearGradient3872">
<stop
style="stop-color:#09e0ff;stop-opacity:1;"
offset="0"
id="stop3874" />
<stop
style="stop-color:#3d8fc2;stop-opacity:1;"
offset="1"
id="stop3876" />
</linearGradient>
<linearGradient
id="linearGradient3931">
<stop
style="stop-color:#202020;stop-opacity:1;"
offset="0"
id="stop3933" />
<stop
style="stop-color:#1a1a1a;stop-opacity:1;"
offset="1"
id="stop3935" />
</linearGradient>
<linearGradient
id="linearGradient3896">
<stop
style="stop-color:#cd602b;stop-opacity:1;"
offset="0"
id="stop3898" />
<stop
style="stop-color:#cd2b2b;stop-opacity:1;"
offset="1"
id="stop3900" />
</linearGradient>
<linearGradient
id="linearGradient4134">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4136" />
<stop
style="stop-color:#ececec;stop-opacity:1;"
offset="1"
id="stop4138" />
</linearGradient>
<linearGradient
id="linearGradient3916">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3918" />
<stop
style="stop-color:#e5e5e5;stop-opacity:1;"
offset="1"
id="stop3920" />
</linearGradient>
<linearGradient
id="linearGradient3838">
<stop
style="stop-color:#00ccff;stop-opacity:1;"
offset="0"
id="stop3840" />
<stop
id="stop3842"
offset="0.50000006"
style="stop-color:#db1cd8;stop-opacity:0.29374999;" />
<stop
style="stop-color:#00ccff;stop-opacity:0;"
offset="1"
id="stop3844" />
</linearGradient>
<linearGradient
id="linearGradient4622">
<stop
id="stop4624"
offset="0"
style="stop-color:#00ccff;stop-opacity:1;" />
<stop
style="stop-color:#db1cd8;stop-opacity:0.29374999;"
offset="0.62261778"
id="stop4626" />
<stop
id="stop4628"
offset="1"
style="stop-color:#00ccff;stop-opacity:0;" />
</linearGradient>
<linearGradient
id="linearGradient3883">
<stop
style="stop-color:#00ff6d;stop-opacity:1;"
offset="0"
id="stop3885" />
<stop
style="stop-color:#00ff9d;stop-opacity:0;"
offset="1"
id="stop3887" />
</linearGradient>
<linearGradient
id="linearGradient3875">
<stop
style="stop-color:#ff0061;stop-opacity:1;"
offset="0"
id="stop3877" />
<stop
style="stop-color:#ff0061;stop-opacity:0;"
offset="1"
id="stop3879" />
</linearGradient>
<linearGradient
id="linearGradient3814">
<stop
style="stop-color:#008d9c;stop-opacity:1;"
offset="0"
id="stop3816" />
<stop
style="stop-color:#008d9c;stop-opacity:0;"
offset="1"
id="stop3818" />
</linearGradient>
<linearGradient
id="linearGradient3769">
<stop
style="stop-color:#00ccff;stop-opacity:1;"
offset="0"
id="stop3771" />
<stop
id="stop3784"
offset="0.5"
style="stop-color:#db1cd8;stop-opacity:0.29374999;" />
<stop
style="stop-color:#00ccff;stop-opacity:0;"
offset="1"
id="stop3773" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3769-5"
id="linearGradient3775-0"
x1="145.67661"
y1="39.017067"
x2="145.67661"
y2="204.43738"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(1.0057861,0,0,1.0057861,-8.6127751,811.84018)" />
<linearGradient
id="linearGradient3769-5">
<stop
style="stop-color:#00ccff;stop-opacity:1;"
offset="0"
id="stop3771-1" />
<stop
id="stop3784-9"
offset="0.5"
style="stop-color:#db1cd8;stop-opacity:0.29374999;" />
<stop
style="stop-color:#00ccff;stop-opacity:0;"
offset="1"
id="stop3773-8" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3814-6"
id="linearGradient3820-1"
x1="140"
y1="922.36218"
x2="140"
y2="962.36218"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.92431917,0,0,0.92431917,33.590696,71.811258)" />
<linearGradient
id="linearGradient3814-6">
<stop
style="stop-color:#ff941f;stop-opacity:1;"
offset="0"
id="stop3816-1" />
<stop
style="stop-color:#ff6447;stop-opacity:0;"
offset="1"
id="stop3818-9" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3769-2"
id="linearGradient3775-2"
x1="145.67661"
y1="39.017067"
x2="145.67661"
y2="204.43738"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.87570243,0,0,0.87570243,-361.65303,924.58758)" />
<linearGradient
id="linearGradient3769-2">
<stop
style="stop-color:#00ccff;stop-opacity:1;"
offset="0"
id="stop3771-7" />
<stop
id="stop3784-4"
offset="0.5"
style="stop-color:#db1cd8;stop-opacity:0.29374999;" />
<stop
style="stop-color:#00ccff;stop-opacity:0;"
offset="1"
id="stop3773-6" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3814-3"
id="linearGradient3820-5"
x1="140"
y1="922.36218"
x2="140"
y2="962.36218"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.80477205,0,0,0.80477205,-324.90796,280.27054)" />
<linearGradient
id="linearGradient3814-3">
<stop
style="stop-color:#008d9c;stop-opacity:1;"
offset="0"
id="stop3816-3" />
<stop
style="stop-color:#008d9c;stop-opacity:0;"
offset="1"
id="stop3818-5" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3769-5-6"
id="radialGradient3858-6"
cx="154.9223"
cy="930.70764"
fx="154.9223"
fy="930.70764"
r="110.12753"
gradientTransform="matrix(-1.9976843,2.4215517,-2.2797722,-2.3221033,2557.9371,2642.3697)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3769-5-6">
<stop
style="stop-color:#00ccff;stop-opacity:1;"
offset="0"
id="stop3771-1-3" />
<stop
id="stop3784-9-7"
offset="0.5"
style="stop-color:#db1cd8;stop-opacity:0.29374999;" />
<stop
style="stop-color:#00ccff;stop-opacity:0;"
offset="1"
id="stop3773-8-2" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3769-5-5"
id="radialGradient3858-4"
cx="154.9223"
cy="930.70764"
fx="154.9223"
fy="930.70764"
r="110.12753"
gradientTransform="matrix(-1.9597692,2.4215517,-2.2365032,-2.3221033,2514.0386,2642.3697)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3769-5-5">
<stop
style="stop-color:#00ccff;stop-opacity:1;"
offset="0"
id="stop3771-1-4" />
<stop
id="stop3784-9-8"
offset="0.5"
style="stop-color:#db1cd8;stop-opacity:0.29374999;" />
<stop
style="stop-color:#00ccff;stop-opacity:0;"
offset="1"
id="stop3773-8-7" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3838-9"
id="radialGradient3836-9"
cx="133.65482"
cy="98.044632"
fx="133.65482"
fy="98.044632"
r="110.17627"
gradientTransform="matrix(-2.536372,2.8181903,-2.7229092,-2.4506185,735.96498,-60.394722)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3838-9">
<stop
style="stop-color:#00ccff;stop-opacity:1;"
offset="0"
id="stop3840-7" />
<stop
id="stop3842-4"
offset="0.5928458"
style="stop-color:#db1cd8;stop-opacity:0.29374999;" />
<stop
style="stop-color:#00ccff;stop-opacity:0;"
offset="1"
id="stop3844-9" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3916"
id="radialGradient3922"
cx="-145.65875"
cy="80.361481"
fx="-145.65875"
fy="80.361481"
r="24.046875"
gradientTransform="matrix(1,0,0,1.1708902,0,-13.732987)"
gradientUnits="userSpaceOnUse" />
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3838-8"
id="radialGradient3836-1"
cx="133.65482"
cy="98.044632"
fx="133.65482"
fy="98.044632"
r="110.17627"
gradientTransform="matrix(-2.536372,2.8181903,-2.7229092,-2.4506185,735.96498,-60.394722)"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3838-8">
<stop
style="stop-color:#00ccff;stop-opacity:1;"
offset="0"
id="stop3840-8" />
<stop
id="stop3842-9"
offset="0.5928458"
style="stop-color:#db1cd8;stop-opacity:0.29374999;" />
<stop
style="stop-color:#00ccff;stop-opacity:0;"
offset="1"
id="stop3844-3" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3896-9"
id="radialGradient3902-4"
cx="68.047195"
cy="9.7423315"
fx="68.047195"
fy="9.7423315"
r="128"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9375,3.046875,-1.28745,0.39613841,38.748519,-115.19061)" />
<linearGradient
id="linearGradient3896-9">
<stop
style="stop-color:#cd602b;stop-opacity:1;"
offset="0"
id="stop3898-5" />
<stop
style="stop-color:#cd2b2b;stop-opacity:1;"
offset="1"
id="stop3900-5" />
</linearGradient>
<radialGradient
inkscape:collect="always"
xlink:href="#linearGradient3896-6"
id="radialGradient3902-1"
cx="68.047195"
cy="9.7423315"
fx="68.047195"
fy="9.7423315"
r="128"
gradientUnits="userSpaceOnUse"
gradientTransform="matrix(0.9375,3.046875,-1.28745,0.39613841,38.748519,-1167.5528)" />
<linearGradient
id="linearGradient3896-6">
<stop
style="stop-color:#cd602b;stop-opacity:1;"
offset="0"
id="stop3898-7" />
<stop
style="stop-color:#cd2b2b;stop-opacity:1;"
offset="1"
id="stop3900-0" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3978-1"
id="linearGradient3984-5"
x1="-20"
y1="712.36218"
x2="150"
y2="932.36218"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(0.18296994,0.08188383)" />
<linearGradient
inkscape:collect="always"
id="linearGradient3978-1">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop3980-3" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop3982-0" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3939"
id="linearGradient3945"
x1="146"
y1="968.36218"
x2="145"
y2="967.36218"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(-296.98485,-295.9747)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3994-1"
id="linearGradient4000-8"
x1="-61.213001"
y1="-85.49823"
x2="178.787"
y2="324.50177"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3994-1">
<stop
style="stop-color:#00d1c9;stop-opacity:1;"
offset="0"
id="stop3996-8" />
<stop
style="stop-color:#3e6aad;stop-opacity:1;"
offset="1"
id="stop3998-1" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3994-0"
id="linearGradient4000-1"
x1="-61.213001"
y1="-85.49823"
x2="178.787"
y2="324.50177"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3994-0">
<stop
style="stop-color:#00d1c9;stop-opacity:1;"
offset="0"
id="stop3996-9" />
<stop
style="stop-color:#3e6aad;stop-opacity:1;"
offset="1"
id="stop3998-8" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3994-3"
id="linearGradient4000-9"
x1="-61.213001"
y1="-85.49823"
x2="178.787"
y2="324.50177"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3994-3">
<stop
style="stop-color:#00d1c9;stop-opacity:1;"
offset="0"
id="stop3996-88" />
<stop
style="stop-color:#3e6aad;stop-opacity:1;"
offset="1"
id="stop3998-2" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4276"
id="linearGradient4282"
x1="-110"
y1="632.36218"
x2="110"
y2="922.36218"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(415.17269,-239.40615)" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4303"
id="linearGradient4309"
x1="-5"
y1="622.36218"
x2="230"
y2="982.36218"
gradientUnits="userSpaceOnUse"
gradientTransform="translate(415.17269,-239.40615)" />
<linearGradient
gradientTransform="matrix(1.838244,0,0,1.760204,-248.41104,-733.67334)"
inkscape:collect="always"
xlink:href="#linearGradient4303-8"
id="linearGradient4309-4"
x1="-5"
y1="622.36218"
x2="209.46437"
y2="986.59003"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
id="linearGradient4303-8">
<stop
style="stop-color:#ffffff;stop-opacity:1;"
offset="0"
id="stop4305-2" />
<stop
style="stop-color:#ffffff;stop-opacity:0;"
offset="1"
id="stop4307-0" />
</linearGradient>
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient4129"
x1="111.1097"
y1="212.86099"
x2="111.1097"
y2="297.41571"
gradientUnits="userSpaceOnUse" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient4131"
gradientUnits="userSpaceOnUse"
x1="111.1097"
y1="212.86099"
x2="111.1097"
y2="297.41571" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient4133"
gradientUnits="userSpaceOnUse"
x1="111.1097"
y1="212.86099"
x2="111.1097"
y2="297.41571" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient4135"
gradientUnits="userSpaceOnUse"
x1="111.1097"
y1="212.86099"
x2="111.1097"
y2="297.41571" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient4137"
gradientUnits="userSpaceOnUse"
x1="111.1097"
y1="212.86099"
x2="111.1097"
y2="297.41571" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient4139"
gradientUnits="userSpaceOnUse"
x1="111.1097"
y1="212.86099"
x2="111.1097"
y2="297.41571" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient4141"
gradientUnits="userSpaceOnUse"
x1="111.1097"
y1="212.86099"
x2="111.1097"
y2="297.41571" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient4143"
gradientUnits="userSpaceOnUse"
x1="111.1097"
y1="212.86099"
x2="111.1097"
y2="297.41571" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient4145"
gradientUnits="userSpaceOnUse"
x1="111.1097"
y1="212.86099"
x2="111.1097"
y2="297.41571" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient4147"
gradientUnits="userSpaceOnUse"
x1="111.1097"
y1="212.86099"
x2="111.1097"
y2="297.41571" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient4123"
id="linearGradient4149"
gradientUnits="userSpaceOnUse"
x1="111.1097"
y1="212.86099"
x2="111.1097"
y2="297.41571" />
<linearGradient
inkscape:collect="always"
xlink:href="#linearGradient3994-6"
id="linearGradient4000-7"
x1="-61.213001"
y1="-85.49823"
x2="238.787"
y2="424.50177"
gradientUnits="userSpaceOnUse" />
<linearGradient
id="linearGradient3994-6">
<stop
style="stop-color:#00d1c9;stop-opacity:1;"
offset="0"
id="stop3996-6" />
<stop
style="stop-color:#0081e3;stop-opacity:1;"
offset="1"
id="stop3998-0" />
</linearGradient>
</defs>
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#9d4f2f"
borderopacity="1"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:zoom="2"
inkscape:cx="118.88075"
inkscape:cy="143.06055"
inkscape:document-units="px"
inkscape:current-layer="layer1"
showgrid="true"
showguides="true"
inkscape:guide-bbox="true"
inkscape:window-width="1920"
inkscape:window-height="1017"
inkscape:window-x="-4"
inkscape:window-y="0"
inkscape:window-maximized="1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
showborder="true">
<inkscape:grid
type="xygrid"
id="grid2985"
empspacing="5"
visible="true"
enabled="false"
snapvisiblegridlinesonly="true"
originx="8.7869998px"
originy="9.9302358px" />
<sodipodi:guide
orientation="1,0"
position="8.7869998,239.93024"
id="guide2989" />
<sodipodi:guide
orientation="1,0"
position="263.787,-0.0697642"
id="guide2993" />
<sodipodi:guide
orientation="0,1"
position="261.787,9.9302358"
id="guide2995" />
<sodipodi:guide
orientation="1,0"
position="263.787,296.98485"
id="guide4514" />
<sodipodi:guide
orientation="0,1"
position="68.787,189.93024"
id="guide3939" />
<sodipodi:guide
orientation="0,1"
position="-434.64286,137.14286"
id="guide3941" />
<sodipodi:guide
orientation="1,0"
position="128.787,19.930236"
id="guide4113" />
</sodipodi:namedview>
<metadata
id="metadata7">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
<dc:creator>
<cc:Agent>
<dc:title>Malcer</dc:title>
</cc:Agent>
</dc:creator>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Capa 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(8.7869998,-787.86042)">
<path
style="fill:#f5f5f5;fill-opacity:1;stroke:none"
d="m 64.090487,801.86214 128.677053,0 c 5.09194,0 9.19121,3.92526 9.19121,8.80103 l 0,44.00509 -11.02945,0 0,-40.48469 -125.000587,0 0,214.74493 125.000587,0 0,-174.26024 11.02945,0 0,184.82144 c 0,4.8757 -4.09927,8.801 -9.19121,8.801 l -128.677053,0 c -5.091955,0 -9.191239,-3.9253 -9.191239,-8.801 l 0,-228.82653 c 0,-4.87577 4.099284,-8.80103 9.191239,-8.80103 z"
id="rect3099-1"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sssccccccccssssss" />
<rect
style="fill:#2d2d2d;fill-opacity:1;stroke:none"
id="rect3907-1"
width="125.0006"
height="214.7449"
x="65.928711"
y="814.18335"
rx="0"
ry="0" />
<rect
style="fill:#1a1a1a;fill-opacity:1;stroke:none"
id="rect3946-5"
width="35.204079"
height="1.760206"
x="110.82697"
y="807.14258"
ry="0.88010299" />
<g
transform="matrix(0.99703783,0,0,0.99703783,60.422321,868.29896)"
id="g3764-6-1"
style="fill:#f2f2f2;fill-opacity:1">
<g
id="g15-3-2"
style="fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:none"
transform="translate(59.2336,11.2066)" />
<g
id="g30-7-2"
style="fill:#f2f2f2;fill-opacity:1;fill-rule:nonzero;stroke:none"
transform="translate(19.32,28.4763)">
<path
inkscape:connector-curvature="0"
id="path32-1-7"
style="fill:#f2f2f2;fill-opacity:1;stroke:none"
d="m 18.0991,0.0201 c -0.1947,0.0201 -0.4053,0.0738 -0.5517,0.2207 0,0 -6.7689,6.7688 -6.7689,6.7688 -0.2843,0.2851 -0.319,0.7216 -0.1103,1.0667 0,0 7.9092,13.0594 7.9092,13.0594 -1.4044,2.3608 -2.5448,4.8933 -3.3477,7.5781 0,0 -14.530751,3.0165 -14.530751,3.0165 C 0.29459,31.8139 0,32.1988 0,32.6132 c 0,0 0,9.5645 0,9.5645 0,0.4044 0.307536,0.7507 0.698949,0.8461 0,0 14.089351,3.4212 14.089351,3.4212 0.7534,3.1084 1.9174,6.0828 3.4579,8.792 0,0 -8.1666,12.4339 -8.1666,12.4339 -0.2278,0.3473 -0.18337,0.8106 0.1103,1.1038 0,0 6.7689,6.7687 6.7689,6.7687 0.2851,0.2842 0.7224,0.3199 1.0667,0.1103 0,0 12.8018,-7.7619 12.8018,-7.7619 2.5109,1.4495 5.2294,2.6109 8.0931,3.3844 0,0 2.9798,14.3471 2.9798,14.3471 0.0835,0.405 0.432,0.699 0.846,0.699 0,0 9.5646,0 9.5646,0 0.4014,0 0.7508,-0.27 0.846,-0.663 0,0 3.5316,-14.42 3.5316,-14.42 2.9535,-0.7964 5.7382,-1.9786 8.3139,-3.4947 0,0 12.6178,8.277 12.6178,8.277 0.3479,0.2266 0.8087,0.1828 1.1036,-0.1103 0,0 6.7321,-6.7689 6.7321,-6.7689 0.2859,-0.2853 0.3565,-0.7224 0.1471,-1.0668 0,0 -4.5984,-7.578 -4.5984,-7.578 0,0 -1.5083,0.4783 -1.5083,0.4783 -0.2178,0.0671 -0.4591,-0.0314 -0.5886,-0.2209 0,0 -2.9047,-4.2728 -6.6952,-9.822 -4.5332,8.8706 -13.7783,14.9354 -24.4264,14.9354 -15.1308,0 -27.4061,-12.2753 -27.4061,-27.4061 0,-11.1298 6.6555,-20.6892 16.1862,-24.9782 0,0 0,-7.0631 0,-7.0631 -1.7346,0.6071 -3.4103,1.3396 -5.003,2.2072 -0.003,-0.0018 0.0029,-0.0351 0,-0.0367 0,0 -12.9121,-8.4611 -12.9121,-8.4611 C 18.4773,0.0169 18.2938,0 18.0991,0.0201 c 0,0 0,0 0,0 z m 39.0307,-17.2898 c 0,0 -17.2162,1.65541 -17.2162,1.65541 0,0 0,70.92489 0,70.92489 0,0 17.0323,-2.575 17.0323,-2.575 0,0 0,-30.2388 0,-30.2388 0,0 22.9183,33.5495 22.9183,33.5495 0,0 17.9518,-5.7019 17.9518,-5.7019 0,0 -23.47,-32.2621 -23.47,-32.2621 0,0 23.654,-30.42257 23.654,-30.42257 0,0 -18.3198,-4.193694 -18.3198,-4.193694 0,0 -22.7343,30.422764 -22.7343,30.422764 0,0 0.1839,-31.1585 0.1839,-31.1585 0,0 0,0 0,0 z" />
</g>
</g>
<path
style="opacity:0.5;fill:url(#linearGradient4309-4);fill-opacity:1;stroke:none"
d="m 65.928713,814.18357 90.073947,0 15.61309,-1.06296 -88.937821,217.56809 -18.58746,0 z"
id="rect3907-9-4"
inkscape:connector-curvature="0"
sodipodi:nodetypes="cccccc" />
<path
style="opacity:0.4;fill:#ffffff;fill-opacity:1;stroke:none"
d="m 72.876953,14.001953 c -5.091955,0 -9.191406,3.925011 -9.191406,8.800781 l 0,2 c 0,-4.87577 4.099451,-8.800781 9.191406,-8.800781 l 128.677737,0 c 5.09194,0 9.1914,3.925011 9.1914,8.800781 l 0,-2 c 0,-4.87577 -4.09946,-8.800781 -9.1914,-8.800781 z"
transform="translate(-8.7869998,787.86042)"
id="path4295"
inkscape:connector-curvature="0"
sodipodi:nodetypes="sscsscsss" />
<path
style="fill:#000000;fill-opacity:1;stroke:none;opacity:0.1"
d="m 63.685547,249.62891 0,2 c 0,4.8757 4.099451,8.80078 9.191406,8.80078 l 128.677737,0 c 5.09194,0 9.1914,-3.92508 9.1914,-8.80078 l 0,-2 c 0,4.8757 -4.09946,8.80078 -9.1914,8.80078 l -128.677737,0 c -5.091955,0 -9.191406,-3.92508 -9.191406,-8.80078 z"
id="path4300"
inkscape:connector-curvature="0"
sodipodi:nodetypes="csssscssc"
transform="translate(-8.7869998,787.86042)" />
</g>
</svg>

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -1,13 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<module external.linked.project.path="$MODULE_DIR$" external.system.id="GRADLE" type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<excludeFolder url="file://$MODULE_DIR$/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/build" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

45
proguard-rules.pro vendored Normal file
View File

@@ -0,0 +1,45 @@
# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in {SDKHOME}/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html
# Add any project specific keep options here:
# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}
-dontobfuscate
# Allow obfuscation of android.support.v7.internal.view.menu.**
# to avoid problem on Samsung 4.2.2 devices with appcompat v21
# see https://code.google.com/p/android/issues/detail?id=78377
-keepnames class !android.support.v7.internal.view.menu.**,android.support.v7.** {*;}
-dontwarn org.spongycastle.**
-dontwarn org.apache.sshd.**
-dontwarn org.apache.mina.**
-dontwarn org.slf4j.**
-dontwarn io.netty.**
-keepattributes SourceFile,LineNumberTable,Signature,*Annotation*
-keep class org.spongycastle.** {*;}
# SSHd requires mina, and mina uses reflection so some classes would get deleted
-keep class org.apache.mina.** {*;}
-keep class org.apache.sshd.** {*;}
-keep class org.kde.kdeconnect.** {*;}
-dontwarn org.mockito.**
-dontwarn sun.reflect.**
-dontwarn android.test.**
-dontwarn java.lang.management.**

View File

@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="#FFFFFF" android:state_checked="true" />
<item android:color="#000000" android:state_checked="false" />
</selector>

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 532 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 351 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 557 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 590 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 627 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 560 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 444 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 327 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 231 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 959 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 358 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 469 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 378 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 343 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 474 B

BIN
res/drawable-hdpi/icon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 449 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 553 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 441 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 287 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 645 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 462 B

Some files were not shown because too many files have changed in this diff Show More