Commit 9d7d6083 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed android compilation issues

parent b1ae558b
......@@ -170,17 +170,19 @@ void AndroidPlatformHelpers::releaseCpuLock(){
}
std::string AndroidPlatformHelpers::getDataPath(){
JNIEnv *env = ms_get_jni_env();
jstring jdata_path = (jstring)env->CallObjectMethod(mJavaHelper,mGetDataPathId);
const char *data_path = GetStringUTFChars(env, jdata_path);
string dataPath = data_path;
std::string dataPath = data_path;
ReleaseStringUTFChars(env, jdata_path, data_path);
return dataPath;
}
std::string AndroidPlatformHelpers::getConfigPath(){
JNIEnv *env = ms_get_jni_env();
jstring jconfig_path = (jstring)env->CallObjectMethod(mJavaHelper,mGetConfigPathId);
const char *config_path = GetStringUTFChars(env, jconfig_path);
string configPath = config_path;
std::string configPath = config_path;
ReleaseStringUTFChars(env, jconfig_path, config_path);
return configPath;
}
......
......@@ -41,9 +41,9 @@ const string &Paths::getPath (Paths::Type type, void *context) {
case Data:
return SysPaths::getDataPath(context);
case Config:
default:
return SysPaths::getConfigPath(context);
}
return NULL;
}
LINPHONE_END_NAMESPACE
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment