diff --git a/.gitmodules b/.gitmodules index ef13a0bdc..c786a0df0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -7,12 +7,6 @@ [submodule "submodules/externals/speex"] path = submodules/externals/speex url = git://git.linphone.org/speex.git -[submodule "submodules/msilbc"] - path = submodules/msilbc - url = git://git.linphone.org/msilbc.git -[submodule "submodules/libilbc-rfc3951"] - path = submodules/libilbc-rfc3951 - url = git://git.linphone.org/libilbc-rfc3951.git [submodule "submodules/externals/ffmpeg"] path = submodules/externals/ffmpeg url = git://git.linphone.org/ffmpeg.git @@ -84,10 +78,12 @@ 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/mscodec2"] path = submodules/mscodec2 - url = git://git.linphone.org/mscodec2.git \ No newline at end of file + url = git://git.linphone.org/mscodec2.git +[submodule "submodules/bctoolbox"] + path = submodules/bctoolbox + url = git://git.linphone.org/bctoolbox.git +[submodule "submodules/externals/mbedtls"] + path = submodules/externals/mbedtls + url = https://github.com/ARMmbed/mbedtls.git diff --git a/.tx/config b/.tx/config index a1399b7b7..5c0e0fe80 100644 --- a/.tx/config +++ b/.tx/config @@ -8,8 +8,3 @@ type = ANDROID 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 ab3a9dd9c..a163c2342 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -41,7 +41,7 @@ - + - + diff --git a/Makefile b/Makefile index 275325f34..0bad496b7 100644 --- a/Makefile +++ b/Makefile @@ -61,6 +61,7 @@ BUILD_RTP_MAP=0 BUILD_DONT_CHECK_HEADERS_IN_MESSAGE=0 BUILD_ILBC=1 BUILD_CODEC2=0 +BUILD_BCTOOLBOX_MBEDTLS=0 LIBLINPHONE_EXTENDED_SRC_FILES= LIBLINPHONE_EXTENDED_C_INCLUDES= LIBLINPHONE_EXTENDED_CFLAGS= @@ -130,25 +131,6 @@ endif install: install-apk run-linphone -#libilbc -LIBILBC_SRC_DIR=$(TOPDIR)/submodules/libilbc-rfc3951 -LIBILBC_BUILD_DIR=$(LIBILBC_SRC_DIR) -$(LIBILBC_SRC_DIR)/configure: - cd $(LIBILBC_SRC_DIR) && ./autogen.sh - -$(LIBILBC_BUILD_DIR)/Makefile: $(LIBILBC_SRC_DIR)/configure - cd $(LIBILBC_BUILD_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) @@ -303,13 +285,13 @@ 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 +copy-openh264-x86: 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 +copy-openh264-arm: openh264-install-headers mkdir -p $(OPENH264_BUILD_DIR) mkdir -p $(OPENH264_BUILD_DIR_ARM) cd $(OPENH264_BUILD_DIR_ARM) \ @@ -339,7 +321,7 @@ endif endif LIBVPX_SRC_DIR=$(TOPDIR)/submodules/externals/libvpx 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 +LIBVPX_CONFIGURE_OPTIONS=--disable-vp9 --disable-examples --disable-unit-tests --disable-postproc --enable-error-concealment --enable-pic $(LIBVPX_SRC_DIR)/configure_android_x86_patch_applied.txt: cd $(LIBVPX_SRC_DIR) && patch -p1 < $(TOPDIR)/patches/libvpx_configure_android_x86.patch @@ -418,8 +400,8 @@ prepare-liblinphone_tester: $(TOPDIR)/submodules/linphone/tester/tester_hosts $( #Matroska2 -MATROSKA_SRC_DIR=$(TOPDIR)/submodules/externals/libmatroska -MATROSKA_BUILD_DIR=$(TOPDIR)/submodules/externals/build/libmatroska +MATROSKA_SRC_DIR=$(TOPDIR)/submodules/externals/libmatroska-c +MATROSKA_BUILD_DIR=$(TOPDIR)/submodules/externals/build/libmatroska-c ifeq ($(BUILD_MATROSKA), 1) prepare-matroska2: $(MATROSKA_SRC_DIR)/patch_applied.txt else @@ -430,7 +412,7 @@ $(MATROSKA_SRC_DIR)/patch_applied.txt: $(MATROSKA_BUILD_DIR)/fix_libmatroska2.pa 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 prepare-codec2 +prepare-sources: build-ffmpeg build-x264 build-openh264 build-vpx prepare-srtp prepare-mediastreamer2 prepare-antlr3 prepare-belle-sip $(TOPDIR)/res/raw/rootca.pem prepare-matroska2 prepare-codec2 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_CODEC2=$(BUILD_CODEC2)\ diff --git a/README b/README index 90da5a6cf..eeee2734a 100644 --- a/README +++ b/README @@ -42,7 +42,7 @@ 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) 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 +3) change the package name also in the files: res/xml/syncadapter.xml, res/xml/contacts.xml and res/values/non_localizable_custom where appears 4) run again the Makefile script by calling "make" To run the liblinphone test suite on android diff --git a/build.gradle b/build.gradle index c341bf0f5..afc438434 100644 --- a/build.gradle +++ b/build.gradle @@ -3,7 +3,7 @@ buildscript { mavenCentral() } dependencies { - classpath 'com.android.tools.build:gradle:1.0.0' + classpath 'com.android.tools.build:gradle:1.3.0' } } apply plugin: 'android' diff --git a/jni/Android.mk b/jni/Android.mk index fbb7fb5a0..2ba8b6253 100755 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -54,10 +54,17 @@ include $(linphone-root-dir)/submodules/externals/build/gsm/Android.mk # Matroska ifeq ($(BUILD_MATROSKA), 1) -include $(linphone-root-dir)/submodules/externals/build/libmatroska/Android.mk +include $(linphone-root-dir)/submodules/externals/build/libmatroska-c/Android.mk endif +ifeq ($(BUILD_BCTOOLBOX_MBEDTLS),1) +include $(linphone-root-dir)/submodules/externals/build/mbedtls/Android.mk +include $(linphone-root-dir)/submodules/bctoolbox/build/android/Android-mbedtls.mk +else include $(linphone-root-dir)/submodules/externals/build/polarssl/Android.mk +include $(linphone-root-dir)/submodules/bctoolbox/build/android/Android-polarssl.mk +endif + 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 @@ -82,10 +89,6 @@ endif include $(linphone-root-dir)/submodules/mssilk/Android.mk endif -ifeq ($(BUILD_ILBC), 1) -include $(linphone-root-dir)/submodules/msilbc/Android.mk -endif - ifeq ($(BUILD_CODEC2), 1) include $(linphone-root-dir)/submodules/mscodec2/Android.mk include $(linphone-root-dir)/submodules/externals/build/codec2/Android.mk @@ -179,13 +182,14 @@ $(info $(TARGET_ARCH_ABI): Build NEON modules for ISAC) WEBRTC_BUILD_NEON_LIBS=true endif -$(info $(TARGET_ARCH_ABI): Build iSAC plugin for mediastreamer2) +$(info $(TARGET_ARCH_ABI): Build iSAC and ilbc plugin for mediastreamer2) include $(linphone-root-dir)/submodules/mswebrtc/build/android/modules/audio_coding/codecs/isac/fix/source/Android.mk +include $(linphone-root-dir)/submodules/mswebrtc/build/android/modules/audio_coding/codecs/ilbc/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))) +ifneq ($(BUILD_WEBRTC_AECM)$(BUILD_WEBRTC_ISAC)$(BUILD_ILBC),000) +$(info $(TARGET_ARCH_ABI): Build common modules for iSAC, ilbc and AECM ($(BUILD_WEBRTC_AECM)$(BUILD_WEBRTC_ISAC))) include $(linphone-root-dir)/submodules/mswebrtc/build/android/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 ab32cd6d1..8650c929e 100644 --- a/jni/Application.mk +++ b/jni/Application.mk @@ -55,10 +55,15 @@ ifeq ($(BUILD_UPNP),1) APP_MODULES += libupnp endif +APP_MODULES +=bctoolbox ifeq ($(BUILD_TLS),1) +ifeq ($(BUILD_BCTOOLBOX_MBEDTLS),1) +APP_MODULES +=mbedtls +else APP_MODULES +=polarssl endif endif +endif ifeq ($(BUILD_VIDEO),1) APP_MODULES += libffmpeg-linphone @@ -103,6 +108,13 @@ ifneq ($(BUILD_OPUS), 0) APP_MODULES += libopus endif +ifeq ($(BUILD_ILBC), 1) +APP_MODULES += libwebrtc_spl libwebrtc_ilbc libmswebrtc +ifneq (,$(findstring armeabi,$(TARGET_ARCH_ABI))) +APP_MODULES += libwebrtc_spl_neon +endif +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))) @@ -135,10 +147,6 @@ ifeq ($(BUILD_CODEC2), 1) APP_MODULES +=libcodec2 libmscodec2 endif -ifeq ($(BUILD_ILBC), 1) -APP_MODULES +=libmsilbc -endif - ifeq ($(BUILD_SRTP), 1) APP_MODULES += libsrtp endif diff --git a/patches/libvpx_configure_android_x86.patch b/patches/libvpx_configure_android_x86.patch index 6c7f40e97..fa1004599 100644 --- a/patches/libvpx_configure_android_x86.patch +++ b/patches/libvpx_configure_android_x86.patch @@ -1,10 +1,10 @@ diff --git a/build/make/configure.sh b/build/make/configure.sh -index 25c9f80..336b006 100644 +index c592b63..e4998d7 100644 --- a/build/make/configure.sh +++ b/build/make/configure.sh -@@ -1082,6 +1082,33 @@ EOF - os2) +@@ -1132,6 +1132,32 @@ EOF AS=${AS:-nasm} + add_ldflags -Zhigh-mem ;; + android*) + SDK_PATH=${sdk_path} @@ -32,7 +32,6 @@ index 25c9f80..336b006 100644 + + soft_enable realtime_only + ;; -+ esac AS="${alt_as:-${AS:-auto}}" diff --git a/res/drawable-xhdpi/dialer_background.png b/res/drawable-xhdpi/dialer_background.png new file mode 100644 index 000000000..fc750d8b2 Binary files /dev/null and b/res/drawable-xhdpi/dialer_background.png differ diff --git a/res/drawable/assistant_button.xml b/res/drawable/assistant_button.xml index 4d4295934..9f509e491 100644 --- a/res/drawable/assistant_button.xml +++ b/res/drawable/assistant_button.xml @@ -1,7 +1,9 @@ + android:drawable="@drawable/resizable_assistant_button_over" /> + diff --git a/res/drawable/assistant_button_text_color.xml b/res/drawable/assistant_button_text_color.xml new file mode 100644 index 000000000..8e05da560 --- /dev/null +++ b/res/drawable/assistant_button_text_color.xml @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/res/drawable/numpad_star.xml b/res/drawable/numpad_star.xml deleted file mode 100644 index a68ea64c9..000000000 --- a/res/drawable/numpad_star.xml +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - diff --git a/res/layout-land/about.xml b/res/layout-land/about.xml new file mode 100644 index 000000000..6d1896de8 --- /dev/null +++ b/res/layout-land/about.xml @@ -0,0 +1,167 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +