diff --git a/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java b/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java index 1f94d763..74c4d1da 100644 --- a/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java +++ b/src/org/kde/kdeconnect/Backends/LanBackend/LanLinkProvider.java @@ -403,6 +403,7 @@ public class LanLinkProvider extends BaseLinkProvider { }); udpBootstrap.bind(new InetSocketAddress(port)).sync(); }catch (Exception e){ + Log.e("KDE/LanLinkProvider","Exception setting up UDP server"); e.printStackTrace(); } @@ -414,6 +415,7 @@ public class LanLinkProvider extends BaseLinkProvider { // and newer android versions. Although devices with android version less than ICS cannot connect to other devices who also have android version less // than ICS because server is disabled on both if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) { + Log.w("KDE/LanLinkProvider","Not starting a TCP server because it's not supported on Android < 14. Operating only as client."); return; } @@ -429,6 +431,7 @@ public class LanLinkProvider extends BaseLinkProvider { tcpBootstrap.childHandler(new TcpInitializer()); tcpBootstrap.bind(new InetSocketAddress(port)).sync(); }catch (Exception e) { + Log.e("KDE/LanLinkProvider","Exception setting up TCP server"); e.printStackTrace(); } diff --git a/src/org/kde/kdeconnect/Helpers/SecurityHelpers/SslHelper.java b/src/org/kde/kdeconnect/Helpers/SecurityHelpers/SslHelper.java index 60755adb..4b846a5c 100644 --- a/src/org/kde/kdeconnect/Helpers/SecurityHelpers/SslHelper.java +++ b/src/org/kde/kdeconnect/Helpers/SecurityHelpers/SslHelper.java @@ -28,6 +28,7 @@ import android.provider.Settings; import android.util.Base64; import android.util.Log; +import org.kde.kdeconnect.Helpers.DeviceHelper; import org.spongycastle.asn1.x500.X500NameBuilder; import org.spongycastle.asn1.x500.style.BCStyle; import org.spongycastle.cert.X509CertificateHolder; @@ -88,7 +89,7 @@ public class SslHelper { try { X500NameBuilder nameBuilder = new X500NameBuilder(BCStyle.INSTANCE); - nameBuilder.addRDN(BCStyle.CN, Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID)); + nameBuilder.addRDN(BCStyle.CN, DeviceHelper.getDeviceId(context)); nameBuilder.addRDN(BCStyle.OU, "KDE Connect"); nameBuilder.addRDN(BCStyle.O, "KDE"); Calendar calendar = Calendar.getInstance();