summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlado <herrlado@gmail.com>2012-01-24 16:35:19 +0100
committerlado <herrlado@gmail.com>2012-01-24 16:35:19 +0100
commitcfd8d5c85dd5b131cba9e5b82313e3e974c56118 (patch)
treeb5d855983d43ddaa0f6db247bb22175183d61b58
parent898b65aec67db883f23241dfd257ded57954fe59 (diff)
downloadvdr-manager-cfd8d5c85dd5b131cba9e5b82313e3e974c56118.tar.gz
vdr-manager-cfd8d5c85dd5b131cba9e5b82313e3e974c56118.tar.bz2
null in getPassword fixed
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/StringUtils.java4
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java7
2 files changed, 10 insertions, 1 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/StringUtils.java b/vdrmanager/src/de/bjusystems/vdrmanager/StringUtils.java
index 18e1d88..b440055 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/StringUtils.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/StringUtils.java
@@ -1,3 +1,4 @@
+
package de.bjusystems.vdrmanager;
import java.util.ArrayList;
@@ -10,6 +11,9 @@ public class StringUtils {
* An empty immutable <code>String</code> array.
*/
public static final String[] EMPTY_STRING_ARRAY = new String[0];
+
+
+ public static final String EMPTY_STRING = "";
/**
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java b/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
index aa70a32..640060f 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/data/Preferences.java
@@ -10,6 +10,7 @@ import android.content.res.Configuration;
import android.text.TextUtils;
import android.widget.Toast;
import de.bjusystems.vdrmanager.R;
+import de.bjusystems.vdrmanager.StringUtils;
import de.bjusystems.vdrmanager.app.Intents;
import de.bjusystems.vdrmanager.data.db.OrmDatabaseHelper;
import de.bjusystems.vdrmanager.gui.VdrListActivity;
@@ -207,7 +208,11 @@ public class Preferences {
* @return SVDRO password
*/
public String getPassword() {
- return getCurrentVdr().getPassword();
+ String pwd = getCurrentVdr().getPassword();
+ if(pwd == null){
+ return StringUtils.EMPTY_STRING;
+ }
+ return pwd;
}
/**