From 0f8f6b5dc86a8ef71dff2678e80a4d9f5d35bb06 Mon Sep 17 00:00:00 2001 From: mendhak Date: Fri, 20 Mar 2015 12:52:54 +0000 Subject: [PATCH] Wasn't checking OpenGTS validation properly Fixes Issue #294 --- .../mendhak/gpslogger/senders/opengts/OpenGTSFragment.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gpslogger/src/main/java/com/mendhak/gpslogger/senders/opengts/OpenGTSFragment.java b/gpslogger/src/main/java/com/mendhak/gpslogger/senders/opengts/OpenGTSFragment.java index 9384f391e..b5508edb3 100644 --- a/gpslogger/src/main/java/com/mendhak/gpslogger/senders/opengts/OpenGTSFragment.java +++ b/gpslogger/src/main/java/com/mendhak/gpslogger/senders/opengts/OpenGTSFragment.java @@ -68,6 +68,11 @@ public boolean onPreferenceClick(Preference preference) { private boolean IsFormValid() { + CustomSwitchPreference chkEnabled = (CustomSwitchPreference) findPreference("autoopengts_enabled"); + if(!chkEnabled.isChecked()) { + return true; + } + MaterialEditTextPreference txtOpenGTSServer = (MaterialEditTextPreference) findPreference("opengts_server"); MaterialEditTextPreference txtOpenGTSServerPort = (MaterialEditTextPreference) findPreference("opengts_server_port"); MaterialListPreference txtOpenGTSCommunicationMethod = (MaterialListPreference) findPreference("opengts_server_communication_method");