mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-09-03 15:45:10 +00:00
Unpair also if handshake fails but the callback is not called
This commit is contained in:
@@ -231,7 +231,16 @@ public class LanLinkProvider extends BaseLinkProvider implements LanLink.LinkDis
|
|||||||
try {
|
try {
|
||||||
sslsocket.startHandshake();
|
sslsocket.startHandshake();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
Log.e("KDE/LanLinkProvider","Handshake failed with " + identityPackage.getString("deviceName"));
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
BackgroundService.RunCommand(context, new BackgroundService.InstanceCallback() {
|
||||||
|
@Override
|
||||||
|
public void onServiceStart(BackgroundService service) {
|
||||||
|
Device device = service.getDevice(deviceId);
|
||||||
|
if (device == null) return;
|
||||||
|
device.unpair();
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).start();
|
}).start();
|
||||||
|
Reference in New Issue
Block a user