2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-09-05 00:25:09 +00:00

Compare commits

..

2 Commits

Author SHA1 Message Date
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
3 changed files with 10 additions and 5 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="1830"
android:versionName="1.8.3">
android:versionCode="1840"
android:versionName="1.8.4">
<supports-screens
android:anyDensity="true"

View File

@@ -253,7 +253,9 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
//Handshake is blocking, so do it on another thread and free this thread to keep receiving new connection
new Thread(() -> {
try {
sslsocket.startHandshake();
synchronized (this) {
sslsocket.startHandshake();
}
} catch (Exception e) {
Log.e("KDE/LanLinkProvider", "Handshake failed with " + identityPacket.getString("deviceName"));
e.printStackTrace();
@@ -286,7 +288,7 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
* @param connectionOrigin which side started this connection
* @throws IOException if an exception is thrown by {@link LanLink#reset(Socket, LanLink.ConnectionStarted)}
*/
private synchronized void addLink(final NetworkPacket identityPacket, Socket socket, LanLink.ConnectionStarted connectionOrigin) throws IOException {
private void addLink(final NetworkPacket identityPacket, Socket socket, LanLink.ConnectionStarted connectionOrigin) throws IOException {
String deviceId = identityPacket.getString("deviceId");
LanLink currentLink = visibleComputers.get(deviceId);

View File

@@ -42,6 +42,7 @@ import org.spongycastle.operator.jcajce.JcaContentSignerBuilder;
import java.io.IOException;
import java.math.BigInteger;
import java.net.Socket;
import java.net.SocketException;
import java.security.KeyStore;
import java.security.MessageDigest;
import java.security.PrivateKey;
@@ -201,7 +202,7 @@ public class SslHelper {
}
public static void configureSslSocket(SSLSocket socket, boolean isDeviceTrusted, boolean isClient) {
public static void configureSslSocket(SSLSocket socket, boolean isDeviceTrusted, boolean isClient) throws SocketException {
socket.setEnabledProtocols(new String[]{"TLSv1"}); //Newer TLS versions are only supported on API 16+
@@ -223,6 +224,8 @@ public class SslHelper {
}
socket.setEnabledCipherSuites(supportedCiphers.toArray(new String[supportedCiphers.size()]));
socket.setSoTimeout(1000);
if (isClient) {
socket.setUseClientMode(true);
} else {