2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-01 22:55:10 +00:00

Compare commits

...

11 Commits

Author SHA1 Message Date
Albert Vaca Cintora
ca90b64094 Bump version to release 2019-03-22 08:38:36 +01:00
Albert Vaca Cintora
7b6d8a4c35 Remove mention to SMS from the description 2019-03-22 08:38:36 +01:00
Simon Redman
b725e81c37 Re-add READ_SMS permission to SMS plugin
Previously was bugged: If the SMS plugin was enabled but the Telephony was not, the SMS plugin would not have worked. Good thing nobody noticed! :)
2019-03-21 21:10:22 -06:00
Nicolas Fella
17e9892c80 Fix showing callers number on Pie 2019-03-21 23:13:27 +00:00
Albert Vaca Cintora
a8bc4f24c7 Fix crash on old API 2019-03-21 23:02:04 +01:00
Albert Vaca Cintora
3b82cd44e4 After unbinding, this will prevent other code from using any view 2019-03-21 23:01:55 +01:00
Nicolas Fella
79272a6042 Reenable calllog permission 2019-03-21 22:46:04 +01:00
Simon Redman
12fb67a7aa Change hard-coded string to use library-provided constant
Does this cause problems with older SDKs? I don't think so. (If there are problems, I assume they were already there)
2019-03-21 11:12:43 -06:00
Nicolas Fella
d03520ce70 Fix lost packets after connecting 2019-03-21 16:36:00 +00:00
Andy Holmes
0453728407 SftpPlugin: fix SAF implementation for gvfs/ssh
Returning NULL from readSymbolicLink() results in an exception that
closes the SFTP connection for some SSH implementations, notably the one
used by Gvfs (GSConnect).

primitive-ftpd had a similar issue, which was fixed by returning and
empty string instead of NULL.
2019-03-21 08:16:47 -07:00
Albert Vaca Cintora
7dc023385e Remove directives that aren't needed
And changed pickFirst to merge, that concatenates the contents
2019-03-21 09:49:49 +01:00
9 changed files with 31 additions and 22 deletions

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.kde.kdeconnect_tp"
android:versionCode="11240"
android:versionName="1.12.4">
android:versionCode="11250"
android:versionName="1.12.5">
<supports-screens
android:anyDensity="true"

View File

@@ -36,12 +36,9 @@ android {
}
}
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"
merge "META-INF/DEPENDENCIES"
merge "META-INF/LICENSE"
merge "META-INF/NOTICE"
}
lintOptions {
abortOnError false

View File

@@ -289,7 +289,7 @@
<string name="plugins_need_optional_permission">Some plugins have features disabled because of lack of permission (tap for more info):</string>
<string name="share_optional_permission_explanation">To share files between your phone and your desktop you need to give access to the phone\'s storage</string>
<string name="telepathy_permission_explanation">To read and write SMS from your desktop you need to give permission to SMS</string>
<string name="telephony_permission_explanation">To see phone calls and SMS from the desktop you need to give permission to phone calls and SMS</string>
<string name="telephony_permission_explanation">To see phone calls from the desktop you need to give permission to access phone calls</string>
<string name="telephony_optional_permission_explanation">To see a contact name instead of a phone number you need to give access to the phone\'s contacts</string>
<string name="contacts_permission_explanation">To share your contacts book with the desktop, you need to give contacts permission</string>
<string name="select_ringtone">Select a ringtone</string>

View File

@@ -565,6 +565,11 @@ public class Device implements BaseLink.PacketReceiver {
}
} else if (isPaired()) {
// pluginsByIncomingInterface may not be built yet
if(pluginsByIncomingInterface.isEmpty()) {
reloadPluginsFromSettings();
}
//If capabilities are not supported, iterate all plugins
Collection<String> targetPlugins = pluginsByIncomingInterface.get(np.getType());
if (targetPlugins != null && !targetPlugins.isEmpty()) {

View File

@@ -466,8 +466,10 @@ public class NotificationsPlugin extends Plugin implements NotificationReceiver.
private void sendCurrentNotifications(NotificationReceiver service) {
StatusBarNotification[] notifications = service.getActiveNotifications();
for (StatusBarNotification notification : notifications) {
sendNotification(notification);
if (notifications != null) { //Can happen only on API 23 and lower
for (StatusBarNotification notification : notifications) {
sendNotification(notification);
}
}
}

View File

@@ -1,5 +1,6 @@
/*
* Copyright 2014 Albert Vaca Cintora <albertvaka@gmail.com>
* Copyright 2019 Simon Redman <simon@ergotech.com>
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
@@ -32,6 +33,7 @@ import android.os.Bundle;
import android.os.Handler;
import android.os.Looper;
import android.preference.PreferenceManager;
import android.provider.Telephony;
import android.telephony.PhoneNumberUtils;
import android.telephony.SmsManager;
import android.telephony.SmsMessage;
@@ -127,7 +129,7 @@ public class SMSPlugin extends Plugin {
//Log.e("TelephonyPlugin","Telephony event: " + action);
if ("android.provider.Telephony.SMS_RECEIVED".equals(action)) {
if (Telephony.Sms.Intents.SMS_RECEIVED_ACTION.equals(action)) {
final Bundle bundle = intent.getExtras();
if (bundle == null) return;
@@ -274,7 +276,7 @@ public class SMSPlugin extends Plugin {
public boolean onCreate() {
permissionExplanation = R.string.telepathy_permission_explanation;
IntentFilter filter = new IntentFilter("android.provider.Telephony.SMS_RECEIVED");
IntentFilter filter = new IntentFilter(Telephony.Sms.Intents.SMS_RECEIVED_ACTION);
filter.setPriority(500);
context.registerReceiver(receiver, filter);
@@ -428,6 +430,9 @@ public class SMSPlugin extends Plugin {
@Override
public String[] getRequiredPermissions() {
return new String[]{Manifest.permission.SEND_SMS};
return new String[]{
Manifest.permission.SEND_SMS,
Manifest.permission.READ_SMS,
};
}
}

View File

@@ -88,7 +88,7 @@ class RootFile implements SshFile {
}
public String readSymbolicLink() {
return null;
return "";
}
public void createSymbolicLink(SshFile destination) {

View File

@@ -108,15 +108,15 @@ public class TelephonyPlugin extends Plugin {
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);
// We will get a second broadcast with the phone number https://developer.android.com/reference/android/telephony/TelephonyManager#ACTION_PHONE_STATE_CHANGED
if (!intent.hasExtra(TelephonyManager.EXTRA_INCOMING_NUMBER))
return;
String number = intent.getStringExtra(TelephonyManager.EXTRA_INCOMING_NUMBER);
final int finalIntState = intState;
final String finalNumber = number;
if (finalIntState != lastState) {
callBroadcastReceived(finalIntState, finalNumber);
callBroadcastReceived(finalIntState, number);
}
}
}
@@ -304,8 +304,7 @@ public class TelephonyPlugin extends Plugin {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {
return new String[]{
Manifest.permission.READ_PHONE_STATE,
//FIXME: Disabled because of https://support.google.com/googleplay/android-developer/answer/9047303
//Manifest.permission.READ_CALL_LOG
Manifest.permission.READ_CALL_LOG
};
} else {
return new String[0];

View File

@@ -199,6 +199,7 @@ public class DeviceFragment extends Fragment {
});
unbinder.unbind();
rootView = null;
super.onDestroyView();
}