When manager starts, ensure lime server url is set if account is sip.linphone.org (required for updates since older version)
This commit is contained in:
parent
dcac3200f6
commit
94d13a877f
2 changed files with 18 additions and 2 deletions
|
@ -751,16 +751,31 @@ public class LinphoneManager implements CoreListener, SensorEventListener, Accou
|
||||||
|
|
||||||
mCore.migrateLogsFromRcToDb();
|
mCore.migrateLogsFromRcToDb();
|
||||||
|
|
||||||
// Migrate existing linphone accounts to have conference factory uri set
|
// Migrate existing linphone accounts to have conference factory uri and LIME X3Dh url set
|
||||||
|
String uri = getString(R.string.default_conference_factory_uri);
|
||||||
for (ProxyConfig lpc : mCore.getProxyConfigList()) {
|
for (ProxyConfig lpc : mCore.getProxyConfigList()) {
|
||||||
if (lpc.getConferenceFactoryUri() == null
|
if (lpc.getConferenceFactoryUri() == null
|
||||||
&& lpc.getIdentityAddress()
|
&& lpc.getIdentityAddress()
|
||||||
.getDomain()
|
.getDomain()
|
||||||
.equals(getString(R.string.default_domain))) {
|
.equals(getString(R.string.default_domain))) {
|
||||||
lpc.edit();
|
lpc.edit();
|
||||||
lpc.setConferenceFactoryUri(getString(R.string.default_conference_factory_uri));
|
Log.i(
|
||||||
|
"[Manager] Setting conference factory on proxy config "
|
||||||
|
+ lpc.getIdentityAddress().asString()
|
||||||
|
+ " to default value: "
|
||||||
|
+ uri);
|
||||||
|
lpc.setConferenceFactoryUri(uri);
|
||||||
lpc.done();
|
lpc.done();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mCore.limeX3DhAvailable()) {
|
||||||
|
String url = mCore.getLimeX3DhServerUrl();
|
||||||
|
if (url == null || url.length() == 0) {
|
||||||
|
url = getString(R.string.default_lime_x3dh_server_url);
|
||||||
|
Log.i("[Manager] Setting LIME X3Dh server url to default value: " + url);
|
||||||
|
mCore.setLimeX3DhServerUrl(url);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mServiceContext.getResources().getBoolean(R.bool.enable_push_id)) {
|
if (mServiceContext.getResources().getBoolean(R.bool.enable_push_id)) {
|
||||||
|
|
|
@ -4,6 +4,7 @@
|
||||||
<!-- Global -->
|
<!-- Global -->
|
||||||
<string name="default_domain">sip.linphone.org</string><!-- Set the default domain used for account creation/addresses -->
|
<string name="default_domain">sip.linphone.org</string><!-- Set the default domain used for account creation/addresses -->
|
||||||
<string name="default_conference_factory_uri">sip:conference-factory@sip.linphone.org</string>
|
<string name="default_conference_factory_uri">sip:conference-factory@sip.linphone.org</string>
|
||||||
|
<string name="default_lime_x3dh_server_url">http://sip-staging.linphone.org:8083/flexisip-account-manager/x3dh-25519.php</string>
|
||||||
<string name="rls_uri">sip:rls@sip.linphone.org</string>
|
<string name="rls_uri">sip:rls@sip.linphone.org</string>
|
||||||
<string name="user_agent">LinphoneAndroid</string>
|
<string name="user_agent">LinphoneAndroid</string>
|
||||||
<bool name="orientation_portrait_only">false</bool>
|
<bool name="orientation_portrait_only">false</bool>
|
||||||
|
|
Loading…
Reference in a new issue