aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xbmc/platform/android/network/NetworkAndroid.cpp16
1 files changed, 7 insertions, 9 deletions
diff --git a/xbmc/platform/android/network/NetworkAndroid.cpp b/xbmc/platform/android/network/NetworkAndroid.cpp
index 0db2e99c3b..738bed7cdd 100644
--- a/xbmc/platform/android/network/NetworkAndroid.cpp
+++ b/xbmc/platform/android/network/NetworkAndroid.cpp
@@ -6,17 +6,15 @@
* See LICENSES/README.md for more information.
*/
-
#include "NetworkAndroid.h"
#include "utils/StringUtils.h"
#include "utils/log.h"
-#include "platform/android/activity/XBMCApp.h"
-
#include <mutex>
#include <androidjni/ConnectivityManager.h>
+#include <androidjni/Context.h>
#include <androidjni/InetAddress.h>
#include <androidjni/LinkAddress.h>
#include <androidjni/NetworkInfo.h>
@@ -50,7 +48,7 @@ std::vector<std::string> CNetworkInterfaceAndroid::GetNameServers()
bool CNetworkInterfaceAndroid::IsEnabled() const
{
- CJNIConnectivityManager connman(CXBMCApp::getSystemService(CJNIContext::CONNECTIVITY_SERVICE));
+ CJNIConnectivityManager connman(CJNIContext::getSystemService(CJNIContext::CONNECTIVITY_SERVICE));
CJNINetworkInfo ni = connman.getNetworkInfo(m_network);
if (!ni)
return false;
@@ -60,7 +58,7 @@ bool CNetworkInterfaceAndroid::IsEnabled() const
bool CNetworkInterfaceAndroid::IsConnected() const
{
- CJNIConnectivityManager connman(CXBMCApp::getSystemService(CJNIContext::CONNECTIVITY_SERVICE));
+ CJNIConnectivityManager connman(CJNIContext::getSystemService(CJNIContext::CONNECTIVITY_SERVICE));
CJNINetworkInfo ni = connman.getNetworkInfo(m_network);
if (!ni)
return false;
@@ -237,7 +235,7 @@ CNetworkAndroid::CNetworkAndroid() : CNetworkBase(), CJNIXBMCConnectivityManager
{
RetrieveInterfaces();
- CJNIConnectivityManager connman{CXBMCApp::getSystemService(CJNIContext::CONNECTIVITY_SERVICE)};
+ CJNIConnectivityManager connman{CJNIContext::getSystemService(CJNIContext::CONNECTIVITY_SERVICE)};
connman.registerDefaultNetworkCallback(this->get_raw());
}
@@ -248,7 +246,7 @@ CNetworkAndroid::~CNetworkAndroid()
for (auto intf : m_oldInterfaces)
delete intf;
- CJNIConnectivityManager connman{CXBMCApp::getSystemService(CJNIContext::CONNECTIVITY_SERVICE)};
+ CJNIConnectivityManager connman{CJNIContext::getSystemService(CJNIContext::CONNECTIVITY_SERVICE)};
connman.unregisterNetworkCallback(this->get_raw());
}
@@ -331,7 +329,7 @@ void CNetworkAndroid::RetrieveInterfaces()
m_oldInterfaces = m_interfaces;
m_interfaces.clear();
- CJNIConnectivityManager connman(CXBMCApp::getSystemService(CJNIContext::CONNECTIVITY_SERVICE));
+ CJNIConnectivityManager connman(CJNIContext::getSystemService(CJNIContext::CONNECTIVITY_SERVICE));
std::vector<CJNINetwork> networks = connman.getAllNetworks();
for (const auto& n : networks)
@@ -364,7 +362,7 @@ void CNetworkAndroid::onAvailable(const CJNINetwork n)
{
CLog::Log(LOGDEBUG, "CNetworkAndroid::onAvailable The default network is now: {}", n.toString());
- CJNIConnectivityManager connman{CXBMCApp::getSystemService(CJNIContext::CONNECTIVITY_SERVICE)};
+ CJNIConnectivityManager connman{CJNIContext::getSystemService(CJNIContext::CONNECTIVITY_SERVICE)};
CJNILinkProperties lp = connman.getLinkProperties(n);
if (lp)