Revert "[IOT-2250] Mediator Android App Crash Fix."
authorSenthil Kumar G S <senthil.gs@samsung.com>
Fri, 19 May 2017 13:16:43 +0000 (13:16 +0000)
committerUze Choi <uzchoi@samsung.com>
Sun, 21 May 2017 05:11:19 +0000 (05:11 +0000)
This reverts commit 24a880e4a5e02cd40451a66857d3c92790f6f588.

Reason: Dependent patch https://gerrit.iotivity.org/gerrit/#/c/20007/ got reverted.

Change-Id: I19502c667b56a762eba3987d3f372e806f78088c
Signed-off-by: Senthil Kumar G S <senthil.gs@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/20149
Reviewed-by: Pawel Winogrodzki <pawelwi@microsoft.com>
Tested-by: jenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/easy-setup/mediator/richsdk/android/EasySetupCore/src/main/java/org/iotivity/service/easysetup/mediator/EnrolleeConf.java

index 6c53c19..fa4cfb2 100755 (executable)
@@ -165,9 +165,9 @@ public class EnrolleeConf
                     }
 
                     if (rep.hasAttribute(ESConstants.OC_RSRVD_ES_SUPPORTEDWIFIMODE)) {
-                        long modes_long[] = rep.getValue(ESConstants.OC_RSRVD_ES_SUPPORTEDWIFIMODE);
-                        for (int i = 0 ; i < modes_long.length ; ++i) {
-                            modes.add(WIFI_MODE.fromInt((int)modes_long[i]));
+                        int modes_int[] = rep.getValue(ESConstants.OC_RSRVD_ES_SUPPORTEDWIFIMODE);
+                        for (int i = 0 ; i < modes_int.length ; ++i) {
+                            modes.add(WIFI_MODE.fromInt(modes_int[i]));
                         }
                     }
                 } catch (OcException e) {
@@ -207,10 +207,8 @@ public class EnrolleeConf
                     }
 
                     if(rep.hasAttribute(ESConstants.OC_RSRVD_ES_SUPPORTEDWIFIFREQ))
-                    {
-                        long freq = rep.getValue(ESConstants.OC_RSRVD_ES_SUPPORTEDWIFIFREQ);
-                        return WIFI_FREQ.fromInt((int)freq);
-                    }
+                        return WIFI_FREQ.fromInt(
+                                (int)rep.getValue(ESConstants.OC_RSRVD_ES_SUPPORTEDWIFIFREQ));
                 } catch (OcException e) {
                     Log.e(TAG, "getWiFiFreq is failed.");
                 }