From d1843c8b6310533a32c10c08e3aeb511a5f8be08 Mon Sep 17 00:00:00 2001 From: bju Date: Sun, 20 Mar 2011 00:45:32 +0100 Subject: Removed unneded settings --- .../src/de/bjusystems/androvdr/data/Preferences.java | 11 ----------- .../bjusystems/androvdr/utils/svdrp/SvdrpClient.java | 6 +----- .../androvdr/utils/wakeup/AsyncWakeupTask.java | 18 +++++------------- 3 files changed, 6 insertions(+), 29 deletions(-) (limited to 'androvdr/src/de') diff --git a/androvdr/src/de/bjusystems/androvdr/data/Preferences.java b/androvdr/src/de/bjusystems/androvdr/data/Preferences.java index 2caaf32..f317915 100644 --- a/androvdr/src/de/bjusystems/androvdr/data/Preferences.java +++ b/androvdr/src/de/bjusystems/androvdr/data/Preferences.java @@ -23,8 +23,6 @@ public class Preferences { private String channels; /** Enable remote wakeup */ private boolean wakeupEnabled; - /** Wakeup by HTTP request */ - private boolean wakeupHttp; /** URL of the wakeup script */ private String wakeupUrl; /** User for wakeup */ @@ -105,14 +103,6 @@ public class Preferences { return wakeupEnabled; } - /** - * Gets the wakeup method - * @return true, wenn wakeup by http request - */ - public boolean isWakeupHttp() { - return wakeupHttp; - } - /** * Gets the URL for the wakeup request * @return wakeup url @@ -248,7 +238,6 @@ public class Preferences { prefs.filterChannels = getBoolean(context, sharedPrefs, R.string.channel_filter_filter_key, false); prefs.wakeupEnabled = getBoolean(context, sharedPrefs, R.string.wakeup_enabled_key, false); - prefs.wakeupHttp = getBoolean(context, sharedPrefs, R.string.wakeup_svdrphelper_key, false); prefs.wakeupUrl = getString(context, sharedPrefs, R.string.wakeup_url_key, ""); prefs.wakeupUser = getString(context, sharedPrefs, R.string.wakeup_user_key, ""); prefs.wakeupPassword = getString(context, sharedPrefs, R.string.wakeup_password_key, ""); diff --git a/androvdr/src/de/bjusystems/androvdr/utils/svdrp/SvdrpClient.java b/androvdr/src/de/bjusystems/androvdr/utils/svdrp/SvdrpClient.java index 868e2f7..a3eadff 100644 --- a/androvdr/src/de/bjusystems/androvdr/utils/svdrp/SvdrpClient.java +++ b/androvdr/src/de/bjusystems/androvdr/utils/svdrp/SvdrpClient.java @@ -104,11 +104,7 @@ public abstract class SvdrpClient { try { // connect informListener(SvdrpEvent.CONNECTING, null); - if (prefs.isSSL()) { - throw new IllegalArgumentException("SSL not implemented yet"); - } else { - socket = new Socket(prefs.getSvdrpHost(), prefs.getSvdrpPort()); - } + socket = new Socket(prefs.getSvdrpHost(), prefs.getSvdrpPort()); informListener(SvdrpEvent.CONNECTED, null); } catch (final IOException e) { informListener(SvdrpEvent.CONNECT_ERROR, null); diff --git a/androvdr/src/de/bjusystems/androvdr/utils/wakeup/AsyncWakeupTask.java b/androvdr/src/de/bjusystems/androvdr/utils/wakeup/AsyncWakeupTask.java index 7002140..a5603db 100644 --- a/androvdr/src/de/bjusystems/androvdr/utils/wakeup/AsyncWakeupTask.java +++ b/androvdr/src/de/bjusystems/androvdr/utils/wakeup/AsyncWakeupTask.java @@ -33,19 +33,11 @@ public class AsyncWakeupTask extends AsyncTask { boolean ok = false; try { - // send request - if (prefs.isWakeupHttp()) { - // wakeup by http request - final HttpHelper httpHelper = new HttpHelper(); - httpHelper.performGet(prefs.getWakeupUrl(), prefs.getWakeupUser(), prefs.getWakeupPassword(), null); - // request sent - ok = true; - } else { - // wakeup by SvdrpHelper - final WakeupClient client = new WakeupClient(); - client.run(); - ok = client.getState().equals(WakeupState.OK); - } + // wakeup by http request + final HttpHelper httpHelper = new HttpHelper(); + httpHelper.performGet(prefs.getWakeupUrl(), prefs.getWakeupUser(), prefs.getWakeupPassword(), null); + // request sent + ok = true; } catch (final Exception e) { } -- cgit v1.2.3