Fix Jira issues(IOT-1268)
authorJihun Ha <jihun.ha@samsung.com>
Sun, 11 Sep 2016 11:56:29 +0000 (20:56 +0900)
committerUze Choi <uzchoi@samsung.com>
Mon, 12 Sep 2016 01:55:38 +0000 (01:55 +0000)
IOT-1268:
  [ES][Android] APIs crashed with null parameter
  (https://jira.iotivity.org/browse/IOT-1268)

Change-Id: I7b3bb5b9eb78df12b60e852a878ee73cb0d1c189
Signed-off-by: Parkhi <h_w.park@samsung.com>
Signed-off-by: Jihun Ha <jihun.ha@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11521
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/CloudProp.java [changed mode: 0644->0755]
service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/DeviceProp.java [changed mode: 0644->0755]

old mode 100644 (file)
new mode 100755 (executable)
index f2e545b..008828c
@@ -44,6 +44,18 @@ public class CloudProp {
 
     public void setCloudProp(String authCode, String authProvider, String ciServer)
     {
+        if(authCode == null)
+        {
+            authCode = "";
+        }
+        if(authProvider == null)
+        {
+            authProvider = "";
+        }
+        if(ciServer == null)
+        {
+            ciServer = "";
+        }
         try {
             mRep.setValue(ESConstants.OC_RSRVD_ES_AUTHCODE, authCode);
             mRep.setValue(ESConstants.OC_RSRVD_ES_AUTHPROVIDER, authProvider);
old mode 100644 (file)
new mode 100755 (executable)
index f8669c4..2cff252
@@ -44,6 +44,14 @@ public class DeviceProp {
 
     public void setWiFiProp(String ssid, String pwd, WIFI_AUTHTYPE authtype, WIFI_ENCTYPE enctype)
     {
+        if(ssid == null)
+        {
+            ssid = "";
+        }
+        if(pwd == null)
+        {
+            pwd = "";
+        }
         try
         {
             mRep.setValue(ESConstants.OC_RSRVD_ES_SSID, ssid);
@@ -57,6 +65,18 @@ public class DeviceProp {
 
     public void setDevConfProp(String language, String country, String location)
     {
+        if(language == null)
+        {
+            language = "";
+        }
+        if(country == null)
+        {
+            country = "";
+        }
+        if(location == null)
+        {
+            location = "";
+        }
         try {
             mRep.setValue(ESConstants.OC_RSRVD_ES_LANGUAGE, language);
             mRep.setValue(ESConstants.OC_RSRVD_ES_COUNTRY, country);