From a1fd31c2600d687d680ef749cd2f20d604e96de8 Mon Sep 17 00:00:00 2001 From: Sergey Trofimov Date: Sun, 18 Oct 2015 09:34:51 +0300 Subject: [PATCH] Show toast when no valid DeviceSupport found for pairing. --- .../gadgetbridge/service/DeviceCommunicationService.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceCommunicationService.java b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceCommunicationService.java index 3648a5474..eba03518f 100644 --- a/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceCommunicationService.java +++ b/app/src/main/java/nodomain/freeyourgadget/gadgetbridge/service/DeviceCommunicationService.java @@ -183,6 +183,8 @@ public class DeviceCommunicationService extends Service { } else { deviceSupport.connect(); } + } else { + GB.toast(this, getString(R.string.cannot_connect, "Can't create device support"), Toast.LENGTH_SHORT, GB.ERROR); } } catch (Exception e) { GB.toast(this, getString(R.string.cannot_connect, e.getMessage()), Toast.LENGTH_SHORT, GB.ERROR);