Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
liblinphone
Commits
3bfbbae1
Commit
3bfbbae1
authored
Oct 16, 2017
by
Sylvain Berfini
🐮
Browse files
Fixed migration for dialplan lookups
parent
0b95c162
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
2 deletions
+36
-2
wrappers/java/classes/LinphoneUtils.java
wrappers/java/classes/LinphoneUtils.java
+34
-0
wrappers/java/migration.sh
wrappers/java/migration.sh
+2
-2
No files found.
wrappers/java/classes/LinphoneUtils.java
0 → 100644
View file @
3bfbbae1
/*
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
);
}
}
wrappers/java/migration.sh
View file @
3bfbbae1
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment