mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-01 22:55:10 +00:00
Compare commits
11 Commits
Author | SHA1 | Date | |
---|---|---|---|
|
ca90b64094 | ||
|
7b6d8a4c35 | ||
|
b725e81c37 | ||
|
17e9892c80 | ||
|
a8bc4f24c7 | ||
|
3b82cd44e4 | ||
|
79272a6042 | ||
|
12fb67a7aa | ||
|
d03520ce70 | ||
|
0453728407 | ||
|
7dc023385e |
@@ -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"
|
||||
|
@@ -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
|
||||
|
@@ -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>
|
||||
|
@@ -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()) {
|
||||
|
@@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -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,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
@@ -88,7 +88,7 @@ class RootFile implements SshFile {
|
||||
}
|
||||
|
||||
public String readSymbolicLink() {
|
||||
return null;
|
||||
return "";
|
||||
}
|
||||
|
||||
public void createSymbolicLink(SshFile destination) {
|
||||
|
@@ -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];
|
||||
|
@@ -199,6 +199,7 @@ public class DeviceFragment extends Fragment {
|
||||
});
|
||||
|
||||
unbinder.unbind();
|
||||
rootView = null;
|
||||
|
||||
super.onDestroyView();
|
||||
}
|
||||
|
Reference in New Issue
Block a user