Fix Android SetPropertyValue function call
authorHabib Virji <habib.virji@samsung.com>
Thu, 1 Dec 2016 12:01:43 +0000 (12:01 +0000)
committerUze Choi <uzchoi@samsung.com>
Fri, 2 Dec 2016 01:02:21 +0000 (01:02 +0000)
setPropertyValue call in the Android was swapped, compared to function call how it  was in the JNI layer.
setPropertyValue0 is for passing string array and setPropertyValue1 is passing string.

Change-Id: I91c480f162cc53712a68bef078371559fd2eff21
Signed-off-by: Habib Virji <habib.virji@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/15025
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Phil Coval <philippe.coval@osg.samsung.com>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
android/android_api/base/src/main/java/org/iotivity/base/OcPlatform.java

index 539a3fd..89e7fae 100644 (file)
@@ -570,13 +570,13 @@ public final class OcPlatform {
     public static void setPropertyValue(
             int path, String propName, String propValue) throws OcException {
         OcPlatform.initCheck();
-        OcPlatform.setPropertyValue0(path, propName, propValue);
+        OcPlatform.setPropertyValue1(path, propName, propValue);
     }
 
     public static void setPropertyValue(
             int path, String propName, List<String> propValue) throws OcException {
         OcPlatform.initCheck();
-        OcPlatform.setPropertyValue1(path, propName, propValue.toArray(new String[propValue.size()]));
+        OcPlatform.setPropertyValue0(path, propName, propValue.toArray(new String[propValue.size()]));
     }
 
     public static void getPropertyValue(
@@ -585,14 +585,14 @@ public final class OcPlatform {
         OcPlatform.getPropertyValue0(path, propName, propValue);
     }
 
-    private static native void setPropertyValue0(
+    private static native void setPropertyValue1(
             int path,
             String propName,
             String propValue
     ) throws OcException;
 
 
-    private static native void setPropertyValue1(
+    private static native void setPropertyValue0(
             int path,
             String propName,
             String[] propValue