IP/Top: Add Android network interface

This commit is contained in:
Sepalani committed 2020-11-27 19:10:28 +04:00
1 parent 26302c2257
commit 20ebed51bb
7 files changed
+204 -2

No files matched your search

@@ -65,3 +65,24 @@ bool DeleteAndroidContent(const std::string& uri)
return env->CallStaticBooleanMethod(IDCache::GetContentHandlerClass(),
IDCache::GetContentHandlerDelete(), ToJString(env, uri));
}
int GetNetworkIpAddress()
{
JNIEnv* env = IDCache::GetEnvForThread();
return env->CallStaticIntMethod(IDCache::GetNetworkHelperClass(),
IDCache::GetNetworkHelperGetNetworkIpAddress());
}
int GetNetworkPrefixLength()
{
JNIEnv* env = IDCache::GetEnvForThread();
return env->CallStaticIntMethod(IDCache::GetNetworkHelperClass(),
IDCache::GetNetworkHelperGetNetworkPrefixLength());
}
int GetNetworkGateway()
{
JNIEnv* env = IDCache::GetEnvForThread();
return env->CallStaticIntMethod(IDCache::GetNetworkHelperClass(),
IDCache::GetNetworkHelperGetNetworkGateway());
}