mirror of
https://github.com/KDE/kdeconnect-android
synced 2025-08-31 06:05:12 +00:00
Re-use existing link instead of creating a new one
This commit is contained in:
@@ -874,13 +874,13 @@ public class Device implements BaseLink.PackageReceiver {
|
||||
}
|
||||
}
|
||||
|
||||
public BaseLink.ConnectionStarted getConnectionSource() {
|
||||
public boolean deviceShouldBeKeptAlive() {
|
||||
for(BaseLink l : links) {
|
||||
if (l.getConnectionSource() == BaseLink.ConnectionStarted.Locally) {
|
||||
return BaseLink.ConnectionStarted.Locally;
|
||||
if (l.linkShouldBeKeptAlive()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return BaseLink.ConnectionStarted.Remotely;
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user