Commit 24a880e4 authored by Senthil Kumar G S's avatar Senthil Kumar G S Committed by Uze Choi

[IOT-2250] Mediator Android App Crash Fix.

The problem occurred due to incorrect type casting in mediator android sdk.

Change-Id: I3723f3d70be4295328544ab0f9cb129a5ed326ec
Signed-off-by: default avatarSenthil Kumar G S <senthil.gs@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/19893Tested-by: default avatarjenkins-iotivity <jenkins@iotivity.org>
Reviewed-by: default avatarJihun Ha <jihun.ha@samsung.com>
Reviewed-by: default avatarUze Choi <uzchoi@samsung.com>
parent fdb9f85b
......@@ -165,9 +165,9 @@ public class EnrolleeConf
}
if (rep.hasAttribute(ESConstants.OC_RSRVD_ES_SUPPORTEDWIFIMODE)) {
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]));
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]));
}
}
} catch (OcException e) {
......@@ -207,8 +207,10 @@ public class EnrolleeConf
}
if(rep.hasAttribute(ESConstants.OC_RSRVD_ES_SUPPORTEDWIFIFREQ))
return WIFI_FREQ.fromInt(
(int)rep.getValue(ESConstants.OC_RSRVD_ES_SUPPORTEDWIFIFREQ));
{
long freq = rep.getValue(ESConstants.OC_RSRVD_ES_SUPPORTEDWIFIFREQ);
return WIFI_FREQ.fromInt((int)freq);
}
} catch (OcException e) {
Log.e(TAG, "getWiFiFreq is failed.");
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment