mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 09:58:08 +00:00
Do not unpair automatically on error, just ignore the connection
This commit is contained in:
parent
7a4fb8b584
commit
68a0b73e9c
@ -223,10 +223,6 @@ public class LanLinkProvider extends BaseLinkProvider {
|
||||
|
||||
if (deviceTrusted && !SslHelper.isCertificateStored(context, deviceId)) {
|
||||
Log.e("KDE/LanLinkProvider", "Device trusted but no cert stored. This should not happen.");
|
||||
Device device = KdeConnect.getInstance().getDevice(deviceId);
|
||||
if (device != null) {
|
||||
device.unpair();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@ -261,16 +257,8 @@ public class LanLinkProvider extends BaseLinkProvider {
|
||||
addOrUpdateLink(sslSocket, deviceInfo);
|
||||
} catch (JSONException e) {
|
||||
Log.e("KDE/LanLinkProvider", "Remote device doesn't correctly implement protocol version 8", e);
|
||||
Device device = KdeConnect.getInstance().getDevice(deviceId);
|
||||
if (device != null) {
|
||||
device.unpair();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
Log.e("KDE/LanLinkProvider", "Handshake as " + mode + " failed with " + deviceName, e);
|
||||
Device device = KdeConnect.getInstance().getDevice(deviceId);
|
||||
if (device != null) {
|
||||
device.unpair();
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user