Fixing android tester
This commit is contained in:
parent
b47f6f1bb7
commit
f3ed6853d1
5 changed files with 11 additions and 0 deletions
BIN
liblinphone_tester/res/raw/cpim_grammar
Normal file
BIN
liblinphone_tester/res/raw/cpim_grammar
Normal file
Binary file not shown.
BIN
liblinphone_tester/res/raw/vcard_grammar
Normal file
BIN
liblinphone_tester/res/raw/vcard_grammar
Normal file
Binary file not shown.
|
@ -2,6 +2,7 @@ package org.linphone.tester;
|
||||||
|
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.app.Activity;
|
import android.app.Activity;
|
||||||
|
import android.content.Context;
|
||||||
import android.content.Intent;
|
import android.content.Intent;
|
||||||
import android.view.Gravity;
|
import android.view.Gravity;
|
||||||
import android.view.Menu;
|
import android.view.Menu;
|
||||||
|
@ -19,6 +20,7 @@ public class SuitesActivity extends Activity {
|
||||||
if (extras != null) {
|
if (extras != null) {
|
||||||
mSuite = extras.getString("suite");
|
mSuite = extras.getString("suite");
|
||||||
if(mSuite != null) {
|
if(mSuite != null) {
|
||||||
|
Tester.setApplicationContext(getBaseContext());
|
||||||
this.setTitle(this.getResources().getString(R.string.app_name) + " | " + mSuite);
|
this.setTitle(this.getResources().getString(R.string.app_name) + " | " + mSuite);
|
||||||
TesterList suitesTest = new TesterList();
|
TesterList suitesTest = new TesterList();
|
||||||
suitesTest.run(new String[]{"tester", "--list-tests", mSuite});
|
suitesTest.run(new String[]{"tester", "--list-tests", mSuite});
|
||||||
|
@ -59,6 +61,11 @@ public class SuitesActivity extends Activity {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void onDestroy() {
|
||||||
|
Tester.removeApplicationContext();
|
||||||
|
super.onDestroy();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean onCreateOptionsMenu(Menu menu) {
|
public boolean onCreateOptionsMenu(Menu menu) {
|
||||||
|
|
|
@ -6,6 +6,7 @@ import org.linphone.core.Factory;
|
||||||
import org.linphone.mediastream.Version;
|
import org.linphone.mediastream.Version;
|
||||||
|
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
|
import android.content.Context;
|
||||||
|
|
||||||
public class Tester {
|
public class Tester {
|
||||||
public static String TAG = "liblinphone-tester";
|
public static String TAG = "liblinphone-tester";
|
||||||
|
@ -49,6 +50,8 @@ public class Tester {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static native void setApplicationContext(Context ct);
|
||||||
|
public static native void removeApplicationContext();
|
||||||
public native int run(String args[]);
|
public native int run(String args[]);
|
||||||
public static native void keepAccounts(boolean keep);
|
public static native void keepAccounts(boolean keep);
|
||||||
public static native void clearAccounts();
|
public static native void clearAccounts();
|
||||||
|
|
|
@ -241,6 +241,7 @@ install: install-apk run-linphone
|
||||||
install-test:
|
install-test:
|
||||||
\t$(MAKE) -C liblinphone_tester copy-libs
|
\t$(MAKE) -C liblinphone_tester copy-libs
|
||||||
\t$(MAKE) -C liblinphone_tester copy-files
|
\t$(MAKE) -C liblinphone_tester copy-files
|
||||||
|
\t./gradlew -b liblinphone_tester/build.gradle clean
|
||||||
\t./gradlew -b liblinphone_tester/build.gradle assembleDebug
|
\t./gradlew -b liblinphone_tester/build.gradle assembleDebug
|
||||||
\t./gradlew -b liblinphone_tester/build.gradle installDebug
|
\t./gradlew -b liblinphone_tester/build.gradle installDebug
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue