mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-28 20:57:42 +00:00
Make this more readable
This commit is contained in:
parent
40b791a7c4
commit
bd0b03eafb
@ -169,21 +169,22 @@ public class KdeConnect extends Application {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onConnectionLost(BaseLink link) {
|
public void onConnectionLost(BaseLink link) {
|
||||||
Device d = devices.get(link.getDeviceId());
|
Device device = devices.get(link.getDeviceId());
|
||||||
Log.i("KDE/onConnectionLost", "removeLink, deviceId: " + link.getDeviceId());
|
Log.i("KDE/onConnectionLost", "removeLink, deviceId: " + link.getDeviceId());
|
||||||
if (d != null) {
|
if (device != null) {
|
||||||
d.removeLink(link);
|
device.removeLink(link);
|
||||||
if (!d.isReachable() && !d.isPaired()) {
|
if (!device.isReachable() && !device.isPaired()) {
|
||||||
//Log.e("onConnectionLost","Removing connection device because it was not paired");
|
//Log.e("onConnectionLost","Removing connection device because it was not paired");
|
||||||
devices.remove(link.getDeviceId());
|
devices.remove(link.getDeviceId());
|
||||||
d.removePairingCallback(devicePairingCallback);
|
device.removePairingCallback(devicePairingCallback);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//Log.d("KDE/onConnectionLost","Removing connection to unknown device");
|
Log.d("KDE/onConnectionLost","Removing connection to unknown device");
|
||||||
}
|
}
|
||||||
onDeviceListChanged();
|
onDeviceListChanged();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
public BaseLinkProvider.ConnectionReceiver getConnectionListener() {
|
public BaseLinkProvider.ConnectionReceiver getConnectionListener() {
|
||||||
return connectionListener;
|
return connectionListener;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user