IP/Top: Add Android network interface

This commit is contained in:
Sepalani 2020-10-01 12:10:34 +04:00
parent 26302c2257
commit 20ebed51bb
7 changed files with 204 additions and 2 deletions

View file

@ -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());
}