From 2683440cefa7683907e92f69c4695f6c9ca5baaf Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 5 Sep 2018 17:50:00 +0200 Subject: [PATCH] Set user-certificates directory. It was not created and not passed to the library. --- src/android/org/linphone/LinphoneManager.java | 11 ++++++++++- submodules/linphone | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/src/android/org/linphone/LinphoneManager.java b/src/android/org/linphone/LinphoneManager.java index 20bb27ea4..85bed9187 100644 --- a/src/android/org/linphone/LinphoneManager.java +++ b/src/android/org/linphone/LinphoneManager.java @@ -193,6 +193,7 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou mCallLogDatabaseFile = basePath + "/linphone-log-history.db"; mFriendsDatabaseFile = basePath + "/linphone-friends.db"; mRingSoundFile = basePath + "/ringtone.mkv"; + mUserCertsPath = basePath + "/user-certs"; mPrefs = LinphonePreferences.instance(); mAudioManager = ((AudioManager) c.getSystemService(Context.AUDIO_SERVICE)); @@ -202,6 +203,13 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou mSensorManager = (SensorManager) c.getSystemService(Context.SENSOR_SERVICE); mProximity = mSensorManager.getDefaultSensor(Sensor.TYPE_PROXIMITY); mR = c.getResources(); + + File f=new File(mUserCertsPath); + if(!f.exists()){ + if(!f.mkdir()){ + Log.e(mUserCertsPath+" can't be created."); + } + } } private static final int LINPHONE_VOLUME_STREAM = STREAM_VOICE_CALL; @@ -217,6 +225,7 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou private final String mRingSoundFile; private final String mCallLogDatabaseFile; private final String mFriendsDatabaseFile; + private final String mUserCertsPath; private Timer mTimer; private Map mUnreadChatsPerRoom; @@ -702,10 +711,10 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou Log.e(e, "cannot get version name"); } - mLc.setChatDatabasePath(mChatDatabaseFile); mLc.setCallLogsDatabasePath(mCallLogDatabaseFile); mLc.setFriendsDatabasePath(mFriendsDatabaseFile); + mLc.setUserCertificatesPath(mUserCertsPath); //mLc.setCallErrorTone(Reason.NotFound, mErrorToneFile); enableDeviceRingtone(mPrefs.isDeviceRingtoneEnabled()); diff --git a/submodules/linphone b/submodules/linphone index 8ce4bac39..fc19d242a 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 8ce4bac39652a9c267d24f60e686a9383fb17e14 +Subproject commit fc19d242a581dbca8756ec121bca4046676bc0ed