diff --git a/coreapi/android-helpers.cpp b/coreapi/android-helpers.cpp index bc1970a68..b5fa9d2ed 100644 --- a/coreapi/android-helpers.cpp +++ b/coreapi/android-helpers.cpp @@ -17,7 +17,7 @@ along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */ - +#ifdef __ANDROID__ #include "private.h" #include "platform-helpers.h" @@ -25,7 +25,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. -#ifdef __ANDROID__ + namespace LinphonePrivate{ diff --git a/java/impl/org/linphone/core/util/AndroidPlatformHelper.java b/java/impl/org/linphone/core/util/AndroidPlatformHelper.java index aeb44e15b..d5fe34f68 100644 --- a/java/impl/org/linphone/core/util/AndroidPlatformHelper.java +++ b/java/impl/org/linphone/core/util/AndroidPlatformHelper.java @@ -49,7 +49,7 @@ public class AndroidPlatformHelper{ public AndroidPlatformHelper(Object ctx_obj){ Context ctx = (Context) ctx_obj; - WifiManager wifiMgr = ctx.getSystemService(WifiManager.class); + WifiManager wifiMgr = (WifiManager)ctx.getSystemService(Context.WIFI_SERVICE); mPowerManager = (PowerManager) ctx.getSystemService(Context.POWER_SERVICE); mConnectivityManager = (ConnectivityManager) ctx.getSystemService(Context.CONNECTIVITY_SERVICE);