diff --git a/.classpath b/.classpath index b6af78b2d..2df25a2b6 100644 --- a/.classpath +++ b/.classpath @@ -1,17 +1,17 @@ - - - + + + diff --git a/.gitignore b/.gitignore index b04540b57..2c6cd49a5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,13 +1,40 @@ -libs -obj -gen -bin -doc -default.properties -local.properties -project.properties -tests/*$py.class -tests/build.xml -res/.DS_Store -bc-android.keystore -res/raw/lpconfig.xsd \ No newline at end of file +*.orig +*.rej +.DS_Store +.gradle +.idea +.settings +adb.pid +bc-android.keystore +bin +build +certdata.txt +check_tools.mk +default.properties +doc +gen +liblinphone-junit-report.xml +liblinphonetester_*.zip +libs +linphone-android.iml +linphone-junit-report*.xml +linphonetester_*.zip +lint.xml +local.properties +obj +proguard-project.txt +project.properties +res/.DS_Store +res/raw/lpconfig.xsd +res/raw/rootca.pem +submodules/externals/build/cunit/CUnit/ +submodules/externals/build/ffmpeg/arm/ +submodules/externals/build/ffmpeg/x86 +submodules/externals/build/libvpx/arm +submodules/externals/build/libvpx/x86 +submodules/externals/build/openh264/arm +submodules/externals/build/openh264/x86 +tests/*$py.class +tests/build.xml +tests/project.properties +ant_password.properties diff --git a/.gitmodules b/.gitmodules index ddd51f3c9..3138e5888 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,6 @@ [submodule "linphone"] path = submodules/linphone - url = git://git.linphone.org/linphone.git -[submodule "submodules/externals/osip"] - path = submodules/externals/osip - url = git://git.linphone.org/osip.git -[submodule "submodules/externals/exosip"] - path = submodules/externals/exosip - url = git://git.linphone.org/exosip.git + url = git://git.linphone.org/linphone [submodule "submodules/externals/gsm"] path = submodules/externals/gsm url = git://git.linphone.org/gsm.git @@ -22,27 +16,28 @@ [submodule "submodules/externals/ffmpeg"] path = submodules/externals/ffmpeg url = git://git.linphone.org/ffmpeg.git + ignore = dirty [submodule "submodules/externals/x264"] path = submodules/externals/x264 url = git://git.linphone.org/x264.git + ignore = dirty [submodule "submodules/msx264"] path = submodules/msx264 url = git://git.linphone.org/msx264.git -[submodule "submodules/externals/openssl"] - path = submodules/externals/openssl - url = git://git.linphone.org/android-openssl.git [submodule "submodules/externals/opencore-amr"] path = submodules/externals/opencore-amr - url = git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/opencore-amr + url = git://git.linphone.org/opencore-amr.git + ignore = dirty [submodule "submodules/msamr"] path = submodules/msamr url = git://git.linphone.org/msamr [submodule "submodules/externals/libvpx"] path = submodules/externals/libvpx - url = http://git.chromium.org/webm/libvpx.git -[submodule "submodules/externals/libzrtpcpp"] - path = submodules/externals/libzrtpcpp - url = git://git.linphone.org/zrtpcpp.git + url = https://chromium.googlesource.com/webm/libvpx + ignore = dirty +[submodule "submodules/bzrtp"] + path = submodules/bzrtp + url = git://git.linphone.org/bzrtp.git [submodule "submodules/externals/srtp"] path = submodules/externals/srtp url = git://git.linphone.org/srtp.git @@ -51,19 +46,48 @@ url = git://git.linphone.org/mssilk.git [submodule "submodules/externals/vo-amrwbenc"] path = submodules/externals/vo-amrwbenc - url = git://opencore-amr.git.sourceforge.net/gitroot/opencore-amr/vo-amrwbenc + url = git://git.linphone.org/vo-amrwbenc.git [submodule "submodules/bcg729"] path = submodules/bcg729 url = git://git.linphone.org/bcg729.git -[submodule "submodules/externals/webrtc"] - path = submodules/externals/webrtc - url = git://git.linphone.org/webrtc.git +[submodule "submodules/belle-sip"] + path = submodules/belle-sip + url = git://git.linphone.org/belle-sip +[submodule "submodules/externals/antlr3"] + path = submodules/externals/antlr3 + url = git://git.linphone.org/antlr3.git [submodule "submodules/externals/libxml2"] path = submodules/externals/libxml2 url = git://git.gnome.org/libxml2 [submodule "submodules/externals/libupnp"] path = submodules/externals/libupnp - url = git://git.code.sf.net/p/pupnp/code + url = git://git.linphone.org/libupnp.git +[submodule "submodules/externals/cunit"] + path = submodules/externals/cunit + url = git://git.linphone.org/cunit.git [submodule "submodules/externals/axmlrpc"] path = submodules/externals/axmlrpc url = git://git.linphone.org/axmlrpc.git +[submodule "submodules/externals/polarssl"] + path = submodules/externals/polarssl + url = git://git.linphone.org/polarssl.git +[submodule "submodules/externals/opus"] + path = submodules/externals/opus + url = git://git.opus-codec.org/opus.git +[submodule "submodules/mswebrtc"] + path = submodules/mswebrtc + url = git://git.linphone.org/mswebrtc.git +[submodule "submodules/msopenh264"] + path = submodules/msopenh264 + url = git://git.linphone.org/msopenh264.git +[submodule "submodules/externals/openh264"] + path = submodules/externals/openh264 + url = https://github.com/cisco/openh264 + ignore = dirty +[submodule "submodules/externals/libmatroska"] + path = submodules/externals/libmatroska + url = https://github.com/Matroska-Org/foundation-source.git + ignore = dirty +[submodule "submodules/externals/webrtc"] + path = submodules/externals/webrtc + url = git://git.linphone.org/webrtc.git diff --git a/.tx/config b/.tx/config new file mode 100644 index 000000000..a1399b7b7 --- /dev/null +++ b/.tx/config @@ -0,0 +1,15 @@ +[main] +host = https://www.transifex.com +lang_map = fr_CA:fr-rCA,pt_BR:pt-rBR,zh_CN:zh-rCN,zh_HK:zh-rHK,zh_TW:zh-rTW,da_DK:da-rDK,sv_SE:sv-rSE,kn_IN:kn-rIN,nl_NL:nl-rNL,en_NL:en-rNL +minimum_perc = 1 +type = ANDROID + +[linphone-android.stringsxml] +file_filter = res/values-/strings.xml +source_file = res/values/strings.xml +source_lang = en + +[linphone-android.customxml] +file_filter = res/values-/custom.xml +source_file = res/values/custom.xml +source_lang = en diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 6990d4d42..4bda42092 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -1,14 +1,13 @@ - + android:versionCode="2411" android:installLocation="auto"> + - - + + - @@ -36,7 +35,12 @@ - + + + + + + @@ -44,6 +48,7 @@ @@ -55,7 +60,7 @@ - + /> @@ -63,17 +68,25 @@ + + + + + + + + + - - - - + android:launchMode="singleTop"> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - + + + + + + + + + + + + + + + + + - - - - - - + @@ -127,18 +195,21 @@ + + + - + - - diff --git a/Makefile b/Makefile index 2dbde39b7..08ed199c8 100644 --- a/Makefile +++ b/Makefile @@ -1,37 +1,134 @@ NDK_PATH=$(shell dirname `which ndk-build`) +NDK_MAJOR_VERSION=$(shell cat $(NDK_PATH)/RELEASE.TXT | sed "s/r\([0-9]\{1,2\}\).*/\1/") SDK_PATH=$(shell dirname `which android`) SDK_PLATFORM_TOOLS_PATH=$(shell dirname `which adb`) -NUMCPUS=$(shell grep -c '^processor' /proc/cpuinfo || echo "4" ) +ARM_COMPILER_PATH=`find "$(NDK_PATH)" -name "arm-linux-androideabi-gcc-4*" -print | tail -1` +ARM_TOOLCHAIN_PATH=$(shell dirname $(ARM_COMPILER_PATH))/arm-linux-androideabi- +X86_COMPILER_PATH=`find "$(NDK_PATH)" -name "i686-linux-android-gcc-4*" -print | tail -1` +X86_TOOLCHAIN_PATH=$(shell dirname $(X86_COMPILER_PATH))/i686-linux-android- +NUMCPUS=$(shell grep -c '^processor' /proc/cpuinfo 2>/dev/null || echo "4" ) TOPDIR=$(shell pwd) -PATCH_FFMPEG=$(shell cd submodules/externals/ffmpeg && git status | grep neon) -LINPHONE_VERSION=$(shell cd submodules/linphone && git describe --always) +LIBLINPHONE_VERSION=$(shell cd submodules/linphone && git describe --always) LINPHONE_ANDROID_DEBUG_VERSION=$(shell git describe --always) -ANDROID_MOST_RECENT_TARGET=$(shell android list target -c | grep android | tail -n1) +BELLESIP_VERSION_SCRIPT:=cat submodules/belle-sip/configure.ac | grep "AC_INIT(" | sed -e "s/.*belle-sip\]//" | sed -e "s/].*//" | sed -e "s/.*\[//" +BELLESIP_VERSION=$(shell $(BELLESIP_VERSION_SCRIPT)) +ANDROID_MOST_RECENT_TARGET=$(shell android list target -c | grep -E 'android-[0-9]+' | tail -n1) +#We force target 19 because 21 creates binaries incompatible with older versions due to rand() function no longer inline (congrats to Google's developers) +NDKBUILD_TARGET=android-19 +#The NDK target used to compile external third parties (ffmpeg, x264) +EXTERNAL_MAKE_TARGET=14 +ARM_SYSROOT=${NDK_PATH}/platforms/android-$(EXTERNAL_MAKE_TARGET)/arch-arm +X86_SYSROOT=${NDK_PATH}/platforms/android-$(EXTERNAL_MAKE_TARGET)/arch-x86 +SQLITE_VERSION=3071700 +SQLITE_BASENAME=sqlite-amalgamation-$(SQLITE_VERSION) +SQLITE_URL=http://www.sqlite.org/2013/$(SQLITE_BASENAME).zip +ENABLE_GPL_THIRD_PARTIES=1 +#override CC variable to disable compiler specific FLAGS in configure using the system compiler instead of the android one +CC= +PACKAGE_NAME=$(shell sed -nE 's||\1|p' custom_rules.xml) +#default options, can be overidden using make OPTION=value . + +ifeq ($(ENABLE_GPL_THIRD_PARTIES),1) +BUILD_G729=1 +else +#x264 and g729 requires additional licensing agreements. +BUILD_X264=0 +BUILD_G729=0 +endif NDK_DEBUG=0 +BUILD_VIDEO=1 +BUILD_OPENH264=1 +BUILD_NON_FREE_CODECS=1 +ENABLE_OPENH264_DECODER=1 BUILD_UPNP=1 -BUILD_REMOTE_PROVISIONING=1 -BUILD_X264=1 BUILD_AMRNB=full # 0, light or full -BUILD_AMRWB=0 -BUILD_GPLV3_ZRTP=0 +BUILD_AMRWB=1 +BUILD_ZRTP=1 BUILD_SILK=1 -BUILD_G729=0 BUILD_TUNNEL=0 BUILD_WEBRTC_AECM=1 +BUILD_OPUS=1 +BUILD_MATROSKA=1 +BUILD_WEBRTC_ISAC=1 BUILD_FOR_X86=1 +BUILD_FOR_ARM=1 USE_JAVAH=1 +BUILD_TLS=1 +BUILD_SQLITE=1 +BUILD_CONTACT_HEADER=0 +BUILD_RTP_MAP=0 +BUILD_DONT_CHECK_HEADERS_IN_MESSAGE=0 +BUILD_ILBC=1 +LIBLINPHONE_EXTENDED_SRC_FILES= +LIBLINPHONE_EXTENDED_C_INCLUDES= +LIBLINPHONE_EXTENDED_CFLAGS= +APP_STL=stlport_static +ANT_SILENT=$(shell ant -h | grep -q -- -S && echo 1 || echo 0) -NDK_BUILD_OPTIONS=NDK_DEBUG=$(NDK_DEBUG) LINPHONE_VERSION=$(LINPHONE_VERSION) BUILD_UPNP=$(BUILD_UPNP) BUILD_REMOTE_PROVISIONING=$(BUILD_REMOTE_PROVISIONING) BUILD_X264=$(BUILD_X264) BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_GPLV3_ZRTP=$(BUILD_GPLV3_ZRTP) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_TUNNEL=$(BUILD_TUNNEL) BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) BUILD_FOR_X86=$(BUILD_FOR_X86) USE_JAVAH=$(USE_JAVAH) -j$(NUMCPUS) +# Checks +CHECK_MSG=$(shell ./check_tools.sh) -all: update-project prepare-sources generate-apk +ifneq ($(CHECK_MSG),) + $(error Some tools are missing.) +else + ifeq ($(BUILD_OPENH264),1) + ifneq ($(shell echo $(NDK_MAJOR_VERSION)\>=10 | bc),1) +$(error ndk version [$(NDK_MAJOR_VERSION)] not compatible with openh264.) + endif + endif + include check_tools.mk +endif + +OPENSSL_DIR=$(shell openssl version -d | sed "s/OPENSSLDIR: \"\(.*\)\"/\1/") +ifneq ($(shell ls $(OPENSSL_DIR)/certs),) + HTTPS_CA_DIR=$(OPENSSL_DIR)/certs +else + HTTPS_CA_DIR=$(OPENSSL_DIR) +endif + +ifeq ($(ANT_SILENT), 1) + ANT=ant -e -S +else + ANT=ant -e +endif + +# Temporary check: in case of MediastreamActivity.java file existing while it should not anymore, print an error message +# and abort build since otherwise java compilation will fail. +ifneq ($(shell ls ./submodules/linphone/mediastreamer2/java/src/org/linphone/mediastream/MediastreamerActivity.java 2>/dev/null),) +$(error ./submodules/linphone/mediastreamer2/java/src/org/linphone/mediastream/MediastreamerActivity.java found: please either remove it or move it to MediastreamActivity.java.ignored before continuing.) +endif + +ifeq ($(BUILD_NON_FREE_CODECS), 0) +BUILD_OPENH264=0 +ENABLE_OPENH264_DECODER=0 +BUILD_AMRNB=0 +BUILD_AMRWB=0 +BUILD_G729=0 +BUILD_X264=0 +endif + +all: update-project generate-apk +ifeq ($(ENABLE_GPL_THIRD_PARTIES),1) + @echo "***************************************************************************" + @echo "***** CAUTION, this liblinphone SDK is built using 3rd party GPL code *****" + @echo "***** Even if you acquired a proprietary license from Belledonne *****" + @echo "***** Communications, this SDK is GPL and GPL only. *****" + @echo "***** To disable 3rd party gpl code, please use: *****" + @echo "***** $$ make ENABLE_GPL_THIRD_PARTIES=0 *****" + @echo "***************************************************************************" +else + @echo + @echo "*****************************************************************" + @echo "***** Linphone SDK without 3rd party GPL software *****" + @echo "***** If you acquired a proprietary license from Belledonne *****" + @echo "***** Communications, this SDK can be used to create *****" + @echo "***** a proprietary linphone-based application. *****" + @echo "*****************************************************************" +endif install: install-apk run-linphone -prepare-ffmpeg: -ifeq ($(PATCH_FFMPEG),) - @patch -p0 < $(TOPDIR)/patches/ffmpeg_scalar_product_remove_alignment_hints.patch -endif #libilbc LIBILBC_SRC_DIR=$(TOPDIR)/submodules/libilbc-rfc3951 LIBILBC_BUILD_DIR=$(LIBILBC_SRC_DIR) @@ -45,41 +142,206 @@ $(LIBILBC_BUILD_DIR)/Makefile: $(LIBILBC_SRC_DIR)/configure $(LIBILBC_BUILD_DIR)/src/iLBC_decode.c: $(LIBILBC_BUILD_DIR)/Makefile cd $(LIBILBC_BUILD_DIR)/downloads && make \ || ( echo "iLBC prepare stage failed" ; exit 1 ) - + +ifeq ($(BUILD_ILBC),1) prepare-ilbc: $(LIBILBC_BUILD_DIR)/src/iLBC_decode.c +else +prepare-ilbc: +endif + +#ffmpeg +ifeq ($(BUILD_VIDEO),1) +BUILD_FFMPEG_DEPS=$(FFMPEG_SRC_DIR)/non_versioned_soname_patch_applied.txt $(FFMPEG_BUILD_DIR)/arm/libffmpeg-linphone-arm.so +ifeq ($(BUILD_FOR_X86), 1) + BUILD_FFMPEG_DEPS+=$(FFMPEG_BUILD_DIR)/x86/libffmpeg-linphone-x86.so +endif +endif +FFMPEG_SRC_DIR=$(TOPDIR)/submodules/externals/ffmpeg +FFMPEG_BUILD_DIR=$(TOPDIR)/submodules/externals/build/ffmpeg +FFMPEG_CONFIGURE_OPTIONS=--target-os=linux --enable-cross-compile --enable-runtime-cpudetect \ + --disable-everything --disable-doc --disable-ffplay --disable-ffmpeg --disable-ffprobe --disable-ffserver \ + --disable-avdevice --disable-avfilter --disable-avformat --disable-swresample --disable-network \ + --enable-decoder=mjpeg --enable-encoder=mjpeg --enable-decoder=mpeg4 --enable-encoder=mpeg4 --enable-decoder=h264 \ + --enable-decoder=h263p --enable-encoder=h263p --enable-decoder=h263 --enable-encoder=h263 --extra-cflags="-w" \ + --disable-static --enable-shared --disable-symver +FFMPEG_ARM_CONFIGURE_OPTIONS=--build-suffix=-linphone-arm --arch=arm --sysroot=$(ARM_SYSROOT) --cross-prefix=$(ARM_TOOLCHAIN_PATH) --enable-pic +FFMPEG_X86_CONFIGURE_OPTIONS=--build-suffix=-linphone-x86 --arch=x86 --sysroot=$(X86_SYSROOT) --cross-prefix=$(X86_TOOLCHAIN_PATH) --disable-mmx --disable-sse2 --disable-ssse3 --extra-cflags='-O3' + +$(FFMPEG_SRC_DIR)/non_versioned_soname_patch_applied.txt: + @patch -p0 < $(TOPDIR)/patches/ffmpeg_non_versioned_soname.patch + touch $@ + +$(FFMPEG_BUILD_DIR)/arm/config.h: + mkdir -p $(FFMPEG_BUILD_DIR)/arm && \ + cd $(FFMPEG_BUILD_DIR)/arm && \ + $(FFMPEG_SRC_DIR)/configure $(FFMPEG_CONFIGURE_OPTIONS) $(FFMPEG_ARM_CONFIGURE_OPTIONS) + sed -i.bak 's/#define HAVE_SYSCTL 1/#define HAVE_SYSCTL 0/g' $(FFMPEG_BUILD_DIR)/arm/config.h + sed -i.bak 's/#define HAVE_GETHRTIME 1/#define HAVE_GETHRTIME 0/g' $(FFMPEG_BUILD_DIR)/arm/config.h + +$(FFMPEG_BUILD_DIR)/arm/libavcodec/libavcodec-linphone-arm.so: $(FFMPEG_BUILD_DIR)/arm/config.h + cd $(FFMPEG_BUILD_DIR)/arm && \ + make -j${NUMCPUS} \ + || ( echo "Build of ffmpeg for arm failed." ; exit 1 ) + +$(FFMPEG_BUILD_DIR)/arm/libffmpeg-linphone-arm.so: $(FFMPEG_BUILD_DIR)/arm/libavcodec/libavcodec-linphone-arm.so + cd $(FFMPEG_BUILD_DIR)/arm && \ + rm libavcodec/log2_tab.o && \ + $(ARM_TOOLCHAIN_PATH)gcc -lm -lz --sysroot=$(ARM_SYSROOT) -Wl,--no-undefined -Wl,-z,noexecstack -shared libavutil/*.o libavutil/arm/*.o libavcodec/*.o libavcodec/arm/*.o libswscale/*.o -o libffmpeg-linphone-arm.so + +$(FFMPEG_BUILD_DIR)/x86/config.h: + mkdir -p $(FFMPEG_BUILD_DIR)/x86 && \ + cd $(FFMPEG_BUILD_DIR)/x86 && \ + $(FFMPEG_SRC_DIR)/configure $(FFMPEG_CONFIGURE_OPTIONS) $(FFMPEG_X86_CONFIGURE_OPTIONS) + sed -i.bak 's/#define HAVE_SYSCTL 1/#define HAVE_SYSCTL 0/g' $(FFMPEG_BUILD_DIR)/x86/config.h + sed -i.bak 's/#define HAVE_GETHRTIME 1/#define HAVE_GETHRTIME 0/g' $(FFMPEG_BUILD_DIR)/x86/config.h + +$(FFMPEG_BUILD_DIR)/x86/libavcodec/libavcodec-linphone-x86.so: $(FFMPEG_BUILD_DIR)/x86/config.h + cd $(FFMPEG_BUILD_DIR)/x86 && \ + make -j${NUMCPUS} \ + || ( echo "Build of ffmpeg for x86 failed." ; exit 1 ) + +$(FFMPEG_BUILD_DIR)/x86/libffmpeg-linphone-x86.so: $(FFMPEG_BUILD_DIR)/x86/libavcodec/libavcodec-linphone-x86.so + cd $(FFMPEG_BUILD_DIR)/x86 && \ + rm libavcodec/log2_tab.o && \ + $(X86_TOOLCHAIN_PATH)gcc -lm -lz --sysroot=$(X86_SYSROOT) -Wl,--no-undefined -Wl,-z,noexecstack -shared libavutil/*.o libavutil/x86/*.o libavcodec/*.o libavcodec/x86/*.o libswscale/*.o -o libffmpeg-linphone-x86.so + +build-ffmpeg: $(BUILD_FFMPEG_DEPS) + +clean-ffmpeg: + rm -rf $(FFMPEG_BUILD_DIR)/arm && \ + rm -rf $(FFMPEG_BUILD_DIR)/x86 + +#x264 +ifeq ($(BUILD_VIDEO),1) +ifeq ($(BUILD_X264), 1) +BUILD_X264_DEPS=$(X264_SRC_DIR)/log2f_fix_patch_applied.txt $(X264_BUILD_DIR)/arm/libx264.a +ifeq ($(BUILD_FOR_X86), 1) + BUILD_X264_DEPS+=$(X264_BUILD_DIR)/x86/libx264.a +endif +endif + +X264_SRC_DIR=$(TOPDIR)/submodules/externals/x264 +X264_BUILD_DIR=$(TOPDIR)/submodules/externals/build/x264 +X264_CONFIGURE_OPTIONS=--enable-static +X264_ARM_CONFIGURE_OPTIONS=--host=arm-none-linux-gnueabi --sysroot=$(ARM_SYSROOT) --cross-prefix=$(ARM_TOOLCHAIN_PATH) --enable-pic +X264_X86_CONFIGURE_OPTIONS=--host=i686-linux-gnueabi --sysroot=$(X86_SYSROOT) --cross-prefix=$(X86_TOOLCHAIN_PATH) + +$(X264_SRC_DIR)/log2f_fix_patch_applied.txt: + @patch -p0 < $(TOPDIR)/patches/x264_log2f_fix.patch + touch $@ + +$(X264_BUILD_DIR)/arm/libx264.a: + mkdir -p $(X264_BUILD_DIR)/arm && \ + cd $(X264_SRC_DIR) && \ + $(X264_SRC_DIR)/configure $(X264_CONFIGURE_OPTIONS) $(X264_ARM_CONFIGURE_OPTIONS) && \ + make -j$(NUMCPUS) STRIP= && \ + cp libx264.a $(X264_BUILD_DIR)/arm/libx264.a && \ + make clean \ + || ( echo "Build of x264 for arm failed." ; exit 1 ) + +$(X264_BUILD_DIR)/x86/libx264.a: + mkdir -p $(X264_BUILD_DIR)/x86 && \ + cd $(X264_SRC_DIR) && \ + $(X264_SRC_DIR)/configure $(X264_CONFIGURE_OPTIONS) $(X264_X86_CONFIGURE_OPTIONS) && \ + make -j$(NUMCPUS) STRIP= && \ + cp libx264.a $(X264_BUILD_DIR)/x86/libx264.a && \ + make clean \ + || ( echo "Build of x264 for x86 failed." ; exit 1 ) + +endif +build-x264: $(BUILD_X264_DEPS) + +clean-x264: + rm -rf $(X264_BUILD_DIR)/arm && \ + rm -rf $(X264_BUILD_DIR)/x86 + +#openh264 +ifeq ($(BUILD_VIDEO),1) +ifeq ($(BUILD_OPENH264), 1) +BUILD_OPENH264_DEPS=build-openh264-arm +ifeq ($(BUILD_FOR_X86), 1) + BUILD_OPENH264_DEPS+=build-openh264-x86 +endif +endif +endif + +OPENH264_SRC_DIR=$(TOPDIR)/submodules/externals/openh264 +OPENH264_BUILD_DIR=$(TOPDIR)/submodules/externals/build/openh264 +OPENH264_BUILD_DIR_ARM=$(OPENH264_BUILD_DIR)/arm +OPENH264_BUILD_DIR_X86=$(OPENH264_BUILD_DIR)/x86 + +$(OPENH264_SRC_DIR)/patch.stamp: $(TOPDIR)/patches/openh264-permissive.patch + cd $(OPENH264_SRC_DIR) && patch -p1 < $(TOPDIR)/patches/openh264-permissive.patch && touch $(OPENH264_SRC_DIR)/patch.stamp + +openh264-patch: $(OPENH264_SRC_DIR)/patch.stamp + +openh264-install-headers: + mkdir -p $(OPENH264_SRC_DIR)/include/wels + rsync -rvLpgoc --exclude ".git" $(OPENH264_SRC_DIR)/codec/api/svc/* $(OPENH264_SRC_DIR)/include/wels/. + +copy-openh264-x86: openh264-patch openh264-install-headers + mkdir -p $(OPENH264_BUILD_DIR) + mkdir -p $(OPENH264_BUILD_DIR_X86) + cd $(OPENH264_BUILD_DIR_X86) \ + && rsync -rvLpgoc --exclude ".git" $(OPENH264_SRC_DIR)/* . + +copy-openh264-arm: openh264-patch openh264-install-headers + mkdir -p $(OPENH264_BUILD_DIR) + mkdir -p $(OPENH264_BUILD_DIR_ARM) + cd $(OPENH264_BUILD_DIR_ARM) \ + && rsync -rvLpgoc --exclude ".git" $(OPENH264_SRC_DIR)/* . + +build-openh264-x86: copy-openh264-x86 + cd $(OPENH264_BUILD_DIR_X86) && \ + make libraries -j$(NUMCPUS) OS=android ARCH=x86 NDKROOT=$(NDK_PATH) TARGET=$(NDKBUILD_TARGET) + +build-openh264-arm: copy-openh264-arm + cd $(OPENH264_BUILD_DIR_ARM) && \ + make libraries -j$(NUMCPUS) OS=android ARCH=arm NDKROOT=$(NDK_PATH) TARGET=$(NDKBUILD_TARGET) + +build-openh264: $(BUILD_OPENH264_DEPS) + +clean-openh264: + cd $(OPENH264_SRC_DIR) && git clean -dfx && git reset --hard + rm -rf $(OPENH264_BUILD_DIR_ARM) + rm -rf $(OPENH264_BUILD_DIR_X86) + #libvpx +ifeq ($(BUILD_VIDEO),1) +BUILD_VPX_DEPS=$(LIBVPX_SRC_DIR)/configure_android_x86_patch_applied.txt $(LIBVPX_BUILD_DIR)/arm/libvpx.a +ifeq ($(BUILD_FOR_X86), 1) + BUILD_VPX_DEPS+=$(LIBVPX_BUILD_DIR)/x86/libvpx.a +endif +endif LIBVPX_SRC_DIR=$(TOPDIR)/submodules/externals/libvpx -$(LIBVPX_SRC_DIR)/vp8/common/asm_com_offsets.c.S: - cd $(LIBVPX_SRC_DIR) && \ - ./configure --target=armv7-android-gcc --sdk-path=$(NDK_PATH) --enable-error-concealment && \ - make asm_com_offsets.asm \ - || ( echo "VP8 prepare stage failed." ; exit 1 ) - -prepare-vpx: $(LIBVPX_SRC_DIR)/vp8/common/asm_com_offsets.c.S -#SILK -LIBMSSILK_SRC_DIR=$(TOPDIR)/submodules/mssilk -LIBMSSILK_BUILD_DIR=$(LIBMSSILK_SRC_DIR) -$(LIBMSSILK_SRC_DIR)/configure: - cd $(LIBMSSILK_SRC_DIR) && ./autogen.sh +LIBVPX_BUILD_DIR=$(TOPDIR)/submodules/externals/build/libvpx +LIBVPX_CONFIGURE_OPTIONS=--disable-vp9 --disable-examples --disable-unit-tests --disable-postproc --enable-error-concealment --enable-debug -$(LIBMSSILK_BUILD_DIR)/Makefile: $(LIBMSSILK_SRC_DIR)/configure - cd $(LIBMSSILK_BUILD_DIR) && \ - $(LIBMSSILK_SRC_DIR)/configure --host=arm-linux MEDIASTREAMER_CFLAGS=" " MEDIASTREAMER_LIBS=" " +$(LIBVPX_SRC_DIR)/configure_android_x86_patch_applied.txt: + @patch -p1 < $(TOPDIR)/patches/libvpx_configure_android_x86.patch + touch $@ -#make sure to update this path if SILK sdk is changed -$(LIBMSSILK_BUILD_DIR)/sdk/SILK_SDK_SRC_v1.0.8/SILK_SDK_SRC_ARM_v1.0.8/src/SKP_Silk_resampler.c: $(LIBMSSILK_BUILD_DIR)/Makefile - cd $(LIBMSSILK_BUILD_DIR)/sdk && \ - make extract-sources \ - || ( echo "SILK audio plugin prepare state failed." ; exit 1 ) +$(LIBVPX_BUILD_DIR)/arm/libvpx.a: + mkdir -p $(LIBVPX_BUILD_DIR)/arm && \ + cd $(LIBVPX_BUILD_DIR)/arm && \ + $(LIBVPX_SRC_DIR)/configure --target=armv7-android-gcc --sdk-path=$(NDK_PATH) $(LIBVPX_CONFIGURE_OPTIONS) && \ + make -j${NUMCPUS} \ + || ( echo "Build of libvpx for arm failed." ; exit 1 ) -prepare-silk: $(LIBMSSILK_BUILD_DIR)/sdk/SILK_SDK_SRC_v1.0.8/SILK_SDK_SRC_ARM_v1.0.8/src/SKP_Silk_resampler.c +$(LIBVPX_BUILD_DIR)/x86/libvpx.a: + mkdir -p $(LIBVPX_BUILD_DIR)/x86 && \ + cd $(LIBVPX_BUILD_DIR)/x86 && \ + $(LIBVPX_SRC_DIR)/configure --target=x86-android-gcc --sdk-path=$(NDK_PATH) $(LIBVPX_CONFIGURE_OPTIONS) && \ + make -j${NUMCPUS} \ + || ( echo "Build of libvpx for x86 failed." ; exit 1 ) + +build-vpx: $(BUILD_VPX_DEPS) + +clean-vpx: + cd $(LIBVPX_SRC_DIR) && git clean -dfx && git reset --hard + rm -rf submodules/externals/build/libvpx/arm && \ + rm -rf submodules/externals/build/libvpx/x86 -#Zrtp -$(TOPDIR)/submodules/externals/libzrtpcpp/libzrtpcpp-config.h : $(TOPDIR)/submodules/externals/build/libzrtpcpp/libzrtpcpp-config.h - @cd $(TOPDIR)/submodules/externals/libzrtpcpp/ && \ - cp ../build/libzrtpcpp/libzrtpcpp-config.h . \ - || ( echo "ZRTP prepare state failed." ; exit 1 ) -prepare-zrtp: $(TOPDIR)/submodules/externals/libzrtpcpp/libzrtpcpp-config.h @@ -91,6 +353,7 @@ $(TOPDIR)/submodules/externals/srtp/config.h : $(TOPDIR)/submodules/externals/bu prepare-srtp: $(TOPDIR)/submodules/externals/srtp/config.h +#ms2 prepare-mediastreamer2: @cd $(TOPDIR)/submodules/linphone/mediastreamer2/src/ && \ eval `cat Makefile.am | grep xxd | grep yuv2rgb.vs | sed 's/\$$(abs_builddir)/./'` && \ @@ -98,45 +361,169 @@ prepare-mediastreamer2: if ! [ -e yuv2rgb.vs.h ]; then echo "yuv2rgb.vs.h creation error (do you have 'xxd' application installed ?)"; exit 1; fi && \ if ! [ -e yuv2rgb.fs.h ]; then echo "yuv2rgb.fs.h creation error (do you have 'xxd' application installed ?)"; exit 1; fi -prepare-sources: prepare-ffmpeg prepare-ilbc prepare-vpx prepare-silk prepare-srtp prepare-zrtp prepare-mediastreamer2 +#antlr3 +ANLTR3_SRC_DIR=$(TOPDIR)/submodules/externals/antlr3/runtime/C/include/ +ANTLR3_BUILD_DIR=$(ANTLR3_SRC_DIR) +$(ANLTR3_SRC_DIR)/antlr3config.h: $(TOPDIR)/submodules/externals/build/antlr3/antlr3config.h + cp $(TOPDIR)/submodules/externals/build/antlr3/antlr3config.h $(ANLTR3_SRC_DIR) +prepare-antlr3: $(ANLTR3_SRC_DIR)/antlr3config.h -generate-libs: - $(NDK_PATH)/ndk-build $(NDK_BUILD_OPTIONS) +%.tokens: %.g + $(ANTLR) -make -fo $(dir $^) $^ -update-project: +#Belle-sip +BELLESIP_SRC_DIR=$(TOPDIR)/submodules/belle-sip +BELLESIP_BUILD_DIR=$(BELLESIP_SRC_DIR) +prepare-belle-sip: $(BELLESIP_SRC_DIR)/src/grammars/belle_sip_message.tokens $(BELLESIP_SRC_DIR)/src/grammars/belle_sdp.tokens + +#CUnit +prepare-cunit: $(TOPDIR)/submodules/externals/cunit/CUnit/Headers/*.h + [ -d $(TOPDIR)/submodules/externals/build/cunit/CUnit ] || mkdir $(TOPDIR)/submodules/externals/build/cunit/CUnit + cp $^ $(TOPDIR)/submodules/externals/build/cunit/CUnit + +$(TOPDIR)/res/raw/rootca.pem: + HTTPS_CA_DIR=$(HTTPS_CA_DIR) $(TOPDIR)/submodules/linphone/scripts/mk-ca-bundle.pl $@ + +prepare-liblinphone_tester: $(TOPDIR)/submodules/linphone/tester/tester_hosts $(TOPDIR)/res/raw/rootca.pem $(TOPDIR)/submodules/linphone/tester/messages.db + rm -rf liblinphone_tester/assets/config_files + mkdir -p liblinphone_tester/assets/config_files + for file in $^; do \ + cp -rf $$file $(TOPDIR)/liblinphone_tester/assets/config_files/. \ + ;done + cp -rf $(TOPDIR)/submodules/linphone/tester/certificates $(TOPDIR)/liblinphone_tester/assets/config_files + cp -rf $(TOPDIR)/submodules/linphone/tester/sounds $(TOPDIR)/liblinphone_tester/assets/config_files + cp -rf $(TOPDIR)/submodules/linphone/tester/images $(TOPDIR)/liblinphone_tester/assets/config_files + cp -rf $(TOPDIR)/submodules/linphone/tester/rcfiles $(TOPDIR)/liblinphone_tester/assets/config_files + + +#Matroska2 +MATROSKA_SRC_DIR=$(TOPDIR)/submodules/externals/libmatroska +MATROSKA_BUILD_DIR=$(TOPDIR)/submodules/externals/build/libmatroska +ifeq ($(BUILD_MATROSKA), 1) +prepare-matroska2: $(MATROSKA_SRC_DIR)/patch_applied.txt +else +prepare-matroska2: +endif + +$(MATROSKA_SRC_DIR)/patch_applied.txt: $(MATROSKA_BUILD_DIR)/fix_libmatroska2.patch + cd $(MATROSKA_SRC_DIR); patch -p1 < $<; touch $@ + +#Build targets +prepare-sources: build-ffmpeg build-x264 build-openh264 prepare-ilbc build-vpx prepare-srtp prepare-mediastreamer2 prepare-antlr3 prepare-belle-sip $(TOPDIR)/res/raw/rootca.pem prepare-matroska2 + +GENERATE_OPTIONS = NDK_DEBUG=$(NDK_DEBUG) BUILD_FOR_X86=$(BUILD_FOR_X86) \ + BUILD_AMRNB=$(BUILD_AMRNB) BUILD_AMRWB=$(BUILD_AMRWB) BUILD_SILK=$(BUILD_SILK) BUILD_G729=$(BUILD_G729) BUILD_OPUS=$(BUILD_OPUS) \ + BUILD_VIDEO=$(BUILD_VIDEO) BUILD_X264=$(BUILD_X264) BUILD_OPENH264=$(BUILD_OPENH264) ENABLE_OPENH264_DECODER=$(ENABLE_OPENH264_DECODER) BUILD_MATROSKA=$(BUILD_MATROSKA) \ + BUILD_UPNP=$(BUILD_UPNP) BUILD_ZRTP=$(BUILD_ZRTP) BUILD_WEBRTC_AECM=$(BUILD_WEBRTC_AECM) BUILD_WEBRTC_ISAC=$(BUILD_WEBRTC_ISAC) BUILD_ILBC=$(BUILD_ILBC) \ + BUILD_FOR_ARM=$(BUILD_FOR_ARM) BUILD_NON_FREE_CODECS=$(BUILD_NON_FREE_CODECS) + + +LIBLINPHONE_OPTIONS = $(GENERATE_OPTIONS) \ + LIBLINPHONE_VERSION=$(LIBLINPHONE_VERSION) BELLESIP_VERSION=$(BELLESIP_VERSION) USE_JAVAH=$(USE_JAVAH) \ + BUILD_TUNNEL=$(BUILD_TUNNEL) BUILD_TLS=$(BUILD_TLS) BUILD_SQLITE=$(BUILD_SQLITE) \ + BUILD_CONTACT_HEADER=$(BUILD_CONTACT_HEADER) BUILD_RTP_MAP=$(BUILD_RTP_MAP) \ + LIBLINPHONE_EXTENDED_SRC_FILES="$(LIBLINPHONE_EXTENDED_SRC_FILES)" \ + LIBLINPHONE_EXTENDED_C_INCLUDES="$(LIBLINPHONE_EXTENDED_C_INCLUDES)" \ + LIBLINPHONE_EXTENDED_CFLAGS="$(LIBLINPHONE_EXTENDED_CFLAGS)" \ + APP_STL="$(APP_STL)" \ + BUILD_DONT_CHECK_HEADERS_IN_MESSAGE=$(BUILD_DONT_CHECK_HEADERS_IN_MESSAGE) + +MEDIASTREAMER2_OPTIONS = $(GENERATE_OPTIONS) BUILD_MEDIASTREAMER2_SDK=1 + + +generate-libs: prepare-sources javah + $(NDK_PATH)/ndk-build $(LIBLINPHONE_OPTIONS) -j$(NUMCPUS) TARGET_PLATFORM=$(NDKBUILD_TARGET) + ./bsed.sh # Fix path to libffmpeg library in linphone.so because of Android M Preview issue: https://code.google.com/p/android-developer-preview/issues/detail?id=2239 + +generate-mediastreamer2-libs: prepare-sources + @cd $(TOPDIR)/submodules/linphone/mediastreamer2/java && \ + $(NDK_PATH)/ndk-build $(MEDIASTREAMER2_OPTIONS) -j$(NUMCPUS) TARGET_PLATFORM=$(NDKBUILD_TARGET) + +update-project: $(TOPDIR)/res/raw/rootca.pem + $(SDK_PATH)/android update project --path . --target $(ANDROID_MOST_RECENT_TARGET) + $(SDK_PATH)/android update test-project --path tests -m . + $(SDK_PATH)/android update project --path liblinphone_tester --target $(ANDROID_MOST_RECENT_TARGET) + +update-mediastreamer2-project: + @cd $(TOPDIR)/submodules/linphone/mediastreamer2/java && \ $(SDK_PATH)/android update project --path . --target $(ANDROID_MOST_RECENT_TARGET) -generate-apk: - ant partial-clean +liblinphone_tester: update-project prepare-sources prepare-cunit prepare-liblinphone_tester javah + $(NDK_PATH)/ndk-build -C liblinphone_tester $(LIBLINPHONE_OPTIONS) -j$(NUMCPUS) TARGET_PLATFORM=$(NDKBUILD_TARGET) + $(MAKE) -C liblinphone_tester + +javah: + $(ANT) javah + +generate-apk: java-clean generate-libs echo "version.name=$(LINPHONE_ANDROID_DEBUG_VERSION)" > default.properties - ant debug + $(ANT) debug + +generate-mediastreamer2-apk: java-clean generate-mediastreamer2-libs + @cd $(TOPDIR)/submodules/linphone/mediastreamer2/java && \ + echo "version.name=$(LINPHONE_ANDROID_DEBUG_VERSION)" > default.properties && \ + $(ANT) debug + +uninstall: + adb uninstall $(PACKAGE_NAME) install-apk: ant installd release: update-project - ant clean - echo "What is the version name for the release ?"; \ - read version; \ - echo "version.name=$$version" > default.properties - ant release + $(ANT) clean + patch -p1 < release.patch + cat ant.properties | grep version.name > default.properties + $(ANT) release + patch -Rp1 < release.patch run-linphone: ant run -run-tests: - ant partial-clean && \ - $(SDK_PLATFORM_TOOLS_PATH)/adb uninstall org.linphone.test - $(SDK_PLATFORM_TOOLS_PATH)/adb uninstall org.linphone - @cd $(TOPDIR)/tests/ && \ - $(SDK_PATH)/android update test-project --path . -m ../ && \ - ant debug && \ - ant installd && \ - adb shell am instrument -w -e size small org.linphone.test/android.test.InstrumentationTestRunner +run-liblinphone-tests: liblinphone_tester + $(MAKE) -C liblinphone_tester run-all-tests -clean: - $(NDK_PATH)/ndk-build $(NDK_BUILD_OPTIONS) clean - ant clean +run-basic-tests: update-project + $(ANT) partial-clean + $(MAKE) -C tests run-basic-tests ANT_SILENT=$(ANT_SILENT) -.PHONY: clean +run-all-tests: update-project + $(ANT) partial-clean + $(MAKE) -C tests run-all-tests ANT_SILENT=$(ANT_SILENT) +clean-ndk-build: + - $(NDK_PATH)/ndk-build clean $(LIBLINPHONE_OPTIONS) + $(ANT) clean + @if [ -f $(TOPDIR)/submodules/linphone/mediastreamer2/java/project.properties ]; then \ + cd $(TOPDIR)/submodules/linphone/mediastreamer2/java && $(ANT) clean; \ + fi + +.NOTPARALLEL clean-native: clean-ndk-build clean-ffmpeg clean-x264 clean-openh264 clean-vpx + + +java-clean: + $(ANT) clean + +clean: clean-native java-clean + +veryclean: clean + +.PHONY: clean install-apk run-linphone + +generate-sdk: liblinphone-android-sdk + +liblinphone-android-sdk: generate-apk + $(ANT) liblinphone-android-sdk + +linphone-android-sdk: generate-apk + $(ANT) linphone-android-sdk + +mediastreamer2-sdk: update-mediastreamer2-project generate-mediastreamer2-apk + @cd $(TOPDIR)/submodules/linphone/mediastreamer2/java && \ + $(ANT) mediastreamer2-sdk + +pull-transifex: + tx pull -af + +push-transifex: + tx push -s -t -f --no-interactive diff --git a/README b/README index a655c6113..1ceb2271b 100644 --- a/README +++ b/README @@ -1,38 +1,146 @@ - LINPHONE for ANDROID - **************************** + **************************** + * LINPHONE for ANDROID * + **************************** + +COMPILATION INSTRUCTIONS +************************ 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. -1) download the Android ndk (>=r8b) from google and add it to your path. -2) install the autotools: autoconf, automake, aclocal, libtoolize, pkgconfig -2bis) on some 64 bits systems you'll need the ia32-libs package +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 + On 64 bits linux systems you'll need the ia32-libs package + With the latest Debian (multiarch), you need this: + dpkg --add-architecture i386 + aptitude update + aptitude install libstdc++6:i386 libgcc1:i386 zlib1g:i386 libncurses5:i386 3) run the Makefile script in the top level directory. This will download iLBC source files and convert some assembly files in VP8 project. $ make -4) To install the generated apk into a plugged device, run +4) (Optional) To install the generated apk into a plugged device, run $ make install +5) (Optional) To generate a liblinphone SDK zip containing a full jar and native libraries, run + $ make liblinphone-android-sdk +6) (Optional) To generate a libmediastreamer2 SDK zip containing a full jar and native libraries, run + $ make mediastreamer2-sdk +7) (Optional) To generate a signed apk to publish on the Google Play, run + $ make release +Make sure you filled the ant.properties values for version.name, key.store and key.alias in order to correctly sign the generated apk. +You also may want to create a file name ant_password.properties with the following: +key.store.password=[your_password] +key.alias.password=[your_password] +If you don't, the passwords will be asked at the signing phase. To run the tutorials: +-------------------- 1) open the res/values/non_localizable_custom.xml file and change the value of the show_tutorials_instead_of_app to true. 2) compile again using make && make install. 3) /!\ don't forget to put it back to false to run the linphone application normally. /!\ -To create an apk with a different package name, you need to edit the custom_rules.xml file: +To create an apk with a different package name +---------------------------------------------- +You need to edit the custom_rules.xml file: 1) look for the property named "linphone.package.name" and change it value accordingly -2) run again the Makefile script by calling "make" +2) also update the values in the AndroidManifest file where the comment appears +3) update the path to the sounds in the linphonerc-factory files in the res folders and optionally change default sip account on linphonerc-default +4) run again the Makefile script by calling "make" + +To run the liblinphone test suite on android +-------------------------------------------- +Simply run + $ make liblinphone_tester +This will be build everything, generate an apk, and install it on the connected device if any. + +You can speed up the compilation by using ccache (compiler cache, see https://ccache.samba.org/). Simply export: +export NDK_CCACHE=ccache + +TROUBLESHOOTING +*************** +If you encounter the following issue: +E/dalvikvm( 2465): dlopen("/data/app-lib/org.linphone-1/liblinphone-armeabi-v7a.so") failed: Cannot load library: soinfo_relocate(linker.cpp:975): cannot locate symbol "rand" referenced by "liblinphone-armeabi-v7a.so"... +it's because you have installed the android-21 platform (which is chosen automatically because it's the most recent) and you deployed the apk on a android < 5 device. +To fix this, in the Makefile, force ANDROID_MOST_RECENT_TARGET=android-19 + +If you encounter troubles with the make clean target and you are using the 8e android ndk, the solution can be found here: https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/3wIbb-h3nDU + +If you built the app using eclipse, ensure you ran at least once the make command (see above steps 0 to 3) ! Else you'll have this exceptions: +FATAL EXCEPTION: main +java.lang.ExceptionInInitializerError +... +Caused by: java.lang.UnsatisfiedLinkError: Couldn't load linphone-armeabi-v7a: findLibrary returned null +... + +BUILD OPTIONS +************* Some options can be passed to make, like "make SOME_OPTION=SOME_VALUE". -Option Name | Possible values | Default value -------------------------------------------------------------------------------------------------------------------------------------------------------- -BUILD_X264 0 (don't build x264) or 1 (build x264) | 0 -BUILD_AMRNB 0 (don't build amrnb codec), light (try to use amrnb codec from android), full (build your own amrnb codec) | full -BUILD_AMRWB 0 (don't build amrwb codec), 1 (build your own amrwb codec) | 0 -BUILD_GPLV3_ZRTP 0 (don't support ZRTP), 1 (support ZRTP and make the whole program GPLv3) | 0 -BUILD_SILK 0 (don't build silk plugin), 1 (build silk) [silk is Skype nonfree patented audio codec] | 1 -BUILD_G729 0 (don't build g729 plugin), 1 (build g729) [g729 is nonfree patented audio codec, contact Sipro lab for more details] | 0 -BUILD_TUNNEL 0 (don't build tunnel), 1 (build tunnel) [requires a tunnel implementation in submodules/linphone/tunnel] | 0 -BUILD_WEBRTC_AECM 0 (don't build echo canceler), 1 (build echo canceler) | 1 -USE_JAVAH 0 (don't generate header), 1 (generate header for linphone_core_jni) [used to check errors at liblinphone compilation] | 1 -BUILD_FOR_X86 0 (don't generate liblinphone libraries for x86 architecture), 1 (build liblinphone libraries for x86 architecture) | 1 +ENABLE_GPL_THIRD_PARTIES + values: 0 (GPL third parties disabled) or 1 (GPL third parties enabled), default value: 1 + GPL third parties are: X264 and G729 -If you encounter troubles with the make clean target and you are using the 8e android ndk, the solution can be found here: https://groups.google.com/forum/?fromgroups=#!topic/android-ndk/3wIbb-h3nDU +BUILD_VIDEO + values: 0 (no video) or 1 (video enabled), default value: 1 + +BUILD_OPENH264 + values: 0 (don't build openH264) or 1 (build openH264), default value: 1 + +ENABLE_OPENH264_DECODER + values: 0 (disable openh264 decoder) or 1 (enable openh264 decoder), default value: 1 + +BUILD_X264 + values: 0 (don't build x264) or 1 (build x264), default value: 0 + +BUILD_AMRNB + values: 0 (don't build amrnb codec), light (try to use amrnb codec from android), full (build your own amrnb codec), default value: full + +BUILD_AMRWB + values: 0 (don't build amrwb codec), 1 (build your own amrwb codec): default value: 1 + +BUILD_ZRTP + values: 0 (don't support ZRTP), 1 (support ZRTP), default value: 1 + +BUILD_SILK + values: 0 (don't build silk plugin), 1 (build silk) [silk is Skype nonfree patented audio codec], default value: 1 + +BUILD_G729 + values: 0 (don't build g729 plugin), 1 (build g729) [g729 is nonfree patented audio codec, contact Sipro lab for more details] + default value: 1 + +BUILD_TUNNEL + values: 0 (don't build tunnel), 1 (build tunnel) [requires a non-free tunnel implementation in submodules/linphone/tunnel] + default value: 0 + +BUILD_WEBRTC_AECM + values: 0 (don't build echo canceler), 1 (build echo canceler) + default value: 1 + +USE_JAVAH + values: 0 (don't generate header), 1 (generate header for linphone_core_jni) [used to check errors at liblinphone compilation] + default value: 1 + +BUILD_FOR_X86 + values: 0 (don't generate liblinphone libraries for x86 architecture), 1 (build liblinphone libraries for x86 architecture) + default value: 1 + +BUILD_SQLITE + values: 0 (don't build sqlite3), 1 (build sqlite3) [used to store chat messages inside liblinphone] + default value: 1 + +BUILD_TLS + values: 0 (don't build tls), 1 (do build tls), default value: 1 + +BUILD_WEBRTC_ISAC + values: 0 (don't build isac), 1 (do build isac), default value: 1 + +BUILD_OPUS + values: 0 (don't build opus), 1 (do build opus), default value: 1 + +BUILD_UPNP + values: 0 (don't build upnp), 1 (do build upnp), default value: 1 + +BUILD_MATROSKA + values: 0 (don't build matroska and ebml), 1 (do build matroska and ebml), default value: 0 + +BUILD_ILBC + values: 0 (don't build iLBC), 1 (do build iLBC), default value: 1 diff --git a/ant.properties b/ant.properties index 7f65258e5..d2cc146d1 100644 --- a/ant.properties +++ b/ant.properties @@ -1,3 +1,4 @@ source.dir=src:submodules/linphone/mediastreamer2/java/src:submodules/linphone/java/j2se:submodules/linphone/java/common:submodules/linphone/java/impl:submodules/linphone/coreapi/help/java:submodules/externals/axmlrpc/src/main/java key.store=bc-android.keystore key.alias=nw8000 +version.name=2.4.0 diff --git a/bsed.sh b/bsed.sh new file mode 100755 index 000000000..b357ae14e --- /dev/null +++ b/bsed.sh @@ -0,0 +1,48 @@ +#!/bin/bash + +# Script found at http://everydaywithlinux.blogspot.fr/2012/11/patch-strings-in-binary-files-with-sed.html + +function patch_strings_in_file() { + local FILE="$1" + local PATTERN="$2" + local REPLACEMENT="$3" + + # Find all unique strings in FILE that contain the pattern + STRINGS=$(strings ${FILE} | grep ${PATTERN} | sort -u -r) + + if [ "${STRINGS}" != "" ] ; then + echo "File '${FILE}' contain strings with '${PATTERN}' in them:" + + for OLD_STRING in ${STRINGS} ; do + # Create the new string with a simple bash-replacement + NEW_STRING=${OLD_STRING//${PATTERN}/${REPLACEMENT}} + + # Create null terminated ASCII HEX representations of the strings + OLD_STRING_HEX="$(echo -n ${OLD_STRING} | xxd -g 0 -u -ps -c 256)00" + NEW_STRING_HEX="$(echo -n ${NEW_STRING} | xxd -g 0 -u -ps -c 256)00" + + if [ ${#NEW_STRING_HEX} -le ${#OLD_STRING_HEX} ] ; then + # Pad the replacement string with null terminations so the + # length matches the original string + while [ ${#NEW_STRING_HEX} -lt ${#OLD_STRING_HEX} ] ; do + NEW_STRING_HEX="${NEW_STRING_HEX}00" + done + + # Now, replace every occurrence of OLD_STRING with NEW_STRING + echo -n "Replacing ${OLD_STRING} with ${NEW_STRING}... " + hexdump -ve '1/1 "%.2X"' ${FILE} | \ + sed "s/${OLD_STRING_HEX}/${NEW_STRING_HEX}/g" | \ + xxd -r -p > ${FILE}.tmp + chmod --reference ${FILE} ${FILE}.tmp + mv ${FILE}.tmp ${FILE} + echo "Done!" + else + echo "New string '${NEW_STRING}' is longer than old" \ + "string '${OLD_STRING}'. Skipping." + fi + done + fi +} + +patch_strings_in_file libs/armeabi-v7a/liblinphone-armeabi-v7a.so "./obj/local/armeabi-v7a/libffmpeg-linphone-arm.so" "libffmpeg-linphone-arm.so" +patch_strings_in_file libs/x86/liblinphone-x86.so "./obj/local/x86/libffmpeg-linphone-x86.so" "libffmpeg-linphone-x86.so" diff --git a/build.gradle b/build.gradle new file mode 100644 index 000000000..c341bf0f5 --- /dev/null +++ b/build.gradle @@ -0,0 +1,45 @@ +buildscript { + repositories { + mavenCentral() + } + dependencies { + classpath 'com.android.tools.build:gradle:1.0.0' + } +} +apply plugin: 'android' + +dependencies { + compile fileTree(dir: 'libs', include: '*.jar') +} + +android { + compileSdkVersion 22 + buildToolsVersion "20.0.0" + + sourceSets { + main { + manifest.srcFile 'AndroidManifest.xml' + java.srcDirs = ['submodules/linphone/mediastreamer2/java/src','submodules/linphone/java/j2se','submodules/linphone/java/common','submodules/linphone/java/impl','submodules/externals/axmlrpc/src/main/java','submodules/linphone/coreapi/help/java','src'] + resources.srcDirs = ['submodules/linphone/mediastreamer2/java/src','submodules/linphone/java/j2se','submodules/linphone/java/common','submodules/linphone/java/impl','submodules/externals/axmlrpc/src/main/java','submodules/linphone/coreapi/help/java','src'] + aidl.srcDirs = ['submodules/linphone/mediastreamer2/java/src','submodules/linphone/java/j2se','submodules/linphone/java/common','submodules/linphone/java/impl','submodules/externals/axmlrpc/src/main/java','submodules/linphone/coreapi/help/java','src'] + renderscript.srcDirs = ['submodules/linphone/mediastreamer2/java/src','submodules/linphone/java/j2se','submodules/linphone/java/common','submodules/linphone/java/impl','submodules/externals/axmlrpc/src/main/java','submodules/linphone/coreapi/help/java','src'] + res.srcDirs = ['res'] + assets.srcDirs = ['assets'] + jniLibs.srcDir 'libs' + + java.exclude '**/mediastream/MediastreamerActivity.java' + } + + // Move the tests to tests/java, tests/res, etc... + instrumentTest.setRoot('tests') + + // Move the build types to build-types/ + // For instance, build-types/debug/java, build-types/debug/AndroidManifest.xml, ... + // This moves them out of them default location under src//... which would + // conflict with src/ being used by the main source set. + // Adding new build types or product flavors should be accompanied + // by a similar customization. + debug.setRoot('build-types/debug') + release.setRoot('build-types/release') + } +} diff --git a/build.xml b/build.xml index cc1aeac67..c23990f28 100644 --- a/build.xml +++ b/build.xml @@ -26,8 +26,9 @@ application and should be checked into Version Control Systems. --> - + + - - + + + + + + + + + + + + + + + + + diff --git a/check_tools.sh b/check_tools.sh new file mode 100755 index 000000000..cba82f787 --- /dev/null +++ b/check_tools.sh @@ -0,0 +1,51 @@ +#!/bin/sh + +error_on_quit=0 + +echo_err() { + echo "$@" >&2 + error_on_quit=1 +} + +check_installed() { + if [ -z "$(which $1)" ]; then + echo_err "Could not find $1. Please install $2." + return 1 + fi + return 0 +} + +for prog in automake autoconf pkg-config java ant yasm nasm wget; do + check_installed "$prog" "it" +done +check_installed "libtoolize" "libtool" +check_installed "ndk-build" "android NDK" +if check_installed "android" "android SDK"; then + check_installed "adb" "android SDK platform tools" + # check that at least one target is installed + if [ -z "$(android list target -c)" ]; then + echo_err "Install at least one android target in the android SDK" + fi +fi +if nasm -f elf32 2>&1 | grep -q "fatal: unrecognised output format"; then + echo_err "Invalid version of nasm: your version does not support elf32 output format. If you have installed nasm, please check that your PATH env variable is set correctly." +fi +if ! (find submodules/linphone/mediastreamer2 -mindepth 1 2>/dev/null | grep -q . \ + || find submodules/linphone/oRTP -mindepth 1 2>/dev/null | grep -q .); then + echo_err "Missing some git submodules. Did you run 'git submodule update --init --recursive'?" +fi +# Android NDK should NOT be simlinked! +if [ -L "$ANDROID_NDK" ] && [ -d "$ANDROID_NDK" ]; then + echo_err "ANDROID_NDK=$ANDROID_NDK must NOT be a symbolic link, please modify it accordingly" +fi + +if [ $error_on_quit = 0 ]; then + rm -f check_tools.mk + touch check_tools.mk + echo "JAVA=\"$(which java)\"" >> check_tools.mk + echo "ANTLR=\"$(which java)\" -jar \"submodules/externals/antlr3/antlr-3.2.jar\"" >> check_tools.mk +else + echo "Failed to detect required tools, aborting." +fi + +exit $error_on_quit diff --git a/custom_rules.xml b/custom_rules.xml index 2e6e2dde5..bbf9ae858 100644 --- a/custom_rules.xml +++ b/custom_rules.xml @@ -3,21 +3,12 @@ - - - - - - + Generate JNI header @@ -37,6 +28,14 @@ + + + + + + + + @@ -51,34 +50,25 @@ - + - - - - - - - - - Generate Javadoc - - + stylesheetfile="${sdk.dir}/docs/assets/android-developer-docs.css"> + - + @@ -106,7 +96,7 @@ - + @@ -121,4 +111,39 @@ + + + Creating library output jar file... + + + + + + + + + + + + + + + + Creating library output jar file... + + + + + + + + + + + + + + diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar new file mode 100644 index 000000000..8c0fb64a8 Binary files /dev/null and b/gradle/wrapper/gradle-wrapper.jar differ diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties new file mode 100644 index 000000000..ab2cc719c --- /dev/null +++ b/gradle/wrapper/gradle-wrapper.properties @@ -0,0 +1,6 @@ +#Tue Dec 09 14:35:04 CET 2014 +distributionBase=GRADLE_USER_HOME +distributionPath=wrapper/dists +zipStoreBase=GRADLE_USER_HOME +zipStorePath=wrapper/dists +distributionUrl=https\://services.gradle.org/distributions/gradle-2.2.1-all.zip diff --git a/jni/Android.mk b/jni/Android.mk index 6390ab9c2..c1951fdde 100755 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -1,31 +1,31 @@ # script expect linphone-root-dir variable to be set by parent ! -#default values -ifeq ($(BUILD_AMRNB),) -BUILD_AMRNB=light -endif -ifeq ($(BUILD_AMRWB),) -BUILD_AMRWB=0 -endif -ifeq ($(BUILD_G729),) -BUILD_G729=0 -endif -BUILD_SRTP=1 - -BUILD_X264=0 -LINPHONE_VIDEO=0 -ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) -BUILD_X264=1 -LINPHONE_VIDEO=1 +#enable video on armv7 and x86 targets only +#since we want to modify BUILD_VIDEO and BUILD_X264 depending on platform, we need to make a copy because the +#variables given on command line take precedence over the ones defined internally. +ifeq ($(TARGET_ARCH_ABI), armeabi) +_BUILD_X264=0 +_BUILD_OPENH264=0 +_BUILD_VIDEO=0 +else +_BUILD_X264=$(BUILD_X264) +_BUILD_OPENH264=$(BUILD_OPENH264) +_BUILD_VIDEO=$(BUILD_VIDEO) endif -include $(linphone-root-dir)/submodules/linphone/mediastreamer2/src/android/libneon/Android.mk +ifeq ($(_BUILD_VIDEO),0) +ifeq (,$(DUMP_VAR)) +$(info $(TARGET_ARCH_ABI): Video is disabled for targets other than armeabi-v7a and x86) +endif +endif -##ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) -ifeq ($(BUILD_GPLV3_ZRTP), 1) +#libxml2 +include $(linphone-root-dir)/submodules/externals/build/libxml2/Android.mk + +ifeq ($(BUILD_ZRTP), 1) BUILD_SRTP=1 ZRTP_C_INCLUDE= \ - $(linphone-root-dir)/submodules/externals/libzrtpcpp/src + $(linphone-root-dir)/submodules/bzrtp/include endif ifeq ($(BUILD_SRTP), 1) @@ -34,32 +34,35 @@ SRTP_C_INCLUDE= \ $(linphone-root-dir)/submodules/externals/srtp/include \ $(linphone-root-dir)/submodules/externals/srtp/crypto/include endif -#endif + + +#sqlite +ifeq ($(BUILD_SQLITE),1) +include $(linphone-root-dir)/submodules/externals/build/sqlite/Android.mk +endif #libupnp ifeq ($(BUILD_UPNP),1) include $(linphone-root-dir)/submodules/externals/build/libupnp/Android.mk endif -#libxml2 + xml2lpc + lpc2xml -ifeq ($(BUILD_REMOTE_PROVISIONING),1) -include $(linphone-root-dir)/submodules/externals/build/libxml2/Android.mk -include $(linphone-root-dir)/submodules/linphone/build/android/xml2lpc.mk -include $(linphone-root-dir)/submodules/linphone/build/android/lpc2xml.mk -endif - # Speex include $(linphone-root-dir)/submodules/externals/build/speex/Android.mk # Gsm include $(linphone-root-dir)/submodules/externals/build/gsm/Android.mk -include $(linphone-root-dir)/submodules/externals/build/exosip/Android.mk +# Matroska +ifeq ($(BUILD_MATROSKA), 1) +include $(linphone-root-dir)/submodules/externals/build/libmatroska/Android.mk +endif -include $(linphone-root-dir)/submodules/externals/build/osip/Android.mk +include $(linphone-root-dir)/submodules/externals/build/polarssl/Android.mk +ifeq ($(BUILD_MEDIASTREAMER2_SDK), 0) +include $(linphone-root-dir)/submodules/externals/build/antlr3/Android.mk +include $(linphone-root-dir)/submodules/belle-sip/build/android/Android.mk +endif -# Openssl -include $(linphone-root-dir)/submodules/externals/openssl/Android.mk include $(linphone-root-dir)/submodules/linphone/oRTP/build/android/Android.mk @@ -67,51 +70,59 @@ include $(linphone-root-dir)/submodules/linphone/mediastreamer2/build/android/An include $(linphone-root-dir)/submodules/linphone/mediastreamer2/tools/Android.mk +#tunnel ifeq ($(BUILD_TUNNEL), 1) include $(linphone-root-dir)/submodules/tunnel/Android.mk endif ifeq ($(BUILD_SILK), 1) ifeq (,$(DUMP_VAR)) -$(info Build proprietary SILK plugin for mediastreamer2) +$(info $(TARGET_ARCH_ABI): Build proprietary SILK plugin for mediastreamer2) endif include $(linphone-root-dir)/submodules/mssilk/Android.mk endif - -ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) +ifeq ($(BUILD_ILBC), 1) include $(linphone-root-dir)/submodules/msilbc/Android.mk +endif -ifeq ($(BUILD_X264), 1) +ifeq ($(_BUILD_VIDEO),1) + +ifeq ($(_BUILD_X264),1) ifeq (,$(DUMP_VAR)) -$(info Build X264 plugin for mediastreamer2) +$(info $(TARGET_ARCH_ABI): Build X264 plugin for mediastreamer2) endif include $(linphone-root-dir)/submodules/msx264/Android.mk include $(linphone-root-dir)/submodules/externals/build/x264/Android.mk endif -include $(linphone-root-dir)/submodules/externals/build/ffmpeg/Android.mk -include $(linphone-root-dir)/submodules/externals/build/ffmpeg-no-neon/Android.mk - -include $(linphone-root-dir)/submodules/externals/build/libvpx/Android.mk -endif #armeabi-v7a - - -ifeq ($(BUILD_GPLV3_ZRTP), 1) +ifeq ($(_BUILD_OPENH264),1) ifeq (,$(DUMP_VAR)) -$(info Build ZRTP support - makes application GPLv3) +$(info $(TARGET_ARCH_ABI): Build OpenH264 plugin for mediastreamer2) endif -include $(linphone-root-dir)/submodules/externals/build/libzrtpcpp/Android.mk +include $(linphone-root-dir)/submodules/msopenh264/Android.mk +include $(linphone-root-dir)/submodules/externals/build/openh264/Android.mk +endif + +include $(linphone-root-dir)/submodules/externals/build/ffmpeg/Android.mk +include $(linphone-root-dir)/submodules/externals/build/libvpx/Android.mk + + +endif #_BUILD_VIDEO + + +ifeq ($(BUILD_ZRTP), 1) +ifeq (,$(DUMP_VAR)) +$(info $(TARGET_ARCH_ABI): Build ZRTP support) +endif +include $(linphone-root-dir)/submodules/bzrtp/Android.mk endif ifeq ($(BUILD_SRTP), 1) include $(linphone-root-dir)/submodules/externals/build/srtp/Android.mk endif -ifeq ($(TARGET_ARCH_ABI), armeabi-v7a) include $(linphone-root-dir)/submodules/linphone/build/android/Android.mk -endif -include $(linphone-root-dir)/submodules/linphone/build/android/Android-no-neon.mk _BUILD_AMR=0 ifneq ($(BUILD_AMRNB), 0) @@ -136,14 +147,40 @@ include $(linphone-root-dir)/submodules/bcg729/Android.mk include $(linphone-root-dir)/submodules/bcg729/msbcg729/Android.mk endif -ifneq ($(BUILD_WEBRTC_AECM), 0) -ifneq ($(TARGET_ARCH), x86) +ifneq ($(BUILD_OPUS), 0) +include $(linphone-root-dir)/submodules/externals/build/opus/Android.mk +endif + +WEBRTC_BUILD_NEON_LIBS=false + +# AECM +ifneq ($(BUILD_WEBRTC_AECM),0) ifeq ($(TARGET_ARCH_ABI), armeabi-v7a) +$(info $(TARGET_ARCH_ABI): Build NEON modules for AECM) WEBRTC_BUILD_NEON_LIBS=true endif + +$(info $(TARGET_ARCH_ABI): Build AECM from WebRTC) include $(linphone-root-dir)/submodules/externals/build/webrtc/system_wrappers/Android.mk -include $(linphone-root-dir)/submodules/externals/build/webrtc/common_audio/signal_processing/Android.mk include $(linphone-root-dir)/submodules/externals/build/webrtc/modules/audio_processing/utility/Android.mk include $(linphone-root-dir)/submodules/externals/build/webrtc/modules/audio_processing/aecm/Android.mk endif + +# iSAC +ifneq ($(BUILD_WEBRTC_ISAC),0) +# don't build for neon in x86 +ifeq ($(TARGET_ARCH_ABI), armeabi-v7a) +$(info $(TARGET_ARCH_ABI): Build NEON modules for ISAC) +WEBRTC_BUILD_NEON_LIBS=true +endif + +$(info $(TARGET_ARCH_ABI): Build iSAC plugin for mediastreamer2) +include $(linphone-root-dir)/submodules/externals/build/webrtc/modules/audio_coding/codecs/isac/fix/source/Android.mk +endif + +# common modules for ISAC and AECM +ifneq ($(BUILD_WEBRTC_AECM)$(BUILD_WEBRTC_ISAC),00) +$(info $(TARGET_ARCH_ABI): Build common modules for iSAC and AECM ($(BUILD_WEBRTC_AECM)$(BUILD_WEBRTC_ISAC))) +include $(linphone-root-dir)/submodules/externals/build/webrtc/common_audio/signal_processing/Android.mk +include $(linphone-root-dir)/submodules/mswebrtc/Android.mk endif diff --git a/jni/Application.mk b/jni/Application.mk index a2c7ff6fb..62337407e 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -1,33 +1,74 @@ APP_PROJECT_PATH := $(call my-dir)/../ -APP_MODULES :=libspeex libgsm libortp libosip2 libeXosip2 libmediastreamer2 liblinphone liblinphonenoneon libneon -APP_STL := stlport_static +NDK_TOOLCHAIN_VERSION := 4.8 + +ifeq ($(BUILD_MEDIASTREAMER2_SDK),) +BUILD_MEDIASTREAMER2_SDK=0 +endif + +APP_MODULES :=libspeex libgsm libortp libmediastreamer2 +ifeq ($(BUILD_MEDIASTREAMER2_SDK), 0) +APP_MODULES += antlr3 libbellesip liblinphone liblpxml2 +endif + +#default values: + +ifeq ($(BUILD_AMRNB),) +BUILD_AMRNB=light +endif + +ifeq ($(BUILD_AMRWB),) +BUILD_AMRWB=0 +endif + +ifeq ($(BUILD_SRTP),) +BUILD_SRTP=1 +endif + +ifeq ($(BUILD_X264),) +BUILD_X264=0 +endif + +ifeq ($(BUILD_OPENH264),) +BUILD_OPENH264=0 +endif + +ifeq ($(BUILD_G729),) +BUILD_G729=0 +endif + +ifeq ($(BUILD_VIDEO),) +BUILD_VIDEO=1 +endif + +ifeq ($(BUILD_MEDIASTREAMER2_SDK), 0) +#sqlite +ifeq ($(BUILD_SQLITE),1) +APP_MODULES += liblinsqlite +endif #uPnp ifeq ($(BUILD_UPNP),1) APP_MODULES += libupnp endif -#remote provisioning -ifeq ($(BUILD_REMOTE_PROVISIONING),1) -APP_MODULES += liblpxml2 libxml2lpc liblpc2xml +ifeq ($(BUILD_TLS),1) +APP_MODULES +=polarssl +endif endif -#default values -ifeq ($(BUILD_AMRNB),) -BUILD_AMRNB=light -endif -ifeq ($(BUILD_AMRWB),) -BUILD_AMRWB=0 -endif -ifeq ($(BUILD_SRTP),) -BUILD_SRTP=1 -endif - -ifeq ($(LINPHONE_VIDEO),1) -APP_MODULES += liblinavutil liblinavcore liblinavcodec liblinswscale -APP_MODULES += liblinavcodecnoneon +ifeq ($(BUILD_VIDEO),1) +APP_MODULES += libffmpeg-linphone APP_MODULES += libvpx +ifeq ($(BUILD_X264),1) +APP_MODULES +=libx264 libmsx264 endif +ifeq ($(BUILD_OPENH264),1) +APP_MODULES += libopenh264 libmsopenh264 +endif +ifeq ($(BUILD_MATROSKA), 1) +APP_MODULES += libmatroska2 +endif +endif # BUILD_VIDEO _BUILD_AMR=0 ifneq ($(BUILD_AMRNB), 0) @@ -46,10 +87,6 @@ ifneq ($(BUILD_AMRWB), 0) APP_MODULES += libvoamrwbenc endif -ifeq ($(BUILD_X264),1) -APP_MODULES +=libx264 libmsx264 -endif - ifeq ($(BUILD_SILK),1) APP_MODULES +=libmssilk endif @@ -58,11 +95,25 @@ ifeq ($(BUILD_G729),1) APP_MODULES +=libbcg729 libmsbcg729 endif -ifneq ($(BUILD_WEBRTC_AECM), 0) -APP_MODULES += libwebrtc_system_wrappers libwebrtc_spl libwebrtc_apm_utility libwebrtc_aecm -APP_MODULES += libwebrtc_spl_neon libwebrtc_aecm_neon +ifneq ($(BUILD_OPUS), 0) +APP_MODULES += libopus endif +ifneq ($(BUILD_WEBRTC_AECM), 0) +APP_MODULES += libwebrtc_system_wrappers libwebrtc_spl libwebrtc_apm_utility libwebrtc_aecm libmswebrtc +ifneq (,$(findstring armeabi,$(TARGET_ARCH_ABI))) +APP_MODULES += libwebrtc_spl_neon libwebrtc_aecm_neon +endif +endif + +ifeq ($(BUILD_WEBRTC_ISAC), 1) +APP_MODULES += libwebrtc_spl libwebrtc_isacfix libmswebrtc +ifneq (,$(findstring armeabi,$(TARGET_ARCH_ABI))) +APP_MODULES += libwebrtc_spl_neon libwebrtc_isacfix_neon +endif +endif + +ifeq ($(BUILD_MEDIASTREAMER2_SDK), 0) ifeq ($(RING),yes) APP_MODULES += libring endif @@ -70,27 +121,32 @@ endif ifeq ($(BUILD_TUNNEL), 1) APP_MODULES += libtunnelclient endif +endif -ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) -APP_MODULES += liblincrypto liblinssl +ifeq ($(BUILD_ZRTP), 1) +APP_MODULES += libbzrtp +endif + +ifeq ($(BUILD_ILBC), 1) APP_MODULES +=libmsilbc - -ifeq ($(BUILD_GPLV3_ZRTP), 1) -APP_MODULES += libzrtpcpp endif ifeq ($(BUILD_SRTP), 1) APP_MODULES += libsrtp endif -endif #armeabi-v7a - linphone-root-dir:=$(APP_PROJECT_PATH) APP_BUILD_SCRIPT:=$(call my-dir)/Android.mk APP_PLATFORM := android-8 -APP_ABI := armeabi-v7a armeabi +APP_ABI := armeabi-v7a +ifeq ($(BUILD_FOR_ARM), 1) +APP_ABI += armeabi +endif ifeq ($(BUILD_FOR_X86), 1) APP_ABI += x86 endif -APP_CFLAGS:=-DDISABLE_NEON + +APP_CFLAGS += -Werror -Wall -Wno-strict-aliasing -Wno-unused-function +# Thanks cpufeature.c imported from the NDK... +APP_CFLAGS += -Wno-unused-variable diff --git a/liblinphone_tester/.classpath b/liblinphone_tester/.classpath new file mode 100644 index 000000000..7e1fd65d7 --- /dev/null +++ b/liblinphone_tester/.classpath @@ -0,0 +1,14 @@ + + + + + + + + + + + + + + diff --git a/liblinphone_tester/.gitignore b/liblinphone_tester/.gitignore new file mode 100644 index 000000000..9e04b4e45 --- /dev/null +++ b/liblinphone_tester/.gitignore @@ -0,0 +1,20 @@ +# built application files +*.apk +*.ap_ + +# files for the dex VM +*.dex + +# Java class files +*.class + +# generated files +bin/ +gen/ +libs/ +obj/ + +# Local configuration file (sdk path, etc) +local.properties + +assets diff --git a/liblinphone_tester/.project b/liblinphone_tester/.project new file mode 100644 index 000000000..0877c21b1 --- /dev/null +++ b/liblinphone_tester/.project @@ -0,0 +1,45 @@ + + + liblinphoneTester + + + + + + com.android.ide.eclipse.adt.ResourceManagerBuilder + + + + + com.android.ide.eclipse.adt.PreCompilerBuilder + + + + + org.eclipse.jdt.core.javabuilder + + + + + com.android.ide.eclipse.adt.ApkBuilder + + + + + + com.android.ide.eclipse.adt.AndroidNature + org.eclipse.jdt.core.javanature + + + + linphone + 2 + PARENT-1-PROJECT_LOCATION/submodules/linphone/java + + + mediastreamer2 + 2 + PARENT-1-PROJECT_LOCATION/submodules/linphone/mediastreamer2/java/src + + + diff --git a/liblinphone_tester/AndroidManifest.xml b/liblinphone_tester/AndroidManifest.xml new file mode 100644 index 000000000..0bf9ab62a --- /dev/null +++ b/liblinphone_tester/AndroidManifest.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/liblinphone_tester/Makefile b/liblinphone_tester/Makefile new file mode 100644 index 000000000..42b2637c1 --- /dev/null +++ b/liblinphone_tester/Makefile @@ -0,0 +1,5 @@ +all: + ant debug install + +run-all-tests: all + ant test diff --git a/liblinphone_tester/adb-log-start.sh b/liblinphone_tester/adb-log-start.sh new file mode 100755 index 000000000..73ec81563 --- /dev/null +++ b/liblinphone_tester/adb-log-start.sh @@ -0,0 +1,4 @@ +#! /bin/bash +adb logcat -v time > $1 & +echo $! >adb.pid + diff --git a/liblinphone_tester/ant.properties b/liblinphone_tester/ant.properties new file mode 100644 index 000000000..1c4ad6f9f --- /dev/null +++ b/liblinphone_tester/ant.properties @@ -0,0 +1,2 @@ +source.dir=src:../submodules/linphone/mediastreamer2/java/src:../submodules/linphone/java/j2se:../submodules/linphone/java/common:../submodules/linphone/java/impl +test.runner=com.zutubi.android.junitreport.JUnitReportTestRunner diff --git a/liblinphone_tester/build.xml b/liblinphone_tester/build.xml new file mode 100644 index 000000000..4eb05f07c --- /dev/null +++ b/liblinphone_tester/build.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/liblinphone_tester/custom_rules.xml b/liblinphone_tester/custom_rules.xml new file mode 100644 index 000000000..9adcb8c2f --- /dev/null +++ b/liblinphone_tester/custom_rules.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + Adb log files are put in ${archive.name}.zip + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/liblinphone_tester/jni/Android.mk b/liblinphone_tester/jni/Android.mk new file mode 100644 index 000000000..bacf8a993 --- /dev/null +++ b/liblinphone_tester/jni/Android.mk @@ -0,0 +1,3 @@ +include ../jni/Android.mk +include $(linphone-root-dir)/submodules/externals/build/cunit/Android.mk +include $(linphone-root-dir)/submodules/linphone/build/android/liblinphone_tester.mk diff --git a/liblinphone_tester/jni/Application.mk b/liblinphone_tester/jni/Application.mk new file mode 100644 index 000000000..a6da504c7 --- /dev/null +++ b/liblinphone_tester/jni/Application.mk @@ -0,0 +1,7 @@ +LOCAL_PATH:= $(call my-dir) +include ../jni/Application.mk +APP_PROJECT_PATH := $(LOCAL_PATH)/../ +APP_BUILD_SCRIPT := $(LOCAL_PATH)/Android.mk +APP_OPTIM := debug + +APP_MODULES += cunit liblinphone_tester diff --git a/liblinphone_tester/libs/android-junit-report-1.5.8.jar b/liblinphone_tester/libs/android-junit-report-1.5.8.jar new file mode 100644 index 000000000..09e6a2d4f Binary files /dev/null and b/liblinphone_tester/libs/android-junit-report-1.5.8.jar differ diff --git a/tests/res/drawable-hdpi/ic_launcher.png b/liblinphone_tester/res/drawable-hdpi/ic_launcher.png similarity index 100% rename from tests/res/drawable-hdpi/ic_launcher.png rename to liblinphone_tester/res/drawable-hdpi/ic_launcher.png diff --git a/tests/res/drawable-mdpi/ic_launcher.png b/liblinphone_tester/res/drawable-mdpi/ic_launcher.png similarity index 100% rename from tests/res/drawable-mdpi/ic_launcher.png rename to liblinphone_tester/res/drawable-mdpi/ic_launcher.png diff --git a/tests/res/drawable-xhdpi/ic_launcher.png b/liblinphone_tester/res/drawable-xhdpi/ic_launcher.png similarity index 100% rename from tests/res/drawable-xhdpi/ic_launcher.png rename to liblinphone_tester/res/drawable-xhdpi/ic_launcher.png diff --git a/liblinphone_tester/res/layout/activity_logs.xml b/liblinphone_tester/res/layout/activity_logs.xml new file mode 100644 index 000000000..353062eb8 --- /dev/null +++ b/liblinphone_tester/res/layout/activity_logs.xml @@ -0,0 +1,12 @@ + + + \ No newline at end of file diff --git a/liblinphone_tester/res/layout/activity_main.xml b/liblinphone_tester/res/layout/activity_main.xml new file mode 100644 index 000000000..751318d94 --- /dev/null +++ b/liblinphone_tester/res/layout/activity_main.xml @@ -0,0 +1,15 @@ + + + + + + \ No newline at end of file diff --git a/liblinphone_tester/res/layout/activity_suites.xml b/liblinphone_tester/res/layout/activity_suites.xml new file mode 100644 index 000000000..2c8294d5e --- /dev/null +++ b/liblinphone_tester/res/layout/activity_suites.xml @@ -0,0 +1,15 @@ + + + + + + + \ No newline at end of file diff --git a/liblinphone_tester/res/menu/activity_logs.xml b/liblinphone_tester/res/menu/activity_logs.xml new file mode 100644 index 000000000..77f358b68 --- /dev/null +++ b/liblinphone_tester/res/menu/activity_logs.xml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/liblinphone_tester/res/menu/activity_main.xml b/liblinphone_tester/res/menu/activity_main.xml new file mode 100644 index 000000000..77f358b68 --- /dev/null +++ b/liblinphone_tester/res/menu/activity_main.xml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/liblinphone_tester/res/menu/activity_suites.xml b/liblinphone_tester/res/menu/activity_suites.xml new file mode 100644 index 000000000..77f358b68 --- /dev/null +++ b/liblinphone_tester/res/menu/activity_suites.xml @@ -0,0 +1,9 @@ + + + + + \ No newline at end of file diff --git a/liblinphone_tester/res/values-v11/styles.xml b/liblinphone_tester/res/values-v11/styles.xml new file mode 100644 index 000000000..541752f6e --- /dev/null +++ b/liblinphone_tester/res/values-v11/styles.xml @@ -0,0 +1,11 @@ + + + + + + \ No newline at end of file diff --git a/liblinphone_tester/res/values-v14/styles.xml b/liblinphone_tester/res/values-v14/styles.xml new file mode 100644 index 000000000..f20e01501 --- /dev/null +++ b/liblinphone_tester/res/values-v14/styles.xml @@ -0,0 +1,12 @@ + + + + + + \ No newline at end of file diff --git a/liblinphone_tester/res/values/strings.xml b/liblinphone_tester/res/values/strings.xml new file mode 100644 index 000000000..941a872da --- /dev/null +++ b/liblinphone_tester/res/values/strings.xml @@ -0,0 +1,10 @@ + + + + liblinphone tester + All + Settings + LogsActivity + SuitesActivity + + \ No newline at end of file diff --git a/liblinphone_tester/res/values/styles.xml b/liblinphone_tester/res/values/styles.xml new file mode 100644 index 000000000..4a10ca492 --- /dev/null +++ b/liblinphone_tester/res/values/styles.xml @@ -0,0 +1,20 @@ + + + + + + + + + \ No newline at end of file diff --git a/liblinphone_tester/src/org/linphone/tester/LogsActivity.java b/liblinphone_tester/src/org/linphone/tester/LogsActivity.java new file mode 100644 index 000000000..02df05446 --- /dev/null +++ b/liblinphone_tester/src/org/linphone/tester/LogsActivity.java @@ -0,0 +1,92 @@ +package org.linphone.tester; + +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; + +import android.os.Bundle; +import android.app.Activity; +import android.view.Menu; +import android.widget.TextView; + +public class LogsActivity extends Activity { + private String mLogs = ""; + private LogsThread mLogsThread; + private class LogsThread extends Thread { + LogsActivity mLogsActivity; + String mArgs[]; + TesterLogger tester; + public LogsThread(LogsActivity logsActivity, String[] args) { + mLogsActivity = logsActivity; + mArgs = args; + } + + @Override + public void run() { + String path = mLogsActivity.getFilesDir().getAbsolutePath()+"/config_files"; + tester = new TesterLogger(mLogsActivity); + List list = new LinkedList(Arrays.asList(new String[]{"tester", "--verbose", "--config", path})); + list.addAll(Arrays.asList(mArgs)); + String[] array = list.toArray(new String[list.size()]); + tester.run(array); + Tester.clearAccounts(); + mLogsActivity.runOnUiThread(new Runnable() { + public void run() { + mLogsActivity.done(); + } + }); + } + } + + private static String join(String [] array, String separator) { + String ret = ""; + for(int i = 0; i < array.length; ++i) { + if(i != 0) { + ret += separator; + } + ret += array[i]; + } + return ret; + } + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_logs); + ((TextView)findViewById(R.id.textView1)).setText(mLogs); + Bundle extras = getIntent().getExtras(); + if (extras != null) { + String[] values = extras.getStringArray("args"); + if(values != null) { + if(mLogsThread == null || !mLogsThread.isAlive()) { + this.setTitle("Test Logs (" + join(values, " ") + ")"); + mLogs = ""; + ((TextView)findViewById(R.id.textView1)).setText(mLogs); + mLogsThread = new LogsThread(this, values); + mLogsThread.start(); + } + } + } + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.activity_logs, menu); + return true; + } + + public void addLog(int level, String message) { + mLogs += message; + ((TextView)findViewById(R.id.textView1)).append(message); + } + @Override + public void onBackPressed() { + if(mLogsThread == null || !mLogsThread.isAlive()) { + finish(); + } + } + + public void done() { + } +} diff --git a/liblinphone_tester/src/org/linphone/tester/MainActivity.java b/liblinphone_tester/src/org/linphone/tester/MainActivity.java new file mode 100644 index 000000000..0c64e6ef5 --- /dev/null +++ b/liblinphone_tester/src/org/linphone/tester/MainActivity.java @@ -0,0 +1,80 @@ +package org.linphone.tester; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.lang.Override; + +import android.os.Bundle; +import android.app.Activity; +import android.content.Context; +import android.content.Intent; +import android.content.res.AssetManager; +import android.util.Log; +import android.view.Gravity; +import android.view.Menu; +import android.view.View; +import android.widget.Button; +import android.widget.LinearLayout; + +public class MainActivity extends Activity { + + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + + setContentView(R.layout.activity_main); + try { + TestUnit.copyAssetsFromPackage(getApplicationContext()); + } catch (IOException e) { + Log.e("liblinphone_tester", "Cannot install rc files",e); + } + Tester.keepAccounts(true); + TesterList suitesTest = new TesterList(); + suitesTest.run(new String[]{"tester", "--list-suites"}); + LinearLayout layout = ((LinearLayout)findViewById(R.id.suites_list)); + layout.removeAllViews(); + addButton(layout, "All", null); + for(String str: suitesTest.getList()) { + str = str.trim(); + addButton(layout, str, str); + } + } + + @Override + protected void onDestroy(){ + Tester.clearAccounts(); + super.onDestroy(); + } + + private void addButton(LinearLayout layout, String text, String data) { + Button button = new Button(this); + button.setText(text); + button.setTag(data); + button.setGravity(Gravity.CENTER); + button.setOnClickListener(new Button.OnClickListener() { + public void onClick(View v) { + Button button = (Button) v; + String data = (String)button.getTag(); + if(data == null) { + Intent intent = new Intent(getBaseContext(), LogsActivity.class); + intent.putExtra("args", new String[]{}); + startActivity(intent); + } else { + Intent intent = new Intent(getBaseContext(), SuitesActivity.class); + intent.putExtra("suite", data); + startActivity(intent); + } + } + }); + layout.addView(button); + } + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.activity_main, menu); + return true; + } +} diff --git a/liblinphone_tester/src/org/linphone/tester/SuitesActivity.java b/liblinphone_tester/src/org/linphone/tester/SuitesActivity.java new file mode 100644 index 000000000..ffaa91bd7 --- /dev/null +++ b/liblinphone_tester/src/org/linphone/tester/SuitesActivity.java @@ -0,0 +1,70 @@ +package org.linphone.tester; + +import android.os.Bundle; +import android.app.Activity; +import android.content.Intent; +import android.view.Gravity; +import android.view.Menu; +import android.view.View; +import android.widget.Button; +import android.widget.LinearLayout; + +public class SuitesActivity extends Activity { + String mSuite; + @Override + protected void onCreate(Bundle savedInstanceState) { + super.onCreate(savedInstanceState); + setContentView(R.layout.activity_suites); + Bundle extras = getIntent().getExtras(); + if (extras != null) { + mSuite = extras.getString("suite"); + if(mSuite != null) { + this.setTitle(this.getResources().getString(R.string.app_name) + " | " + mSuite); + TesterList suitesTest = new TesterList(); + suitesTest.run(new String[]{"tester", "--list-tests", mSuite}); + LinearLayout layout = ((LinearLayout)findViewById(R.id.tests_list)); + layout.removeAllViews(); + addButton(layout, "All", null); + for(String str: suitesTest.getList()) { + str = str.trim(); + addButton(layout, str, str); + } + } + } + + } + private void addButton(LinearLayout layout, String text, String data) { + Button button = new Button(this); + button.setText(text); + button.setTag(data); + button.setGravity(Gravity.CENTER); + button.setOnClickListener(new Button.OnClickListener() { + public void onClick(View v) { + Button button = (Button) v; + String data = (String)button.getTag(); + if(mSuite != null) { + if(data == null) { + Intent intent = new Intent(getBaseContext(), LogsActivity.class); + intent.putExtra("args", new String[]{"--suite", mSuite}); + startActivity(intent); + } else { + Intent intent = new Intent(getBaseContext(), LogsActivity.class); + intent.putExtra("args", new String[]{"--suite", mSuite, "--test", data}); + startActivity(intent); + } + } + } + }); + layout.addView(button); + } + + + + @Override + public boolean onCreateOptionsMenu(Menu menu) { + // Inflate the menu; this adds items to the action bar if it is present. + getMenuInflater().inflate(R.menu.activity_suites, menu); + return true; + } + +} diff --git a/liblinphone_tester/src/org/linphone/tester/TestRunner.java b/liblinphone_tester/src/org/linphone/tester/TestRunner.java new file mode 100644 index 000000000..af83f0005 --- /dev/null +++ b/liblinphone_tester/src/org/linphone/tester/TestRunner.java @@ -0,0 +1,59 @@ +package org.linphone.tester; + +import junit.framework.TestSuite; +import android.os.Bundle; + +import com.zutubi.android.junitreport.JUnitReportTestRunner; + +import java.lang.Override; + + +public class TestRunner extends JUnitReportTestRunner { + String mSuite = null; + String mTest = null; + + @Override + public void onCreate(Bundle arguments) { + mSuite = arguments.getString("suite"); + mTest = arguments.getString("test"); + Tester.keepAccounts(true); + + super.onCreate(arguments); + } + + @Override + public void onDestroy() { + Tester.clearAccounts(); + super.onDestroy(); + } + + @Override + public TestSuite getAllTests () { + TestSuite suite = new TestSuite("Tests"); + suite.addTest(new WrapperTester()); + addSuites(suite, mSuite, mTest); + return suite; + } + + public static void addSuites(TestSuite suite, String suiteCheck, String testCheck) { + TesterList testerList = new TesterList(); + testerList.run(new String[]{"tester", "--list-suites"}); + for(String str: testerList.getList()) { + str = str.trim(); + if(suiteCheck == null || suiteCheck.equals(str)) { + addSuite(suite, str, testCheck); + } + } + } + + public static void addSuite(TestSuite suite, String suiteStr, String testCheck) { + TesterList testerList = new TesterList(); + testerList.run(new String[]{"tester", "--list-tests", suiteStr}); + for(String str: testerList.getList()) { + str = str.trim(); + if(testCheck == null || testCheck.equals(str)) { + suite.addTest(new TestUnit(suiteStr, str)); + } + } + } +} diff --git a/liblinphone_tester/src/org/linphone/tester/TestUnit.java b/liblinphone_tester/src/org/linphone/tester/TestUnit.java new file mode 100644 index 000000000..d33211495 --- /dev/null +++ b/liblinphone_tester/src/org/linphone/tester/TestUnit.java @@ -0,0 +1,87 @@ +package org.linphone.tester; + +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.io.InputStream; +import java.util.Arrays; +import java.util.LinkedList; +import java.util.List; + +import junit.framework.Assert; +import android.content.Context; +import android.test.AndroidTestCase; + +public class TestUnit extends AndroidTestCase { + private String mSuite; + private String mTest; + static Boolean isAssetCopied=false; + + public TestUnit(String suite, String test) { + mSuite = suite; + mTest = test; + setName(suite + "/" + test); + } + + public TestUnit(String name) { + String[] tab = name.split("/"); + mSuite = tab[0]; + mTest = tab[1]; + setName(name); + } + + static public void copyAssetsFromPackage(Context ctx) throws IOException { + copyAssetsFromPackage(ctx,"config_files"); + } + + + public static void copyAssetsFromPackage(Context ctx,String fromPath) throws IOException { + new File(ctx.getFilesDir().getPath()+"/"+fromPath).mkdir(); + + for (String f :ctx.getAssets().list(fromPath)) { + String current_name=fromPath+"/"+f; + InputStream lInputStream; + try { + lInputStream = ctx.getAssets().open(current_name); + } catch (IOException e) { + //probably a dir + new File(ctx.getFilesDir().getPath()+"/"+current_name).mkdir(); + copyAssetsFromPackage(ctx,current_name); + continue; + } + FileOutputStream lOutputStream = new FileOutputStream(new File(ctx.getFilesDir().getPath()+"/"+current_name));//ctx.openFileOutput (fromPath+"/"+f, 0); + + + int readByte; + byte[] buff = new byte[8048]; + while (( readByte = lInputStream.read(buff)) != -1) { + lOutputStream.write(buff,0, readByte); + } + lOutputStream.flush(); + lOutputStream.close(); + lInputStream.close(); + } + } + @Override + protected void setUp() throws Exception { + super.setUp(); + if (isAssetCopied ==false) { + copyAssetsFromPackage(getContext()); + isAssetCopied=true; + } + } + + @Override + protected void tearDown() throws Exception { + super.tearDown(); + } + + @Override + protected void runTest() { + String path = getContext().getFilesDir().getPath()+"/config_files"; + Tester tester = new Tester(); + List list = new LinkedList(Arrays.asList(new String[]{"tester", "--verbose", "--config", path, "--suite", mSuite, "--test", mTest})); + String[] array = list.toArray(new String[list.size()]); + Assert.assertTrue(tester.run(array) == 0); + } +} \ No newline at end of file diff --git a/liblinphone_tester/src/org/linphone/tester/Tester.java b/liblinphone_tester/src/org/linphone/tester/Tester.java new file mode 100644 index 000000000..59c3887b3 --- /dev/null +++ b/liblinphone_tester/src/org/linphone/tester/Tester.java @@ -0,0 +1,76 @@ +package org.linphone.tester; + +import java.util.List; + +import org.linphone.core.LinphoneCoreFactory; +import org.linphone.mediastream.Version; + +import android.util.Log; + +public class Tester { + public static String TAG = "liblinphone-tester"; + private static boolean loadOptionalLibrary(String s) { + try { + System.loadLibrary(s); + return true; + } catch (Throwable e) { + Log.w("Unable to load optional library lib", s); + } + return false; + } + + public static boolean isArmv7() + { + return System.getProperty("os.arch").contains("armv7"); + } + + static { + System.loadLibrary("cunit"); + List cpuabis=Version.getCpuAbis(); + String ffmpegAbi; + boolean libLoaded=false; + Throwable firstException=null; + for (String abi : cpuabis){ + Log.i("LinphoneCoreFactoryImpl","Trying to load liblinphone for " + abi); + ffmpegAbi=abi; + // FFMPEG (audio/video) + if (abi.startsWith("armeabi")) { + ffmpegAbi="arm"; + } + loadOptionalLibrary("ffmpeg-linphone-"+ffmpegAbi); + //Main library + try { + System.loadLibrary("linphone-" + abi); + System.loadLibrary("linphone_tester-" + abi); + + Log.i("LinphoneCoreFactoryImpl","Loading done with " + abi); + libLoaded=true; + break; + }catch(Throwable e) { + if (firstException == null) firstException=e; + } + } + + if (!libLoaded){ + throw new RuntimeException(firstException); + + }else{ + Version.dumpCapabilities(); + } + } + + public native int run(String args[]); + public static native void keepAccounts(boolean keep); + public static native void clearAccounts(); + + public void printLog(final int level, final String message) { + switch(level) { + case 0: + android.util.Log.i(TAG, message); + break; + case 1: + android.util.Log.e(TAG, message); + break; + } + } +} diff --git a/liblinphone_tester/src/org/linphone/tester/TesterList.java b/liblinphone_tester/src/org/linphone/tester/TesterList.java new file mode 100644 index 000000000..4dceb606b --- /dev/null +++ b/liblinphone_tester/src/org/linphone/tester/TesterList.java @@ -0,0 +1,16 @@ +package org.linphone.tester; + +import java.util.LinkedList; +import java.util.List; + +public class TesterList extends Tester { + private List list = new LinkedList(); + public void printLog(final int level, final String message) { + super.printLog(level, message); + list.add(message); + } + + public List getList() { + return list; + } +} diff --git a/liblinphone_tester/src/org/linphone/tester/TesterLogger.java b/liblinphone_tester/src/org/linphone/tester/TesterLogger.java new file mode 100644 index 000000000..516763589 --- /dev/null +++ b/liblinphone_tester/src/org/linphone/tester/TesterLogger.java @@ -0,0 +1,16 @@ +package org.linphone.tester; + +public class TesterLogger extends Tester { + private LogsActivity mLogsActivity; + TesterLogger(LogsActivity logsActivity) { + mLogsActivity = logsActivity; + } + public void printLog(final int level, final String message) { + super.printLog(level, message); + mLogsActivity.runOnUiThread(new Runnable() { + public void run() { + mLogsActivity.addLog(level, message); + } + }); + } +} diff --git a/liblinphone_tester/src/org/linphone/tester/WrapperTester.java b/liblinphone_tester/src/org/linphone/tester/WrapperTester.java new file mode 100644 index 000000000..c84ed980b --- /dev/null +++ b/liblinphone_tester/src/org/linphone/tester/WrapperTester.java @@ -0,0 +1,110 @@ +package org.linphone.tester; + +import org.linphone.core.LinphoneCallParams; +import org.linphone.core.LinphoneCore; +import org.linphone.core.LinphoneCoreFactory; +import org.linphone.core.LinphoneCoreListenerBase; +import org.linphone.core.LinphoneFriend; +import org.linphone.core.PayloadType; +import org.linphone.mediastream.MediastreamerAndroidContext; + +import android.test.AndroidTestCase; +import junit.framework.Assert; + +public class WrapperTester extends AndroidTestCase { + + public WrapperTester() { + super(); + setName("wrapper tester"); + } + + LinphoneCore mCore; + @Override + protected void runTest() throws Throwable { + //multicast begin + mCore.enableAudioMulticast(true); + Assert.assertEquals(true, mCore.audioMulticastEnabled()); + mCore.enableAudioMulticast(false); + Assert.assertEquals(false, mCore.audioMulticastEnabled()); + + mCore.enableVideoMulticast(true); + Assert.assertEquals(true, mCore.videoMulticastEnabled()); + mCore.enableVideoMulticast(false); + Assert.assertEquals(false, mCore.videoMulticastEnabled()); + + LinphoneCallParams params = mCore.createDefaultCallParameters(); + params.enableAudioMulticast(true); + Assert.assertEquals(true, params.audioMulticastEnabled()); + params.enableAudioMulticast(false); + Assert.assertEquals(false, params.audioMulticastEnabled()); + + params.enableVideoMulticast(true); + Assert.assertEquals(true, params.videoMulticastEnabled()); + params.enableVideoMulticast(false); + Assert.assertEquals(false, params.videoMulticastEnabled()); + + + String ip = "224.3.2.1"; + mCore.setAudioMulticastAddr(ip); + Assert.assertEquals(ip, mCore.getAudioMulticastAddr()); + + ip = "224.3.2.3"; + mCore.setVideoMulticastAddr(ip); + Assert.assertEquals(ip, mCore.getVideoMulticastAddr()); + + mCore.setAudioMulticastTtl(3); + Assert.assertEquals(3, mCore.getAudioMulticastTtl()); + + mCore.setVideoMulticastTtl(4); + Assert.assertEquals(4, mCore.getVideoMulticastTtl()); + //multicast end + + //Test setPrimaryContact + String address = "Linphone Android "; + mCore.setPrimaryContact(address); + Assert.assertEquals(LinphoneCoreFactory.instance().createLinphoneAddress(address).getDisplayName(), + LinphoneCoreFactory.instance().createLinphoneAddress(mCore.getPrimaryContact()).getDisplayName()); + Assert.assertEquals(LinphoneCoreFactory.instance().createLinphoneAddress(address).getUserName(), + LinphoneCoreFactory.instance().createLinphoneAddress(mCore.getPrimaryContact()).getUserName()); + + //Test setPayloadTypeNumber + mCore.setPayloadTypeNumber(mCore.findPayloadType("PCMU"),12); + Assert.assertEquals(mCore.getPayloadTypeNumber(mCore.findPayloadType("PCMU")),12); + + PayloadType[] audioCodecs = mCore.getAudioCodecs(); + int audioCodecsNb = audioCodecs.length; + if (audioCodecsNb >= 1) { + PayloadType[] newAudioCodecs = new PayloadType[audioCodecsNb - 1]; + System.arraycopy(audioCodecs, 1, newAudioCodecs, 0, audioCodecsNb - 1); + mCore.setAudioCodecs(newAudioCodecs); + audioCodecs = mCore.getAudioCodecs(); + Assert.assertEquals(audioCodecs.length, audioCodecsNb - 1); + } + + //Test LinphoneFriend ref key + String key = "12"; + LinphoneFriend friend = LinphoneCoreFactory.instance().createLinphoneFriend("sip:lala@test.linphone.org"); + friend.setRefKey(key); + Assert.assertEquals(friend.getRefKey(),key); + + MediastreamerAndroidContext.enableFilterFromName("MSUlawEnc", false); + Assert.assertFalse(MediastreamerAndroidContext.filterFromNameEnabled("MSUlawEnc")); + MediastreamerAndroidContext.enableFilterFromName("MSUlawEnc", true); + } + + @Override + protected void setUp() throws Exception { + // TODO Auto-generated method stub + super.setUp(); + mCore = LinphoneCoreFactory.instance().createLinphoneCore(new LinphoneCoreListenerBase(),null); + } + + @Override + protected void tearDown() throws Exception { + // TODO Auto-generated method stub + super.tearDown(); + mCore.destroy(); + mCore=null; + } + +} diff --git a/libs/android-support-v4.jar b/libs/android-support-v4.jar index 018c1272b..e74b0d77d 100644 Binary files a/libs/android-support-v4.jar and b/libs/android-support-v4.jar differ diff --git a/patches/ffmpeg_non_versioned_soname.patch b/patches/ffmpeg_non_versioned_soname.patch new file mode 100644 index 000000000..34a0ecaf0 --- /dev/null +++ b/patches/ffmpeg_non_versioned_soname.patch @@ -0,0 +1,11 @@ +--- submodules/externals/ffmpeg/library.mak.orig 2013-09-26 10:58:19.000000000 +0200 ++++ submodules/externals/ffmpeg/library.mak 2013-09-26 10:58:13.000000000 +0200 +@@ -54,7 +54,7 @@ + + $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver + $(SLIB_CREATE_DEF_CMD) +- $$(LD) $(SHFLAGS) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS) ++ $$(LD) $(subst $$(@F),$(SLIBNAME),$(SHFLAGS)) $(LDFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS) + $(SLIB_EXTRA_CMD) + + ifdef SUBDIR diff --git a/patches/ffmpeg_scalar_product_remove_alignment_hints.patch b/patches/ffmpeg_scalar_product_remove_alignment_hints.patch deleted file mode 100644 index 6d9b48650..000000000 --- a/patches/ffmpeg_scalar_product_remove_alignment_hints.patch +++ /dev/null @@ -1,30 +0,0 @@ ---- submodules/externals/ffmpeg/libavcodec/arm/int_neon.S.orig 2011-09-30 19:43:21.935593025 +0200 -+++ submodules/externals/ffmpeg/libavcodec/arm/int_neon.S 2011-09-30 19:44:21.115168033 +0200 -@@ -35,11 +35,11 @@ - - vdup.s32 q12, r3 - 1: vld1.16 {d16-d17}, [r0]! -- vld1.16 {d20-d21}, [r1,:128]! -+ vld1.16 {d20-d21}, [r1]! - vmull.s16 q12, d16, d20 - vld1.16 {d18-d19}, [r0]! - vmull.s16 q13, d17, d21 -- vld1.16 {d22-d23}, [r1,:128]! -+ vld1.16 {d22-d23}, [r1]! - vmull.s16 q14, d18, d22 - vmull.s16 q15, d19, d23 - vshl.s32 q8, q12, q12 -@@ -55,11 +55,11 @@ - b 3f - - 2: vld1.16 {d16-d17}, [r0]! -- vld1.16 {d20-d21}, [r1,:128]! -+ vld1.16 {d20-d21}, [r1]! - vmlal.s16 q0, d16, d20 - vld1.16 {d18-d19}, [r0]! - vmlal.s16 q1, d17, d21 -- vld1.16 {d22-d23}, [r1,:128]! -+ vld1.16 {d22-d23}, [r1]! - vmlal.s16 q2, d18, d22 - vmlal.s16 q3, d19, d23 - subs r2, r2, #16 diff --git a/patches/libvpx_configure_android_x86.patch b/patches/libvpx_configure_android_x86.patch new file mode 100644 index 000000000..3496853dd --- /dev/null +++ b/patches/libvpx_configure_android_x86.patch @@ -0,0 +1,36 @@ +--- a/submodules/externals/libvpx/build/make/configure.sh ++++ b/submodules/externals/libvpx/build/make/configure.sh +@@ -1037,6 +1037,33 @@ EOF + os2) + AS=${AS:-nasm} + ;; ++ android*) ++ SDK_PATH=${sdk_path} ++ COMPILER_LOCATION=`find "${SDK_PATH}" \ ++ -name "i686-linux-android-gcc*" -print -quit` ++ TOOLCHAIN_PATH=${COMPILER_LOCATION%/*}/i686-linux-android- ++ CC=${TOOLCHAIN_PATH}gcc ++ CXX=${TOOLCHAIN_PATH}g++ ++ AR=${TOOLCHAIN_PATH}ar ++ LD=${TOOLCHAIN_PATH}gcc ++ STRIP=${TOOLCHAIN_PATH}strip ++ NM=${TOOLCHAIN_PATH}nm ++ ++ if [ -z "${alt_libc}" ]; then ++ alt_libc=`find "${SDK_PATH}" -name arch-x86 -print | \ ++ awk '{n = split($0,a,"/"); \ ++ split(a[n-1],b,"-"); \ ++ print $0 " " b[2]}' | \ ++ sort -g -k 2 | \ ++ awk '{ print $1 }' | tail -1` ++ fi ++ ++ add_cflags "--sysroot=${alt_libc}" ++ add_ldflags "--sysroot=${alt_libc}" ++ ++ soft_enable realtime_only ++ ;; ++ + esac + + AS="${alt_as:-${AS:-auto}}" diff --git a/patches/openh264-permissive.patch b/patches/openh264-permissive.patch new file mode 100644 index 000000000..bff18b6ce --- /dev/null +++ b/patches/openh264-permissive.patch @@ -0,0 +1,40 @@ +commit 6b3de978d928b6c0baec3305c9803c21a4367d0c +Author: Simon Morlat +Date: Tue Apr 15 15:19:37 2014 +0200 + + permissive mode: allow reference frames to be used even if there were lost slices. + +diff --git a/codec/decoder/core/src/manage_dec_ref.cpp b/codec/decoder/core/src/manage_dec_ref.cpp +index dcf61ca..5582ec9 100644 +--- a/codec/decoder/core/src/manage_dec_ref.cpp ++++ b/codec/decoder/core/src/manage_dec_ref.cpp +@@ -165,6 +165,7 @@ int32_t WelsReorderRefList (PWelsDecoderContext pCtx) { + && (pSliceHeader->iSpsId != ppRefList[i]->iSpsId)) { //check; + WelsLog (pCtx, WELS_LOG_WARNING, "WelsReorderRefList()-1::::BASE LAYER::::iSpsId:%d, ref_sps_id:%d\n", + pSliceHeader->iSpsId, ppRefList[i]->iSpsId); ++ return ERR_NONE; + pCtx->iErrorCode = dsNoParamSets; //cross-IDR reference frame selection, SHOULD request IDR.-- + return ERR_INFO_REFERENCE_PIC_LOST; + } else { + +commit a1f3b95ad18d0788c2c803fac80e78d6365673ce +Author: Simon Morlat +Date: Tue Apr 15 17:54:58 2014 +0200 + + permissive mode (2) + +diff --git a/codec/decoder/core/src/decoder_core.cpp b/codec/decoder/core/src/decoder_core.cpp +index a14e971..e742dbf 100644 +--- a/codec/decoder/core/src/decoder_core.cpp ++++ b/codec/decoder/core/src/decoder_core.cpp +@@ -1738,8 +1738,8 @@ int32_t DecodeCurrentAccessUnit (PWelsDecoderContext pCtx, uint8_t** ppDst, int3 + if ((iLastIdD < 0) || //case 1: first layer + (iLastIdD == iCurrIdD)) { //case 2: same uiDId + InitDqLayerInfo (dq_cur, &pLayerInfo, pNalCur, pCtx->pDec); +- +- if (!dq_cur->sLayerInfo.pSps->bGapsInFrameNumValueAllowedFlag) { ++ if (0){ ++ //if (!dq_cur->sLayerInfo.pSps->bGapsInFrameNumValueAllowedFlag) { + const bool kbIdrFlag = dq_cur->sLayerInfo.sNalHeaderExt.bIdrFlag + || (dq_cur->sLayerInfo.sNalHeaderExt.sNalUnitHeader.eNalUnitType == NAL_UNIT_CODED_SLICE_IDR); + // Subclause 8.2.5.2 Decoding process for gaps in frame_num diff --git a/patches/x264_log2f_fix.patch b/patches/x264_log2f_fix.patch new file mode 100644 index 000000000..e5d0647a0 --- /dev/null +++ b/patches/x264_log2f_fix.patch @@ -0,0 +1,41 @@ +diff -urN submodules/externals/x264/common/osdep.h.orig submodules/externals/x264/common/osdep.h +--- submodules/externals/x264/common/osdep.h.orig 2014-02-06 13:56:59.243663951 +0100 ++++ submodules/externals/x264/common/osdep.h 2014-02-06 13:57:17.215685078 +0100 +@@ -35,11 +35,6 @@ + + #include "config.h" + +-#if !HAVE_LOG2F +-#define log2f(x) (logf(x)/0.693147180559945f) +-#define log2(x) (log(x)/0.693147180559945) +-#endif +- + #ifdef _WIN32 + #include // _setmode() + #include // _O_BINARY +@@ -55,6 +60,11 @@ + #include + #endif + ++#if !HAVE_LOG2F ++#define log2f(x) (logf(x)/0.693147180559945f) ++#define log2(x) (log(x)/0.693147180559945) ++#endif ++ + #if (defined(__GNUC__) || defined(__INTEL_COMPILER)) && (ARCH_X86 || ARCH_X86_64) + #define HAVE_X86_INLINE_ASM 1 + #endif +diff -urN submodules/externals/x264/configure.orig submodules/externals/x264/configure +--- submodules/externals/x264/configure.orig 2014-02-06 13:56:59.231663937 +0100 ++++ submodules/externals/x264/configure 2014-02-06 13:57:17.219685083 +0100 +@@ -816,10 +816,6 @@ + fi + [ "$thread" != "no" ] && define HAVE_THREAD + +-if cc_check "math.h" "-Werror" "return log2f(2);" ; then +- define HAVE_LOG2F +-fi +- + if [ "$vis" = "yes" ] ; then + save_CFLAGS="$CFLAGS" + CFLAGS="$CFLAGS -I/usr/X11R6/include" diff --git a/project.properties b/project.properties deleted file mode 100644 index 019cc5583..000000000 --- a/project.properties +++ /dev/null @@ -1,15 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system edit -# "ant.properties", and override values to adapt the script to your -# project structure. -# -# To enable ProGuard to shrink and obfuscate your code, uncomment this (available properties: sdk.dir, user.home): -#proguard.config=${sdk.dir}/tools/proguard/proguard-android.txt:proguard-project.txt - -# Project target. -target=android-17 -android.library=false diff --git a/release.patch b/release.patch new file mode 100644 index 000000000..c6f3f3c2f --- /dev/null +++ b/release.patch @@ -0,0 +1,13 @@ +diff --git a/AndroidManifest.xml b/AndroidManifest.xml +index 5ef1374..86e13be 100644 +--- a/AndroidManifest.xml ++++ b/AndroidManifest.xml +@@ -45,7 +45,7 @@ + + + +- ++ + + + + + + \ No newline at end of file diff --git a/res/drawable-sw600dp-land-xhdpi/add_call_more_default.png b/res/drawable-sw533dp-land-xhdpi/add_call_more_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/add_call_more_default.png rename to res/drawable-sw533dp-land-xhdpi/add_call_more_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/add_call_more_disabled.png b/res/drawable-sw533dp-land-xhdpi/add_call_more_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/add_call_more_disabled.png rename to res/drawable-sw533dp-land-xhdpi/add_call_more_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/add_call_more_over.png b/res/drawable-sw533dp-land-xhdpi/add_call_more_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/add_call_more_over.png rename to res/drawable-sw533dp-land-xhdpi/add_call_more_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/add_contact_default.png b/res/drawable-sw533dp-land-xhdpi/add_contact_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/add_contact_default.png rename to res/drawable-sw533dp-land-xhdpi/add_contact_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/add_contact_disabled.png b/res/drawable-sw533dp-land-xhdpi/add_contact_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/add_contact_disabled.png rename to res/drawable-sw533dp-land-xhdpi/add_contact_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/add_contact_over.png b/res/drawable-sw533dp-land-xhdpi/add_contact_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/add_contact_over.png rename to res/drawable-sw533dp-land-xhdpi/add_contact_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/back_default.png b/res/drawable-sw533dp-land-xhdpi/back_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/back_default.png rename to res/drawable-sw533dp-land-xhdpi/back_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/back_disabled.png b/res/drawable-sw533dp-land-xhdpi/back_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/back_disabled.png rename to res/drawable-sw533dp-land-xhdpi/back_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/back_over.png b/res/drawable-sw533dp-land-xhdpi/back_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/back_over.png rename to res/drawable-sw533dp-land-xhdpi/back_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/background_alt.png b/res/drawable-sw533dp-land-xhdpi/background_alt.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/background_alt.png rename to res/drawable-sw533dp-land-xhdpi/background_alt.png diff --git a/res/drawable-sw600dp-land-xhdpi/background_logo.png b/res/drawable-sw533dp-land-xhdpi/background_logo.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/background_logo.png rename to res/drawable-sw533dp-land-xhdpi/background_logo.png diff --git a/res/drawable-sw600dp-land-xhdpi/backspace_default.png b/res/drawable-sw533dp-land-xhdpi/backspace_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/backspace_default.png rename to res/drawable-sw533dp-land-xhdpi/backspace_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/backspace_disabled.png b/res/drawable-sw533dp-land-xhdpi/backspace_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/backspace_disabled.png rename to res/drawable-sw533dp-land-xhdpi/backspace_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/backspace_over.png b/res/drawable-sw533dp-land-xhdpi/backspace_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/backspace_over.png rename to res/drawable-sw533dp-land-xhdpi/backspace_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/bottom.png b/res/drawable-sw533dp-land-xhdpi/bottom.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/bottom.png rename to res/drawable-sw533dp-land-xhdpi/bottom.png diff --git a/res/drawable-sw600dp-land-xhdpi/call_default.png b/res/drawable-sw533dp-land-xhdpi/call_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/call_default.png rename to res/drawable-sw533dp-land-xhdpi/call_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/call_disabled.png b/res/drawable-sw533dp-land-xhdpi/call_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/call_disabled.png rename to res/drawable-sw533dp-land-xhdpi/call_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/call_over.png b/res/drawable-sw533dp-land-xhdpi/call_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/call_over.png rename to res/drawable-sw533dp-land-xhdpi/call_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/cancel_white_bg_default.png b/res/drawable-sw533dp-land-xhdpi/cancel_white_bg_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/cancel_white_bg_default.png rename to res/drawable-sw533dp-land-xhdpi/cancel_white_bg_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/cancel_white_bg_disabled.png b/res/drawable-sw533dp-land-xhdpi/cancel_white_bg_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/cancel_white_bg_disabled.png rename to res/drawable-sw533dp-land-xhdpi/cancel_white_bg_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/cancel_white_bg_over.png b/res/drawable-sw533dp-land-xhdpi/cancel_white_bg_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/cancel_white_bg_over.png rename to res/drawable-sw533dp-land-xhdpi/cancel_white_bg_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/chat_default.png b/res/drawable-sw533dp-land-xhdpi/chat_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/chat_default.png rename to res/drawable-sw533dp-land-xhdpi/chat_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/chat_over.png b/res/drawable-sw533dp-land-xhdpi/chat_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/chat_over.png rename to res/drawable-sw533dp-land-xhdpi/chat_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/chat_selected.png b/res/drawable-sw533dp-land-xhdpi/chat_selected.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/chat_selected.png rename to res/drawable-sw533dp-land-xhdpi/chat_selected.png diff --git a/res/drawable-sw600dp-land-xhdpi/conference_default.png b/res/drawable-sw533dp-land-xhdpi/conference_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/conference_default.png rename to res/drawable-sw533dp-land-xhdpi/conference_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/conference_over.png b/res/drawable-sw533dp-land-xhdpi/conference_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/conference_over.png rename to res/drawable-sw533dp-land-xhdpi/conference_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/contacts_default.png b/res/drawable-sw533dp-land-xhdpi/contacts_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/contacts_default.png rename to res/drawable-sw533dp-land-xhdpi/contacts_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/contacts_over.png b/res/drawable-sw533dp-land-xhdpi/contacts_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/contacts_over.png rename to res/drawable-sw533dp-land-xhdpi/contacts_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/contacts_selected.png b/res/drawable-sw533dp-land-xhdpi/contacts_selected.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/contacts_selected.png rename to res/drawable-sw533dp-land-xhdpi/contacts_selected.png diff --git a/res/drawable-sw600dp-land-xhdpi/dialer_address_background.png b/res/drawable-sw533dp-land-xhdpi/dialer_address_background.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/dialer_address_background.png rename to res/drawable-sw533dp-land-xhdpi/dialer_address_background.png diff --git a/res/drawable-sw600dp-land-xhdpi/dialer_alt_back_default.png b/res/drawable-sw533dp-land-xhdpi/dialer_alt_back_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/dialer_alt_back_default.png rename to res/drawable-sw533dp-land-xhdpi/dialer_alt_back_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/dialer_alt_back_over.png b/res/drawable-sw533dp-land-xhdpi/dialer_alt_back_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/dialer_alt_back_over.png rename to res/drawable-sw533dp-land-xhdpi/dialer_alt_back_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/dialer_alt_default.png b/res/drawable-sw533dp-land-xhdpi/dialer_alt_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/dialer_alt_default.png rename to res/drawable-sw533dp-land-xhdpi/dialer_alt_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/dialer_alt_disabled.png b/res/drawable-sw533dp-land-xhdpi/dialer_alt_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/dialer_alt_disabled.png rename to res/drawable-sw533dp-land-xhdpi/dialer_alt_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/dialer_alt_over.png b/res/drawable-sw533dp-land-xhdpi/dialer_alt_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/dialer_alt_over.png rename to res/drawable-sw533dp-land-xhdpi/dialer_alt_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/dialer_default.png b/res/drawable-sw533dp-land-xhdpi/dialer_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/dialer_default.png rename to res/drawable-sw533dp-land-xhdpi/dialer_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/dialer_over.png b/res/drawable-sw533dp-land-xhdpi/dialer_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/dialer_over.png rename to res/drawable-sw533dp-land-xhdpi/dialer_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/dialer_selected.png b/res/drawable-sw533dp-land-xhdpi/dialer_selected.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/dialer_selected.png rename to res/drawable-sw533dp-land-xhdpi/dialer_selected.png diff --git a/res/drawable-sw600dp-land-xhdpi/hangup_default.png b/res/drawable-sw533dp-land-xhdpi/hangup_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/hangup_default.png rename to res/drawable-sw533dp-land-xhdpi/hangup_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/hangup_over.png b/res/drawable-sw533dp-land-xhdpi/hangup_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/hangup_over.png rename to res/drawable-sw533dp-land-xhdpi/hangup_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/history_default.png b/res/drawable-sw533dp-land-xhdpi/history_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/history_default.png rename to res/drawable-sw533dp-land-xhdpi/history_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/history_over.png b/res/drawable-sw533dp-land-xhdpi/history_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/history_over.png rename to res/drawable-sw533dp-land-xhdpi/history_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/history_selected.png b/res/drawable-sw533dp-land-xhdpi/history_selected.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/history_selected.png rename to res/drawable-sw533dp-land-xhdpi/history_selected.png diff --git a/res/drawable-sw600dp-land-xhdpi/mark.png b/res/drawable-sw533dp-land-xhdpi/mark.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/mark.png rename to res/drawable-sw533dp-land-xhdpi/mark.png diff --git a/res/drawable-sw600dp-land-xhdpi/micro_off_default.png b/res/drawable-sw533dp-land-xhdpi/micro_off_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/micro_off_default.png rename to res/drawable-sw533dp-land-xhdpi/micro_off_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/micro_off_disabled.png b/res/drawable-sw533dp-land-xhdpi/micro_off_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/micro_off_disabled.png rename to res/drawable-sw533dp-land-xhdpi/micro_off_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/micro_off_over.png b/res/drawable-sw533dp-land-xhdpi/micro_off_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/micro_off_over.png rename to res/drawable-sw533dp-land-xhdpi/micro_off_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/micro_on_default.png b/res/drawable-sw533dp-land-xhdpi/micro_on_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/micro_on_default.png rename to res/drawable-sw533dp-land-xhdpi/micro_on_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/micro_on_disabled.png b/res/drawable-sw533dp-land-xhdpi/micro_on_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/micro_on_disabled.png rename to res/drawable-sw533dp-land-xhdpi/micro_on_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/micro_on_over.png b/res/drawable-sw533dp-land-xhdpi/micro_on_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/micro_on_over.png rename to res/drawable-sw533dp-land-xhdpi/micro_on_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_add_default.png b/res/drawable-sw533dp-land-xhdpi/options_add_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_add_default.png rename to res/drawable-sw533dp-land-xhdpi/options_add_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_add_default_alt.png b/res/drawable-sw533dp-land-xhdpi/options_add_default_alt.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_add_default_alt.png rename to res/drawable-sw533dp-land-xhdpi/options_add_default_alt.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_add_disabled.png b/res/drawable-sw533dp-land-xhdpi/options_add_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_add_disabled.png rename to res/drawable-sw533dp-land-xhdpi/options_add_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_add_disabled_alt.png b/res/drawable-sw533dp-land-xhdpi/options_add_disabled_alt.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_add_disabled_alt.png rename to res/drawable-sw533dp-land-xhdpi/options_add_disabled_alt.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_add_over.png b/res/drawable-sw533dp-land-xhdpi/options_add_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_add_over.png rename to res/drawable-sw533dp-land-xhdpi/options_add_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_add_over_alt.png b/res/drawable-sw533dp-land-xhdpi/options_add_over_alt.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_add_over_alt.png rename to res/drawable-sw533dp-land-xhdpi/options_add_over_alt.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_default.png b/res/drawable-sw533dp-land-xhdpi/options_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_default.png rename to res/drawable-sw533dp-land-xhdpi/options_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_default_alt.png b/res/drawable-sw533dp-land-xhdpi/options_default_alt.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_default_alt.png rename to res/drawable-sw533dp-land-xhdpi/options_default_alt.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_disabled.png b/res/drawable-sw533dp-land-xhdpi/options_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_disabled.png rename to res/drawable-sw533dp-land-xhdpi/options_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_disabled_alt.png b/res/drawable-sw533dp-land-xhdpi/options_disabled_alt.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_disabled_alt.png rename to res/drawable-sw533dp-land-xhdpi/options_disabled_alt.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_over.png b/res/drawable-sw533dp-land-xhdpi/options_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_over.png rename to res/drawable-sw533dp-land-xhdpi/options_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_over_alt.png b/res/drawable-sw533dp-land-xhdpi/options_over_alt.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_over_alt.png rename to res/drawable-sw533dp-land-xhdpi/options_over_alt.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_selected.png b/res/drawable-sw533dp-land-xhdpi/options_selected.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_selected.png rename to res/drawable-sw533dp-land-xhdpi/options_selected.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_selected_alt.png b/res/drawable-sw533dp-land-xhdpi/options_selected_alt.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_selected_alt.png rename to res/drawable-sw533dp-land-xhdpi/options_selected_alt.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_transfer_default.png b/res/drawable-sw533dp-land-xhdpi/options_transfer_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_transfer_default.png rename to res/drawable-sw533dp-land-xhdpi/options_transfer_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_transfer_disabled.png b/res/drawable-sw533dp-land-xhdpi/options_transfer_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_transfer_disabled.png rename to res/drawable-sw533dp-land-xhdpi/options_transfer_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/options_transfer_over.png b/res/drawable-sw533dp-land-xhdpi/options_transfer_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/options_transfer_over.png rename to res/drawable-sw533dp-land-xhdpi/options_transfer_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/pause_off_default.png b/res/drawable-sw533dp-land-xhdpi/pause_off_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/pause_off_default.png rename to res/drawable-sw533dp-land-xhdpi/pause_off_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/pause_off_disabled.png b/res/drawable-sw533dp-land-xhdpi/pause_off_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/pause_off_disabled.png rename to res/drawable-sw533dp-land-xhdpi/pause_off_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/pause_off_over.png b/res/drawable-sw533dp-land-xhdpi/pause_off_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/pause_off_over.png rename to res/drawable-sw533dp-land-xhdpi/pause_off_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/pause_on_default.png b/res/drawable-sw533dp-land-xhdpi/pause_on_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/pause_on_default.png rename to res/drawable-sw533dp-land-xhdpi/pause_on_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/pause_on_over.png b/res/drawable-sw533dp-land-xhdpi/pause_on_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/pause_on_over.png rename to res/drawable-sw533dp-land-xhdpi/pause_on_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/settings_default.png b/res/drawable-sw533dp-land-xhdpi/settings_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/settings_default.png rename to res/drawable-sw533dp-land-xhdpi/settings_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/settings_over.png b/res/drawable-sw533dp-land-xhdpi/settings_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/settings_over.png rename to res/drawable-sw533dp-land-xhdpi/settings_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/settings_selected.png b/res/drawable-sw533dp-land-xhdpi/settings_selected.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/settings_selected.png rename to res/drawable-sw533dp-land-xhdpi/settings_selected.png diff --git a/res/drawable-sw600dp-land-xhdpi/setup_back_default.png b/res/drawable-sw533dp-land-xhdpi/setup_back_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/setup_back_default.png rename to res/drawable-sw533dp-land-xhdpi/setup_back_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/setup_back_disabled.png b/res/drawable-sw533dp-land-xhdpi/setup_back_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/setup_back_disabled.png rename to res/drawable-sw533dp-land-xhdpi/setup_back_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/setup_back_over.png b/res/drawable-sw533dp-land-xhdpi/setup_back_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/setup_back_over.png rename to res/drawable-sw533dp-land-xhdpi/setup_back_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/setup_cancel_default.png b/res/drawable-sw533dp-land-xhdpi/setup_cancel_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/setup_cancel_default.png rename to res/drawable-sw533dp-land-xhdpi/setup_cancel_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/setup_cancel_disabled.png b/res/drawable-sw533dp-land-xhdpi/setup_cancel_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/setup_cancel_disabled.png rename to res/drawable-sw533dp-land-xhdpi/setup_cancel_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/setup_cancel_over.png b/res/drawable-sw533dp-land-xhdpi/setup_cancel_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/setup_cancel_over.png rename to res/drawable-sw533dp-land-xhdpi/setup_cancel_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/setup_start_default.png b/res/drawable-sw533dp-land-xhdpi/setup_start_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/setup_start_default.png rename to res/drawable-sw533dp-land-xhdpi/setup_start_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/setup_start_disabled.png b/res/drawable-sw533dp-land-xhdpi/setup_start_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/setup_start_disabled.png rename to res/drawable-sw533dp-land-xhdpi/setup_start_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/setup_start_over.png b/res/drawable-sw533dp-land-xhdpi/setup_start_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/setup_start_over.png rename to res/drawable-sw533dp-land-xhdpi/setup_start_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/speaker_off_default.png b/res/drawable-sw533dp-land-xhdpi/speaker_off_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/speaker_off_default.png rename to res/drawable-sw533dp-land-xhdpi/speaker_off_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/speaker_off_disabled.png b/res/drawable-sw533dp-land-xhdpi/speaker_off_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/speaker_off_disabled.png rename to res/drawable-sw533dp-land-xhdpi/speaker_off_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/speaker_off_over.png b/res/drawable-sw533dp-land-xhdpi/speaker_off_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/speaker_off_over.png rename to res/drawable-sw533dp-land-xhdpi/speaker_off_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/speaker_on_default.png b/res/drawable-sw533dp-land-xhdpi/speaker_on_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/speaker_on_default.png rename to res/drawable-sw533dp-land-xhdpi/speaker_on_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/speaker_on_disabled.png b/res/drawable-sw533dp-land-xhdpi/speaker_on_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/speaker_on_disabled.png rename to res/drawable-sw533dp-land-xhdpi/speaker_on_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/speaker_on_over.png b/res/drawable-sw533dp-land-xhdpi/speaker_on_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/speaker_on_over.png rename to res/drawable-sw533dp-land-xhdpi/speaker_on_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/splashscreen.png b/res/drawable-sw533dp-land-xhdpi/splashscreen.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/splashscreen.png rename to res/drawable-sw533dp-land-xhdpi/splashscreen.png diff --git a/res/drawable-sw600dp-land-xhdpi/statebar_background.png b/res/drawable-sw533dp-land-xhdpi/statebar_background.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/statebar_background.png rename to res/drawable-sw533dp-land-xhdpi/statebar_background.png diff --git a/res/drawable-sw600dp-land-xhdpi/unknown_small.png b/res/drawable-sw533dp-land-xhdpi/unknown_small.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/unknown_small.png rename to res/drawable-sw533dp-land-xhdpi/unknown_small.png diff --git a/res/drawable-sw600dp-land-xhdpi/video_off_default.png b/res/drawable-sw533dp-land-xhdpi/video_off_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/video_off_default.png rename to res/drawable-sw533dp-land-xhdpi/video_off_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/video_off_disabled.png b/res/drawable-sw533dp-land-xhdpi/video_off_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/video_off_disabled.png rename to res/drawable-sw533dp-land-xhdpi/video_off_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/video_off_over.png b/res/drawable-sw533dp-land-xhdpi/video_off_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/video_off_over.png rename to res/drawable-sw533dp-land-xhdpi/video_off_over.png diff --git a/res/drawable-sw600dp-land-xhdpi/video_on_default.png b/res/drawable-sw533dp-land-xhdpi/video_on_default.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/video_on_default.png rename to res/drawable-sw533dp-land-xhdpi/video_on_default.png diff --git a/res/drawable-sw600dp-land-xhdpi/video_on_disabled.png b/res/drawable-sw533dp-land-xhdpi/video_on_disabled.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/video_on_disabled.png rename to res/drawable-sw533dp-land-xhdpi/video_on_disabled.png diff --git a/res/drawable-sw600dp-land-xhdpi/video_on_over.png b/res/drawable-sw533dp-land-xhdpi/video_on_over.png similarity index 100% rename from res/drawable-sw600dp-land-xhdpi/video_on_over.png rename to res/drawable-sw533dp-land-xhdpi/video_on_over.png diff --git a/res/drawable-xhdpi/add_call_over.png b/res/drawable-xhdpi/add_call_over.png deleted file mode 100644 index 50fefa47f..000000000 Binary files a/res/drawable-xhdpi/add_call_over.png and /dev/null differ diff --git a/res/drawable-xhdpi/chat_back_default.9.png b/res/drawable-xhdpi/chat_back_default.9.png new file mode 100644 index 000000000..0979d7605 Binary files /dev/null and b/res/drawable-xhdpi/chat_back_default.9.png differ diff --git a/res/drawable-xhdpi/chat_back_over.9.png b/res/drawable-xhdpi/chat_back_over.9.png new file mode 100644 index 000000000..841fb620d Binary files /dev/null and b/res/drawable-xhdpi/chat_back_over.9.png differ diff --git a/res/drawable-xhdpi/chat_background.png b/res/drawable-xhdpi/chat_background.png new file mode 100644 index 000000000..8a28fcd3b Binary files /dev/null and b/res/drawable-xhdpi/chat_background.png differ diff --git a/res/drawable-xhdpi/chat_field_background.9.png b/res/drawable-xhdpi/chat_field_background.9.png index 75b262e7c..5c406644c 100644 Binary files a/res/drawable-xhdpi/chat_field_background.9.png and b/res/drawable-xhdpi/chat_field_background.9.png differ diff --git a/res/drawable-xhdpi/chat_progressbar_background.png b/res/drawable-xhdpi/chat_progressbar_background.png deleted file mode 100644 index abd966e86..000000000 Binary files a/res/drawable-xhdpi/chat_progressbar_background.png and /dev/null differ diff --git a/res/drawable-xhdpi/contact_delete_default.9.png b/res/drawable-xhdpi/contact_delete_default.9.png new file mode 100644 index 000000000..993639f69 Binary files /dev/null and b/res/drawable-xhdpi/contact_delete_default.9.png differ diff --git a/res/drawable-xhdpi/contact_delete_over.9.png b/res/drawable-xhdpi/contact_delete_over.9.png new file mode 100644 index 000000000..bf0fdcd75 Binary files /dev/null and b/res/drawable-xhdpi/contact_delete_over.9.png differ diff --git a/res/drawable/chat_back.xml b/res/drawable/chat_back.xml new file mode 100644 index 000000000..80e8f379b --- /dev/null +++ b/res/drawable/chat_back.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/res/drawable/contact_delete.xml b/res/drawable/contact_delete.xml new file mode 100644 index 000000000..32694f1e5 --- /dev/null +++ b/res/drawable/contact_delete.xml @@ -0,0 +1,8 @@ + + + + + + diff --git a/res/layout-FR/chat.xml b/res/layout-FR/chat.xml deleted file mode 100644 index 5eeb2081a..000000000 --- a/res/layout-FR/chat.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/res/layout-RU/chat.xml b/res/layout-RU/chat.xml deleted file mode 100644 index d6cb7d588..000000000 --- a/res/layout-RU/chat.xml +++ /dev/null @@ -1,144 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/res/layout-land/incall.xml b/res/layout-land/incall.xml index 4acbe4f79..ad33b6530 100644 --- a/res/layout-land/incall.xml +++ b/res/layout-land/incall.xml @@ -44,6 +44,7 @@ android:visibility="invisible" /> - + android:background="@drawable/pause_off" + android:gravity="center" + android:paddingTop="30dp" /> - - - + android:paddingTop="30dp" /> + + + + + + + + + + + - + android:background="@drawable/hangup" + android:gravity="center" + android:paddingTop="30dp" /> - + diff --git a/res/layout-small/about.xml b/res/layout-small/about.xml deleted file mode 100644 index ec5bfef5a..000000000 --- a/res/layout-small/about.xml +++ /dev/null @@ -1,51 +0,0 @@ - - - - - - - - - - - - -