Android: Add content provider support to File::ScanDirectoryTree

This commit is contained in:
JosJuice committed 2020-12-20 13:24:54 +01:00
1 parent 525268f043
commit 2126f62111
6 files changed
+255 -22

No files matched your search

@@ -121,6 +121,15 @@ std::string GetAndroidContentDisplayName(const std::string& uri)
return display_name ? GetJString(env, reinterpret_cast<jstring>(display_name)) : "";
}
std::vector<std::string> GetAndroidContentChildNames(const std::string& uri)
{
JNIEnv* env = IDCache::GetEnvForThread();
jobject children =
env->CallStaticObjectMethod(IDCache::GetContentHandlerClass(),
IDCache::GetContentHandlerGetChildNames(), ToJString(env, uri));
return JStringArrayToVector(env, reinterpret_cast<jobjectArray>(children));
}
int GetNetworkIpAddress()
{
JNIEnv* env = IDCache::GetEnvForThread();