diff --git a/libs/netty-handler.jar b/libs/netty-handler.jar index b49a5e07..7e283cfe 100644 Binary files a/libs/netty-handler.jar and b/libs/netty-handler.jar differ diff --git a/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java b/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java index 2d573da4..37c350b0 100644 --- a/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java +++ b/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java @@ -21,8 +21,6 @@ package org.kde.kdeconnect.Backends.LanBackend; import android.content.Context; -import android.net.wifi.WifiManager; -import android.os.Build; import android.preference.PreferenceManager; import android.support.v4.util.LongSparseArray; import android.util.Base64; @@ -41,10 +39,8 @@ import java.net.InetSocketAddress; import java.security.cert.Certificate; import java.util.ArrayList; import java.util.HashMap; -import java.util.Set; import java.util.Timer; import java.util.TimerTask; -import java.util.concurrent.TimeUnit; import javax.net.ssl.SSLEngine; import javax.net.ssl.SSLHandshakeException; @@ -92,9 +88,6 @@ public class LanLinkProvider extends BaseLinkProvider { private TcpHandler tcpHandler = new TcpHandler(); private UdpHandler udpHandler = new UdpHandler(); - private ArrayList reverseConnectionBlacklist = new ArrayList<>(); - private Timer reverseConnectionTimer; - @ChannelHandler.Sharable private class TcpHandler extends SimpleChannelInboundHandler{ @Override @@ -264,22 +257,7 @@ public class LanLinkProvider extends BaseLinkProvider { if (!future.isSuccess()) { Log.e("KDE/LanLinkProvider", "Cannot connect to " + identityPackage.getString("deviceId")); // Try reverse connection - - if (!reverseConnectionBlacklist.contains(identityPackage.getString("deviceId"))) { - // We are waiting for 3 seconds after trying reverse connection, to avoid any further emmission - // Without this, infinite loop is created between two devices with Android 5.0, because server will not work on it - // and it will cause trouble for ohter devices too - reverseConnectionTimer = new Timer(); - reverseConnectionTimer.schedule(new TimerTask() { - @Override - public void run() { - reverseConnectionBlacklist.remove(identityPackage.getString("deviceId")); - } - }, 3*1000); - reverseConnectionBlacklist.add(identityPackage.getString("deviceId")); - onNetworkChange(); - } - + onNetworkChange(); return; } @@ -430,11 +408,6 @@ public class LanLinkProvider extends BaseLinkProvider { clientGroup = new NioEventLoopGroup(); - if (Build.VERSION.SDK_INT == Build.VERSION_CODES.LOLLIPOP) { - // Server not working in Android Lollipop due to ssl bug - return ; - } - bossGroup = new NioEventLoopGroup(1); workerGroup = new NioEventLoopGroup(); try{