mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-30 05:37:43 +00:00
Cleanup
This commit is contained in:
parent
fd7d39e6ac
commit
2c513b598a
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user