mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-22 18:07:55 +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)) {
|
if (deviceTrusted && !SslHelper.isCertificateStored(context, deviceId)) {
|
||||||
Log.e("KDE/LanLinkProvider", "Device trusted but no cert stored. This should not happen.");
|
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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -261,16 +257,8 @@ public class LanLinkProvider extends BaseLinkProvider {
|
|||||||
addOrUpdateLink(sslSocket, deviceInfo);
|
addOrUpdateLink(sslSocket, deviceInfo);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.e("KDE/LanLinkProvider", "Remote device doesn't correctly implement protocol version 8", 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) {
|
} catch (IOException e) {
|
||||||
Log.e("KDE/LanLinkProvider", "Handshake as " + mode + " failed with " + deviceName, 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