summaryrefslogtreecommitdiff
path: root/vdrmanager/src/de/bjusystems
diff options
context:
space:
mode:
Diffstat (limited to 'vdrmanager/src/de/bjusystems')
-rw-r--r--vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java14
1 files changed, 12 insertions, 2 deletions
diff --git a/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java b/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java
index 48b3389..7998936 100644
--- a/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java
+++ b/vdrmanager/src/de/bjusystems/vdrmanager/gui/Utils.java
@@ -97,11 +97,21 @@ public class Utils {
&& now < event.getStop().getTime();
}
+ private static String trimToEmpty(String str){
+ if(str == null){
+ return "";
+ }
+ if(TextUtils.isEmpty(str)){
+ return "";
+ }
+ return str;
+ }
+
private static String getBaseUrl() {
StringBuilder sb = new StringBuilder();
Preferences p = Preferences.getPreferences();
- String auth = p.getStreamingUsername().trim() + ":"
- + p.getStreamingPassword();
+ String auth = trimToEmpty(p.getStreamingUsername()) + ":"
+ + trimToEmpty(p.getStreamingPassword());
if (auth.length() == 1) {
auth = "";
} else {