Commit 3bfbbae1 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩

Fixed migration for dialplan lookups

parent 0b95c162
/*
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
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