Fix crash when creating the java AndroidPlatforHelper object, because initCore no longer exists.

This commit is contained in:
Simon Morlat 2018-06-17 11:45:37 +02:00
parent 142fdca155
commit 634aaf3cbf
2 changed files with 6 additions and 5 deletions

View file

@ -106,9 +106,6 @@ AndroidPlatformHelpers::AndroidPlatformHelpers (LinphoneCore *lc, void *systemCo
mGetConfigPathId = getMethodId(env, klass, "getConfigPath", "()Ljava/lang/String;");
mGetNativeLibraryDirId = getMethodId(env, klass, "getNativeLibraryDir", "()Ljava/lang/String;");
jmethodID initCoreId = getMethodId(env, klass, "initCore", "(J)V");
env->CallVoidMethod(mJavaHelper, initCoreId, lc);
jobject pm = env->CallObjectMethod(mJavaHelper, mGetPowerManagerId);
belle_sip_wake_lock_init(env, pm);

View file

@ -83,7 +83,7 @@ public class AndroidPlatformHelper {
mWifiLock.setReferenceCounted(true);
String basePath = mContext.getFilesDir().getAbsolutePath();
//make sur to follow same path as unix version of the sdk
//make sure to follow same path as unix version of the sdk
mLinphoneRootCaFile = basePath + "/share/linphone/rootca.pem";
mRingSoundFile = basePath + "/share/sounds/linphone/rings/notes_of_the_optimistic.mkv";
mRingbackSoundFile = basePath + "/share/sounds/linphone/ringback.wav";
@ -93,7 +93,11 @@ public class AndroidPlatformHelper {
mGrammarVcardFile = basePath + "/share/belr/grammars/vcard_grammar";
mUserCertificatePath = basePath;
copyAssetsFromPackage();
try{
copyAssetsFromPackage();
}catch (IOException e) {
Log.e("AndroidPlatformHelper(): failed to install some resources.");
}
}