Fix liblinphone_tester

This commit is contained in:
Yann Diorcet 2013-03-08 17:03:00 +01:00
parent 6ca676cd7b
commit e81688d10c
6 changed files with 59 additions and 7 deletions

View file

@ -20,7 +20,9 @@
android:theme="@style/AppTheme" > android:theme="@style/AppTheme" >
<activity <activity
android:name="org.linphone.tester.MainActivity" android:name="org.linphone.tester.MainActivity"
android:label="@string/app_name" > android:label="@string/app_name"
android:screenOrientation="nosensor"
android:launchMode="singleTask">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.MAIN" /> <action android:name="android.intent.action.MAIN" />
@ -29,11 +31,15 @@
</activity> </activity>
<activity <activity
android:name="org.linphone.tester.LogsActivity" android:name="org.linphone.tester.LogsActivity"
android:label="@string/title_activity_logs" > android:label="@string/title_activity_logs"
android:screenOrientation="nosensor"
android:launchMode="singleTask">
</activity> </activity>
<activity <activity
android:name="org.linphone.tester.SuitesActivity" android:name="org.linphone.tester.SuitesActivity"
android:label="@string/title_activity_suites" > android:label="@string/title_activity_suites"
android:screenOrientation="nosensor"
android:launchMode="singleTask">
</activity> </activity>
</application> </application>

View file

@ -0,0 +1,45 @@
[sip]
sip_port=5082
sip_tcp_port=5082
sip_tls_port=5083
default_proxy=0
ping_with_options=0
register_only_when_network_is_up=0
incoming_calls_early_media=1
[auth_info_0]
username=marie
userid=marie
passwd=secret
realm="sip.example.org"
[proxy_0]
reg_proxy=sip2.linphone.org;transport=tcp
reg_route=sip2.linphone.org;transport=tcp;lr
reg_identity=sip:marie@sip.example.org
reg_expires=3600
reg_sendregister=1
publish=0
dial_escape_plus=0
[friend_0]
url="Paupoche" <sip:pauline@sip.example.org>
pol=accept
subscribe=0
[rtp]
audio_rtp_port=8070
video_rtp_port=8072
[video]
display=0
capture=0
show_local=0
size=vga
enabled=0
self_view=0
automatically_initiate=0
automatically_accept=0
device=StaticImage: Static picture

View file

@ -25,7 +25,7 @@ public class LogsActivity extends Activity {
public void run() { public void run() {
String path = mLogsActivity.getFilesDir().getAbsolutePath(); String path = mLogsActivity.getFilesDir().getAbsolutePath();
tester = new TesterLogger(mLogsActivity); tester = new TesterLogger(mLogsActivity);
List<String> list = new LinkedList<String>(Arrays.asList(new String[]{"tester", "--config", path})); List<String> list = new LinkedList<String>(Arrays.asList(new String[]{"tester", "--verbose", "--config", path}));
list.addAll(Arrays.asList(mArgs)); list.addAll(Arrays.asList(mArgs));
String[] array = list.toArray(new String[list.size()]); String[] array = list.toArray(new String[list.size()]);
tester.run(array); tester.run(array);

View file

@ -36,6 +36,7 @@ public class MainActivity extends Activity {
try { try {
copyFromPackage(R.raw.laure_rc, new File("laure_rc").getName()); copyFromPackage(R.raw.laure_rc, new File("laure_rc").getName());
copyFromPackage(R.raw.marie_rc, new File("marie_rc").getName()); copyFromPackage(R.raw.marie_rc, new File("marie_rc").getName());
copyFromPackage(R.raw.marie_early_rc, new File("marie_early_rc").getName());
copyFromPackage(R.raw.multi_account_lrc, new File("multi_account_lrc").getName()); copyFromPackage(R.raw.multi_account_lrc, new File("multi_account_lrc").getName());
copyFromPackage(R.raw.pauline_rc, new File("pauline_rc").getName()); copyFromPackage(R.raw.pauline_rc, new File("pauline_rc").getName());
} catch (IOException e) { } catch (IOException e) {
@ -47,7 +48,7 @@ public class MainActivity extends Activity {
TesterList suitesTest = new TesterList(); TesterList suitesTest = new TesterList();
suitesTest.run(new String[]{"tester", "--list-suites"}); suitesTest.run(new String[]{"tester", "--list-suites"});
LinearLayout layout = ((LinearLayout)findViewById(R.id.suites_list)); LinearLayout layout = ((LinearLayout)findViewById(R.id.suites_list));
layout.removeAllViewsInLayout(); layout.removeAllViews();
addButton(layout, "All", null); addButton(layout, "All", null);
for(String str: suitesTest.getList()) { for(String str: suitesTest.getList()) {
str = str.trim(); str = str.trim();

View file

@ -22,7 +22,7 @@ public class SuitesActivity extends Activity {
TesterList suitesTest = new TesterList(); TesterList suitesTest = new TesterList();
suitesTest.run(new String[]{"tester", "--list-tests", mSuite}); suitesTest.run(new String[]{"tester", "--list-tests", mSuite});
LinearLayout layout = ((LinearLayout)findViewById(R.id.tests_list)); LinearLayout layout = ((LinearLayout)findViewById(R.id.tests_list));
layout.removeAllViewsInLayout(); layout.removeAllViews();
addButton(layout, "All", null); addButton(layout, "All", null);
for(String str: suitesTest.getList()) { for(String str: suitesTest.getList()) {
str = str.trim(); str = str.trim();