mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 21:55:10 +00:00
Cleanup
This commit is contained in:
@@ -403,6 +403,7 @@ public class LanLinkProvider extends BaseLinkProvider {
|
|||||||
});
|
});
|
||||||
udpBootstrap.bind(new InetSocketAddress(port)).sync();
|
udpBootstrap.bind(new InetSocketAddress(port)).sync();
|
||||||
}catch (Exception e){
|
}catch (Exception e){
|
||||||
|
Log.e("KDE/LanLinkProvider","Exception setting up UDP server");
|
||||||
e.printStackTrace();
|
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
|
// 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
|
// than ICS because server is disabled on both
|
||||||
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.ICE_CREAM_SANDWICH) {
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -429,6 +431,7 @@ public class LanLinkProvider extends BaseLinkProvider {
|
|||||||
tcpBootstrap.childHandler(new TcpInitializer());
|
tcpBootstrap.childHandler(new TcpInitializer());
|
||||||
tcpBootstrap.bind(new InetSocketAddress(port)).sync();
|
tcpBootstrap.bind(new InetSocketAddress(port)).sync();
|
||||||
}catch (Exception e) {
|
}catch (Exception e) {
|
||||||
|
Log.e("KDE/LanLinkProvider","Exception setting up TCP server");
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -28,6 +28,7 @@ import android.provider.Settings;
|
|||||||
import android.util.Base64;
|
import android.util.Base64;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
|
||||||
|
import org.kde.kdeconnect.Helpers.DeviceHelper;
|
||||||
import org.spongycastle.asn1.x500.X500NameBuilder;
|
import org.spongycastle.asn1.x500.X500NameBuilder;
|
||||||
import org.spongycastle.asn1.x500.style.BCStyle;
|
import org.spongycastle.asn1.x500.style.BCStyle;
|
||||||
import org.spongycastle.cert.X509CertificateHolder;
|
import org.spongycastle.cert.X509CertificateHolder;
|
||||||
@@ -88,7 +89,7 @@ public class SslHelper {
|
|||||||
try {
|
try {
|
||||||
|
|
||||||
X500NameBuilder nameBuilder = new X500NameBuilder(BCStyle.INSTANCE);
|
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.OU, "KDE Connect");
|
||||||
nameBuilder.addRDN(BCStyle.O, "KDE");
|
nameBuilder.addRDN(BCStyle.O, "KDE");
|
||||||
Calendar calendar = Calendar.getInstance();
|
Calendar calendar = Calendar.getInstance();
|
||||||
|
Reference in New Issue
Block a user