2
0
mirror of https://github.com/KDE/kdeconnect-android synced 2025-08-30 05:37:43 +00:00

Added the "add new connection before removing old one" optimization, as was done in Qt.

This commit is contained in:
Albert Vaca 2013-08-20 09:58:25 +02:00
parent d3989d54e1
commit 7c4a50cf35

View File

@ -61,8 +61,6 @@ public class BackgroundService extends Service {
Log.e("BackgroundService", "Connection accepted!"); Log.e("BackgroundService", "Connection accepted!");
new Throwable().printStackTrace();
String deviceId = identityPackage.getString("deviceId"); String deviceId = identityPackage.getString("deviceId");
Device device = devices.get(deviceId); Device device = devices.get(deviceId);
@ -138,6 +136,12 @@ public class BackgroundService extends Service {
} }
} }
public void removeConnectionListener(BaseLinkProvider.ConnectionReceiver cr) {
for (BaseLinkProvider a : linkProviders) {
a.removeConnectionReceiver(cr);
}
}
//This will called only once, even if we launch the service intent several times //This will called only once, even if we launch the service intent several times
@Override @Override
public void onCreate() { public void onCreate() {