Merge remote-tracking branch 'public/master' into obiane

This commit is contained in:
Brieuc Viel 2016-04-14 12:01:30 +02:00
commit df9ea2fa2f
12 changed files with 42 additions and 22 deletions

2
.gitmodules vendored
View file

@ -53,6 +53,7 @@
[submodule "submodules/externals/libxml2"]
path = submodules/externals/libxml2
url = git://git.gnome.org/libxml2.git
ignore = dirty
[submodule "submodules/externals/libupnp"]
path = submodules/externals/libupnp
url = git://git.linphone.org/libupnp.git
@ -65,6 +66,7 @@
[submodule "submodules/externals/opus"]
path = submodules/externals/opus
url = git://git.linphone.org/opus.git
ignore = dirty
[submodule "submodules/mswebrtc"]
path = submodules/mswebrtc
url = git://git.linphone.org/mswebrtc.git

View file

@ -18,7 +18,11 @@ check_installed() {
for prog in automake autoconf pkg-config java ant yasm nasm wget; do
check_installed "$prog" "it"
done
check_installed "libtoolize" "libtool"
if [ $(uname) = "Darwin" ]; then
check_installed "libtool" "libtool"
else
check_installed "libtoolize" "libtool"
fi
check_installed "ndk-build" "android NDK"
if check_installed "android" "android SDK"; then
check_installed "adb" "android SDK platform tools"

View file

@ -24,7 +24,6 @@
import argparse
import os
import platform
import re
import shutil
import sys
@ -38,7 +37,8 @@ try:
import prepare
except Exception as e:
error(
"Could not find prepare module: {}, probably missing submodules/cmake-builder? Try running:\ngit submodule update --init --recursive".format(e))
"Could not find prepare module: {}, probably missing submodules/cmake-builder? Try running:\n"
"git submodule sync && git submodule update --init --recursive".format(e))
exit(1)
@ -61,17 +61,20 @@ class AndroidTarget(prepare.Target):
if os.path.isdir('liblinphone-sdk'):
shutil.rmtree('liblinphone-sdk', ignore_errors=False, onerror=self.handle_remove_read_only)
class AndroidArmTarget(AndroidTarget):
def __init__(self):
AndroidTarget.__init__(self, 'arm')
self.additional_args += [ '-DENABLE_VIDEO=NO' ]
self.additional_args += ['-DENABLE_VIDEO=NO']
class AndroidArmv7Target(AndroidTarget):
def __init__(self):
AndroidTarget.__init__(self, 'armv7')
class AndroidX86Target(AndroidTarget):
def __init__(self):
@ -85,14 +88,14 @@ targets = {
platforms = ['all', 'arm', 'armv7', 'x86']
class PlatformListAction(argparse.Action):
def __call__(self, parser, namespace, values, option_string=None):
if values:
for value in values:
if value not in platforms:
message = ("invalid platform: {0!r} (choose from {1})".format(value, ', '.join([repr(platform) for platform in platforms])))
message = ("invalid platform: {0!r} (choose from {1})".format(
value, ', '.join([repr(platform) for platform in platforms])))
raise argparse.ArgumentError(self, message)
setattr(namespace, self.dest, values)
@ -134,7 +137,7 @@ def check_is_installed(binary, prog='it', warn=True):
def check_tools():
ret = 0
#at least FFmpeg requires no whitespace in sources path...
# at least FFmpeg requires no whitespace in sources path...
if " " in os.path.dirname(os.path.realpath(__file__)):
error("Invalid location: path should not contain any spaces.")
ret = 1
@ -380,11 +383,13 @@ def main(argv=None):
argparser.add_argument(
'--disable-gpl-third-parties', help="Disable GPL third parties such as FFMpeg, x264.", action='store_true')
argparser.add_argument(
'--enable-non-free-codecs', help="Enable non-free codecs such as OpenH264, MPEG4, etc.. Final application must comply with their respective license (see README.md).", action='store_true')
'--enable-non-free-codecs', help="Enable non-free codecs such as OpenH264, MPEG4, "
"etc.. Final application must comply with their respective license (see README.md).", action='store_true')
argparser.add_argument(
'-f', '--force', help="Force preparation, even if working directory already exist.", action='store_true')
argparser.add_argument(
'-G', '--generator', help="CMake build system generator (default: Unix Makefiles, use cmake -h to get the complete list).", default='Unix Makefiles', dest='generator')
'-G', '--generator', help="CMake build system generator (default: Unix Makefiles, use cmake -h to get the complete list).",
default='Unix Makefiles', dest='generator')
argparser.add_argument(
'-L', '--list-cmake-variables', help="List non-advanced CMake cache variables.", action='store_true', dest='list_cmake_variables')
argparser.add_argument(
@ -392,7 +397,8 @@ def main(argv=None):
argparser.add_argument(
'-t', '--tunnel', help="Enable Tunnel.", action='store_true')
argparser.add_argument('platform', nargs='*', action=PlatformListAction, default=[
'arm', 'armv7', 'x86'], help="The platform to build for (default is 'arm armv7 x86'). Space separated architectures in list: {0}.".format(', '.join([repr(platform) for platform in platforms])))
'arm', 'armv7', 'x86'], help="The platform to build for (default is 'arm armv7 x86'). "
"Space separated architectures in list: {0}.".format(', '.join([repr(platform) for platform in platforms])))
args, additional_args2 = argparser.parse_known_args()
@ -425,7 +431,7 @@ def main(argv=None):
additional_args += ["-DENABLE_MPEG4=YES"]
additional_args += ["-DENABLE_OPENH264=YES"]
additional_args += ["-DENABLE_VPX=YES"]
#additional_args += ["-DENABLE_X264=YES"] # Do not activate x264 because it has text relocation issues
# additional_args += ["-DENABLE_X264=YES"] # Do not activate x264 because it has text relocation issues
if args.disable_gpl_third_parties is True:
additional_args += ["-DENABLE_GPL_THIRD_PARTIES=NO"]

View file

@ -459,10 +459,8 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
public View getView(final int position, View convertView, ViewGroup parent) {
View view = null;
LinphoneContact contact = null;
do {
contact = (LinphoneContact) getItem(position);
} while (contact == null);
LinphoneContact contact = (LinphoneContact) getItem(position);
if (contact == null) return null;
if (convertView != null) {
view = convertView;

View file

@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
package org.linphone;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import org.linphone.compatibility.Compatibility;
@ -245,6 +246,7 @@ public class ContactsManager extends ContentObserver {
for (LinphoneContact contact : contacts) {
contact.refresh();
}
Collections.sort(contacts);
return contacts;
}

View file

@ -21,6 +21,7 @@ package org.linphone;
import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;
import java.util.Locale;
import org.linphone.core.LinphoneAddress;
import org.linphone.core.LinphoneCore;
@ -39,7 +40,7 @@ import android.net.Uri;
import android.provider.ContactsContract;
import android.provider.ContactsContract.CommonDataKinds;
public class LinphoneContact implements Serializable {
public class LinphoneContact implements Serializable, Comparable<LinphoneContact> {
/**
*
*/
@ -437,6 +438,13 @@ public class LinphoneContact implements Serializable {
return createLinphoneFriend();
}
@Override
public int compareTo(LinphoneContact contact) {
String firstLetter = getFullName().substring(0, 1).toUpperCase(Locale.getDefault());
String contactfirstLetter = contact.getFullName().substring(0, 1).toUpperCase(Locale.getDefault());
return firstLetter.compareTo(contactfirstLetter);
}
private Uri getContactPictureUri(String id) {
Uri person = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, Long.parseLong(id));
return Uri.withAppendedPath(person, ContactsContract.Contacts.Photo.CONTENT_DIRECTORY);

@ -1 +1 @@
Subproject commit 4edc094bcfee08032b6d6fb38cfb00ecf66a9f49
Subproject commit 78aedfdf5cb02565ceb48e4acef202462c2f0dbf

@ -1 +1 @@
Subproject commit 29e865b5566890ae1ba3a50b0699337ef926d6b5
Subproject commit b3a628c7de0f6f74e09e60b134de6e3ebfbd3a54

@ -1 +1 @@
Subproject commit 129a9f0cbb880361d1f10c08fd4c2bd188ec0565
Subproject commit da7030bb322f4cd74638e6710007b1470c1b602e

@ -1 +1 @@
Subproject commit 4c486cf295bc4e8187c8315e95a687a030456ac3
Subproject commit 1bff470db4829ed6c83712ee4a4b8cf973c6188a

@ -1 +1 @@
Subproject commit f0cd38ef228cf26bfdd0fd8bd037fd74fb1e1c5a
Subproject commit 6f48b4151cce800cb300a2c4c8dd8b32e7275c1b

View file

@ -15,5 +15,5 @@
# 'key.alias' for the name of the key to use.
# The password will be asked during the build when you use the 'release' target.
tested.project.dir=../
tested.project.dir=.
test.runner=com.zutubi.android.junitreport.JUnitReportTestRunner