mirror of
https://gitlab.linphone.org/BC/public/linphone-iphone.git
synced 2026-01-17 19:18:06 +00:00
Fixed migration for dialplan lookups
This commit is contained in:
parent
0b95c162d3
commit
3bfbbae101
2 changed files with 36 additions and 2 deletions
34
wrappers/java/classes/LinphoneUtils.java
Normal file
34
wrappers/java/classes/LinphoneUtils.java
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
/*
|
||||
LinphoneUtils.java
|
||||
Copyright (C) 2010-2017 Belledonne Communications, Grenoble, France
|
||||
|
||||
This program is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation; either version 2
|
||||
of the License, or (at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
*/
|
||||
|
||||
package org.linphone.core;
|
||||
|
||||
public class LinphoneUtils {
|
||||
public static int getPrefixFromE164(String e164) {
|
||||
DialPlan[] dialPlans = Factory.instance().getDialPlans();
|
||||
DialPlan dialPlan = dialPlans[0];
|
||||
return dialPlan.lookupCccFromE164(e164);
|
||||
}
|
||||
|
||||
public static int getCccFromIso(String countryIso) {
|
||||
DialPlan[] dialPlans = Factory.instance().getDialPlans();
|
||||
DialPlan dialPlan = dialPlans[0];
|
||||
return dialPlan.lookupCccFromIso(countryIso);
|
||||
}
|
||||
}
|
||||
|
|
@ -229,6 +229,8 @@ eval "$SED_START 's/mLc.destroy()/mLc = null/g' $SED_END"
|
|||
eval "$SED_START 's/getAllDialPlan()/getDialPlans()/g' $SED_END"
|
||||
eval "$SED_START 's/getCountryName()/getCountry()/g' $SED_END"
|
||||
eval "$SED_START 's/getMSFactory()/getMediastreamerFactory()/g' $SED_END"
|
||||
eval "$SED_START 's/accountCreator.getPrefix(/LinphoneUtils::getPrefixFromE164(/g' $SED_END"
|
||||
eval "$SED_START 's/proxyConfig.lookupCCCFromIso(/LinphoneUtils::getCccFromIso(/g' $SED_END"
|
||||
|
||||
#Changes in library required
|
||||
#Tunnel
|
||||
|
|
@ -261,8 +263,6 @@ eval "$SED_START 's/getMSFactory()/getMediastreamerFactory()/g' $SED_END"
|
|||
#Core.enableSpeaker / isSpeakerEnabled() => mAudioManager.setSpeakerphoneOn(speakerOn);
|
||||
#Core.enableVideo(true, true) => Core.enableVideoCapture(bool) & Core.enableVideoDisplay(bool)
|
||||
#Core.setCpuCount() => Not needed anymore, can be removed
|
||||
#AccountCreator.getPrefix => linphone_dial_plan_lookup_ccc_from_e164
|
||||
#ProxyConfig.lookupCCCFromIso=> linphone_dial_plan_lookup_ccc_from_iso
|
||||
#Factory.instance().setLogCollectionPath(getFilesDir().getAbsolutePath()); => Core.setLogCollectionPath
|
||||
#Factory.instance().enableLogCollection(isDebugEnabled); => COre.enableLogCollection
|
||||
#Factory.instance().setDebugMode(isDebugEnabled, getString(R.string.app_name)); => Core.setLogLevelMask
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue