Merge remote-tracking branch 'android-master/master' into 3.0.X
This commit is contained in:
commit
13882d8338
11 changed files with 65 additions and 51 deletions
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -38,3 +38,7 @@ tests/*$py.class
|
||||||
tests/build.xml
|
tests/build.xml
|
||||||
tests/project.properties
|
tests/project.properties
|
||||||
ant_password.properties
|
ant_password.properties
|
||||||
|
liblinphone_tester/liblinphonetester_*
|
||||||
|
liblinphone_tester/tests.output
|
||||||
|
tests/linphonetester_*
|
||||||
|
tests/tests.output
|
||||||
|
|
12
.gitmodules
vendored
12
.gitmodules
vendored
|
@ -1,12 +1,12 @@
|
||||||
[submodule "linphone"]
|
[submodule "linphone"]
|
||||||
path = submodules/linphone
|
path = submodules/linphone
|
||||||
url = git://git.linphone.org/linphone
|
url = git://git.linphone.org/linphone.git
|
||||||
[submodule "submodules/externals/gsm"]
|
[submodule "submodules/externals/gsm"]
|
||||||
path = submodules/externals/gsm
|
path = submodules/externals/gsm
|
||||||
url = git://git.linphone.org/gsm.git
|
url = git://git.linphone.org/gsm.git
|
||||||
[submodule "submodules/externals/speex"]
|
[submodule "submodules/externals/speex"]
|
||||||
path = submodules/externals/speex
|
path = submodules/externals/speex
|
||||||
url = git://git.linphone.org/speex
|
url = git://git.linphone.org/speex.git
|
||||||
[submodule "submodules/msilbc"]
|
[submodule "submodules/msilbc"]
|
||||||
path = submodules/msilbc
|
path = submodules/msilbc
|
||||||
url = git://git.linphone.org/msilbc.git
|
url = git://git.linphone.org/msilbc.git
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
ignore = dirty
|
ignore = dirty
|
||||||
[submodule "submodules/msamr"]
|
[submodule "submodules/msamr"]
|
||||||
path = submodules/msamr
|
path = submodules/msamr
|
||||||
url = git://git.linphone.org/msamr
|
url = git://git.linphone.org/msamr.git
|
||||||
[submodule "submodules/externals/libvpx"]
|
[submodule "submodules/externals/libvpx"]
|
||||||
path = submodules/externals/libvpx
|
path = submodules/externals/libvpx
|
||||||
url = https://chromium.googlesource.com/webm/libvpx
|
url = https://chromium.googlesource.com/webm/libvpx
|
||||||
|
@ -52,13 +52,13 @@
|
||||||
url = git://git.linphone.org/bcg729.git
|
url = git://git.linphone.org/bcg729.git
|
||||||
[submodule "submodules/belle-sip"]
|
[submodule "submodules/belle-sip"]
|
||||||
path = submodules/belle-sip
|
path = submodules/belle-sip
|
||||||
url = git://git.linphone.org/belle-sip
|
url = git://git.linphone.org/belle-sip.git
|
||||||
[submodule "submodules/externals/antlr3"]
|
[submodule "submodules/externals/antlr3"]
|
||||||
path = submodules/externals/antlr3
|
path = submodules/externals/antlr3
|
||||||
url = git://git.linphone.org/antlr3.git
|
url = git://git.linphone.org/antlr3.git
|
||||||
[submodule "submodules/externals/libxml2"]
|
[submodule "submodules/externals/libxml2"]
|
||||||
path = submodules/externals/libxml2
|
path = submodules/externals/libxml2
|
||||||
url = git://git.gnome.org/libxml2
|
url = git://git.gnome.org/libxml2.git
|
||||||
[submodule "submodules/externals/libupnp"]
|
[submodule "submodules/externals/libupnp"]
|
||||||
path = submodules/externals/libupnp
|
path = submodules/externals/libupnp
|
||||||
url = git://git.linphone.org/libupnp.git
|
url = git://git.linphone.org/libupnp.git
|
||||||
|
@ -73,7 +73,7 @@
|
||||||
url = git://git.linphone.org/polarssl.git
|
url = git://git.linphone.org/polarssl.git
|
||||||
[submodule "submodules/externals/opus"]
|
[submodule "submodules/externals/opus"]
|
||||||
path = submodules/externals/opus
|
path = submodules/externals/opus
|
||||||
url = git://git.opus-codec.org/opus.git
|
url = git://git.linphone.org/opus.git
|
||||||
[submodule "submodules/mswebrtc"]
|
[submodule "submodules/mswebrtc"]
|
||||||
path = submodules/mswebrtc
|
path = submodules/mswebrtc
|
||||||
url = git://git.linphone.org/mswebrtc.git
|
url = git://git.linphone.org/mswebrtc.git
|
||||||
|
|
2
README
2
README
|
@ -9,7 +9,7 @@ To build liblinphone for Android, you must:
|
||||||
-------------------------------------------
|
-------------------------------------------
|
||||||
0) download the Android sdk with platform-tools and tools updated to latest revision (at least API 16 is needed), then add both 'tools' and 'platform-tools' folders in your path.
|
0) download the Android sdk with platform-tools and tools updated to latest revision (at least API 16 is needed), then add both 'tools' and 'platform-tools' folders in your path.
|
||||||
1) download the Android ndk (=r10c) from google and add it to your path (no symlink !!!).
|
1) download the Android ndk (=r10c) from google and add it to your path (no symlink !!!).
|
||||||
2) install yasm, nasm, curl, ant, rsync and the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig
|
2) install yasm, nasm, curl, ant, rsync, autoconf, automake, aclocal, libtool, pkgconfig, bc, perl-LWP-Protocol-https, patch, vim-common
|
||||||
On 64 bits linux systems you'll need the ia32-libs package
|
On 64 bits linux systems you'll need the ia32-libs package
|
||||||
With the latest Debian (multiarch), you need this:
|
With the latest Debian (multiarch), you need this:
|
||||||
dpkg --add-architecture i386
|
dpkg --add-architecture i386
|
||||||
|
|
|
@ -43,6 +43,7 @@
|
||||||
<resourcecontains resource="${output.file}" substring="longMsg=junit.framework.AssertionFailedError: View with id: '" />
|
<resourcecontains resource="${output.file}" substring="longMsg=junit.framework.AssertionFailedError: View with id: '" />
|
||||||
<resourcecontains resource="${output.file}" substring="longMsg=java.lang.RuntimeException:" />
|
<resourcecontains resource="${output.file}" substring="longMsg=java.lang.RuntimeException:" />
|
||||||
<resourcecontains resource="${output.file}" substring="longMsg=java.lang.NullPointerException:" />
|
<resourcecontains resource="${output.file}" substring="longMsg=java.lang.NullPointerException:" />
|
||||||
|
<resourcecontains resource="${output.file}" substring="android.util.AndroidException: INSTRUMENTATION_FAILED:" />
|
||||||
</or>
|
</or>
|
||||||
</condition>
|
</condition>
|
||||||
<exec executable="bash" unless:set="has.crashed">
|
<exec executable="bash" unless:set="has.crashed">
|
||||||
|
|
|
@ -23,9 +23,10 @@ public class LogsActivity extends Activity {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void run() {
|
public void run() {
|
||||||
String path = mLogsActivity.getFilesDir().getAbsolutePath()+"/config_files";
|
String res_path = mLogsActivity.getFilesDir().getAbsolutePath()+"/config_files";
|
||||||
|
String write_path = mLogsActivity.getCacheDir().getPath();
|
||||||
tester = new TesterLogger(mLogsActivity);
|
tester = new TesterLogger(mLogsActivity);
|
||||||
List<String> list = new LinkedList<String>(Arrays.asList(new String[]{"tester", "--verbose", "--config", path}));
|
List<String> list = new LinkedList<String>(Arrays.asList(new String[]{"tester", "--verbose", "--resource-dir", res_path, "--writable-dir", write_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);
|
||||||
|
@ -37,7 +38,7 @@ public class LogsActivity extends Activity {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private static String join(String [] array, String separator) {
|
private static String join(String [] array, String separator) {
|
||||||
String ret = "";
|
String ret = "";
|
||||||
for(int i = 0; i < array.length; ++i) {
|
for(int i = 0; i < array.length; ++i) {
|
||||||
|
@ -48,7 +49,7 @@ public class LogsActivity extends Activity {
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void onCreate(Bundle savedInstanceState) {
|
protected void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
|
@ -75,7 +76,7 @@ public class LogsActivity extends Activity {
|
||||||
getMenuInflater().inflate(R.menu.activity_logs, menu);
|
getMenuInflater().inflate(R.menu.activity_logs, menu);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addLog(int level, String message) {
|
public void addLog(int level, String message) {
|
||||||
mLogs += message;
|
mLogs += message;
|
||||||
((TextView)findViewById(R.id.textView1)).append(message);
|
((TextView)findViewById(R.id.textView1)).append(message);
|
||||||
|
@ -86,7 +87,7 @@ public class LogsActivity extends Activity {
|
||||||
finish();
|
finish();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void done() {
|
public void done() {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -16,28 +16,28 @@ public class TestUnit extends AndroidTestCase {
|
||||||
private String mSuite;
|
private String mSuite;
|
||||||
private String mTest;
|
private String mTest;
|
||||||
static Boolean isAssetCopied=false;
|
static Boolean isAssetCopied=false;
|
||||||
|
|
||||||
public TestUnit(String suite, String test) {
|
public TestUnit(String suite, String test) {
|
||||||
mSuite = suite;
|
mSuite = suite;
|
||||||
mTest = test;
|
mTest = test;
|
||||||
setName(suite + "/" + test);
|
setName(suite + "/" + test);
|
||||||
}
|
}
|
||||||
|
|
||||||
public TestUnit(String name) {
|
public TestUnit(String name) {
|
||||||
String[] tab = name.split("/");
|
String[] tab = name.split("/");
|
||||||
mSuite = tab[0];
|
mSuite = tab[0];
|
||||||
mTest = tab[1];
|
mTest = tab[1];
|
||||||
setName(name);
|
setName(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
static public void copyAssetsFromPackage(Context ctx) throws IOException {
|
static public void copyAssetsFromPackage(Context ctx) throws IOException {
|
||||||
copyAssetsFromPackage(ctx,"config_files");
|
copyAssetsFromPackage(ctx,"config_files");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static void copyAssetsFromPackage(Context ctx,String fromPath) throws IOException {
|
public static void copyAssetsFromPackage(Context ctx,String fromPath) throws IOException {
|
||||||
new File(ctx.getFilesDir().getPath()+"/"+fromPath).mkdir();
|
new File(ctx.getFilesDir().getPath()+"/"+fromPath).mkdir();
|
||||||
|
|
||||||
for (String f :ctx.getAssets().list(fromPath)) {
|
for (String f :ctx.getAssets().list(fromPath)) {
|
||||||
String current_name=fromPath+"/"+f;
|
String current_name=fromPath+"/"+f;
|
||||||
InputStream lInputStream;
|
InputStream lInputStream;
|
||||||
|
@ -50,8 +50,8 @@ public class TestUnit extends AndroidTestCase {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
FileOutputStream lOutputStream = new FileOutputStream(new File(ctx.getFilesDir().getPath()+"/"+current_name));//ctx.openFileOutput (fromPath+"/"+f, 0);
|
FileOutputStream lOutputStream = new FileOutputStream(new File(ctx.getFilesDir().getPath()+"/"+current_name));//ctx.openFileOutput (fromPath+"/"+f, 0);
|
||||||
|
|
||||||
|
|
||||||
int readByte;
|
int readByte;
|
||||||
byte[] buff = new byte[8048];
|
byte[] buff = new byte[8048];
|
||||||
while (( readByte = lInputStream.read(buff)) != -1) {
|
while (( readByte = lInputStream.read(buff)) != -1) {
|
||||||
|
@ -75,13 +75,15 @@ public class TestUnit extends AndroidTestCase {
|
||||||
protected void tearDown() throws Exception {
|
protected void tearDown() throws Exception {
|
||||||
super.tearDown();
|
super.tearDown();
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected void runTest() {
|
protected void runTest() {
|
||||||
String path = getContext().getFilesDir().getPath()+"/config_files";
|
String res_path = getContext().getFilesDir().getPath()+"/config_files";
|
||||||
|
String write_path = getContext().getCacheDir().getPath();
|
||||||
Tester tester = new Tester();
|
Tester tester = new Tester();
|
||||||
List<String> list = new LinkedList<String>(Arrays.asList(new String[]{"tester", "--verbose", "--config", path, "--suite", mSuite, "--test", mTest}));
|
|
||||||
|
List<String> list = new LinkedList<String>(Arrays.asList(new String[]{"tester", "--verbose", "--resource-dir", res_path, "--writable-dir", write_path, "--suite", mSuite, "--test", mTest}));
|
||||||
String[] array = list.toArray(new String[list.size()]);
|
String[] array = list.toArray(new String[list.size()]);
|
||||||
Assert.assertTrue(tester.run(array) == 0);
|
Assert.assertTrue(tester.run(array) == 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -113,29 +113,33 @@ public class BubbleChat implements LinphoneChatMessage.LinphoneChatMessageListen
|
||||||
if (externalBodyUrl != null || fileTransferContent != null) {
|
if (externalBodyUrl != null || fileTransferContent != null) {
|
||||||
Button download = (Button) view.findViewById(R.id.download);
|
Button download = (Button) view.findViewById(R.id.download);
|
||||||
ImageView imageView = (ImageView) view.findViewById(R.id.image);
|
ImageView imageView = (ImageView) view.findViewById(R.id.image);
|
||||||
|
|
||||||
String appData = message.getAppData();
|
String appData = message.getAppData();
|
||||||
if (appData == null || (!LinphoneManager.getInstance().isMessagePending(nativeMessage) &&
|
if(appData != null && !LinphoneManager.getInstance().isMessagePending(nativeMessage) &&
|
||||||
!nativeMessage.isOutgoing() && appData.contains(context.getString(R.string.temp_photo_name_with_date).split("%s")[0]))) {
|
!nativeMessage.isOutgoing() && appData.contains(context.getString(R.string.temp_photo_name_with_date).split("%s")[0])){
|
||||||
|
appData = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (appData == null ){
|
||||||
LinphoneManager.addListener(this);
|
LinphoneManager.addListener(this);
|
||||||
download.setVisibility(View.VISIBLE);
|
download.setVisibility(View.VISIBLE);
|
||||||
download.setOnClickListener(new OnClickListener() {
|
download.setOnClickListener(new OnClickListener() {
|
||||||
@Override
|
@Override
|
||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
v.setEnabled(false);
|
v.setEnabled(false);
|
||||||
spinner.setVisibility(View.VISIBLE);
|
v.setVisibility(View.GONE);
|
||||||
v.setVisibility(View.GONE);
|
spinner.setVisibility(View.VISIBLE);
|
||||||
String filename = context.getString(R.string.temp_photo_name_with_date).replace("%s", String.valueOf(System.currentTimeMillis()));
|
String filename = context.getString(R.string.temp_photo_name_with_date).replace("%s", String.valueOf(System.currentTimeMillis()));
|
||||||
File file = new File(Environment.getExternalStorageDirectory(), filename);
|
File file = new File(Environment.getExternalStorageDirectory(), filename);
|
||||||
nativeMessage.setListener(LinphoneManager.getInstance());
|
nativeMessage.setAppData(filename);
|
||||||
nativeMessage.setFileTransferFilepath(file.getPath());
|
LinphoneManager.getInstance().addDownloadMessagePending(nativeMessage);
|
||||||
nativeMessage.downloadFile();
|
nativeMessage.setListener(LinphoneManager.getInstance());
|
||||||
nativeMessage.setAppData(filename);
|
nativeMessage.setFileTransferFilepath(file.getPath());
|
||||||
LinphoneManager.getInstance().addDownloadMessagePending(nativeMessage);
|
nativeMessage.downloadFile();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if(LinphoneManager.getInstance().isMessagePending(nativeMessage)){
|
if (LinphoneManager.getInstance().isMessagePending(nativeMessage)) {
|
||||||
LinphoneManager.addListener(this);
|
LinphoneManager.addListener(this);
|
||||||
download.setEnabled(false);
|
download.setEnabled(false);
|
||||||
ProgressBar spinner = (ProgressBar) view.findViewById(R.id.spinner);
|
ProgressBar spinner = (ProgressBar) view.findViewById(R.id.spinner);
|
||||||
|
@ -144,9 +148,10 @@ public class BubbleChat implements LinphoneChatMessage.LinphoneChatMessageListen
|
||||||
} else {
|
} else {
|
||||||
LinphoneManager.removeListener(this);
|
LinphoneManager.removeListener(this);
|
||||||
imageView.setVisibility(View.VISIBLE);
|
imageView.setVisibility(View.VISIBLE);
|
||||||
|
download.setVisibility(View.GONE);
|
||||||
loadBitmap(appData, imageView);
|
loadBitmap(appData, imageView);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
TextView msgView = (TextView) view.findViewById(R.id.message);
|
TextView msgView = (TextView) view.findViewById(R.id.message);
|
||||||
if (msgView != null) {
|
if (msgView != null) {
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 91ae7c164d9d20fd36657943a0aba807b4dfeb4f
|
Subproject commit 1ced637855bb052f2475847c867f648338b84376
|
|
@ -1 +1 @@
|
||||||
Subproject commit 4a4f757f66b02cf8834fd8d7a939bf54b245ad7e
|
Subproject commit 253e1543f13576be66fb4ed5396c0b99eeb08fb4
|
|
@ -1 +1 @@
|
||||||
Subproject commit e7dd35efa0f0d250db66fadb11994b4f48e088b1
|
Subproject commit d3bd19d39ddeee28505c12b9013088d0c3a67204
|
|
@ -35,6 +35,7 @@
|
||||||
<resourcecontains resource="${output.file}" substring="longMsg=junit.framework.AssertionFailedError: View with id: '" />
|
<resourcecontains resource="${output.file}" substring="longMsg=junit.framework.AssertionFailedError: View with id: '" />
|
||||||
<resourcecontains resource="${output.file}" substring="longMsg=java.lang.RuntimeException:" />
|
<resourcecontains resource="${output.file}" substring="longMsg=java.lang.RuntimeException:" />
|
||||||
<resourcecontains resource="${output.file}" substring="longMsg=java.lang.NullPointerException:" />
|
<resourcecontains resource="${output.file}" substring="longMsg=java.lang.NullPointerException:" />
|
||||||
|
<resourcecontains resource="${output.file}" substring="android.util.AndroidException: INSTRUMENTATION_FAILED:" />
|
||||||
</or>
|
</or>
|
||||||
</condition>
|
</condition>
|
||||||
<exec executable="bash" unless:set="has.crashed">
|
<exec executable="bash" unless:set="has.crashed">
|
||||||
|
|
Loading…
Reference in a new issue