diff --git a/KdeConnect/src/main/AndroidManifest.xml b/KdeConnect/src/main/AndroidManifest.xml index 0a9c3058..5e4b7587 100644 --- a/KdeConnect/src/main/AndroidManifest.xml +++ b/KdeConnect/src/main/AndroidManifest.xml @@ -9,14 +9,13 @@ - + android:label="KDE Connect" > @@ -26,12 +25,12 @@ - diff --git a/KdeConnect/src/main/java/org/kde/connect/BackgroundService.java b/KdeConnect/src/main/java/org/kde/connect/BackgroundService.java index fe313720..c2bc515a 100644 --- a/KdeConnect/src/main/java/org/kde/connect/BackgroundService.java +++ b/KdeConnect/src/main/java/org/kde/connect/BackgroundService.java @@ -221,12 +221,6 @@ public class BackgroundService extends Service { } - public void restart() { - devices.clear(); - stopDiscovery(); - startDiscovery(); - } - @Override public void onDestroy() { Log.i("BackgroundService", "Destroying"); diff --git a/KdeConnect/src/main/java/org/kde/connect/LinkProviders/AvahiTcpLinkProvider.java b/KdeConnect/src/main/java/org/kde/connect/LinkProviders/AvahiTcpLinkProvider.java index a0a27de5..7349ef05 100644 --- a/KdeConnect/src/main/java/org/kde/connect/LinkProviders/AvahiTcpLinkProvider.java +++ b/KdeConnect/src/main/java/org/kde/connect/LinkProviders/AvahiTcpLinkProvider.java @@ -67,7 +67,8 @@ public class AvahiTcpLinkProvider extends BaseLinkProvider { link.setDeviceId(id); link.sendPackage(NetworkPackage.createIdentityPackage(context)); - if (visibleComputers.containsKey(serviceInfo.toString())) { + if (visibleComputers.containsKey(serviceInfo.getServiceName())) { + Log.e("AvahiTcpLinkProvider","Removing old connection to same device"); //Remove old connection to same host, probably down connectionLost(visibleComputers.get(serviceInfo.getServiceName())); } @@ -145,7 +146,6 @@ public class AvahiTcpLinkProvider extends BaseLinkProvider { if (oldListener != null) mNsdManager.stopServiceDiscovery(oldListener); oldListener = null; - visibleComputers.clear(); } diff --git a/KdeConnect/src/main/java/org/kde/connect/MainActivity.java b/KdeConnect/src/main/java/org/kde/connect/MainActivity.java index 2ed64c57..5946f260 100644 --- a/KdeConnect/src/main/java/org/kde/connect/MainActivity.java +++ b/KdeConnect/src/main/java/org/kde/connect/MainActivity.java @@ -36,7 +36,8 @@ public class MainActivity extends Activity { BackgroundService.RunCommand(MainActivity.this, new BackgroundService.InstanceCallback() { @Override public void onServiceStart(BackgroundService service) { - service.restart(); + service.stopDiscovery(); + service.startDiscovery(); } }); } diff --git a/KdeConnect/src/main/res/drawable-hdpi/ic_launcher.png b/KdeConnect/src/main/res/drawable-hdpi/ic_launcher.png deleted file mode 100755 index 96a442e5..00000000 Binary files a/KdeConnect/src/main/res/drawable-hdpi/ic_launcher.png and /dev/null differ diff --git a/KdeConnect/src/main/res/drawable-mdpi/ic_launcher.png b/KdeConnect/src/main/res/drawable-mdpi/ic_launcher.png deleted file mode 100755 index 359047df..00000000 Binary files a/KdeConnect/src/main/res/drawable-mdpi/ic_launcher.png and /dev/null differ diff --git a/KdeConnect/src/main/res/drawable-xhdpi/ic_launcher.png b/KdeConnect/src/main/res/drawable-xhdpi/ic_launcher.png deleted file mode 100755 index 71c6d760..00000000 Binary files a/KdeConnect/src/main/res/drawable-xhdpi/ic_launcher.png and /dev/null differ diff --git a/KdeConnect/src/main/res/drawable/icon.png b/KdeConnect/src/main/res/drawable/icon.png new file mode 100644 index 00000000..06dbbc15 Binary files /dev/null and b/KdeConnect/src/main/res/drawable/icon.png differ