From 4e5691e9456ed40937dcb6bed1f273a1d1ad17d7 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Thu, 29 Oct 2015 16:07:00 +0100 Subject: [PATCH 01/56] update linphone --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index ad29346e1..9f2f6163d 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit ad29346e10addd4e5b1e3cf18dd2bc0546756f59 +Subproject commit 9f2f6163d0cdf8125af94c3719a8f49647d533b1 From dc9eb9cf1d4c3ebef32638da9e96f40c434375cf Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Fri, 30 Oct 2015 11:19:16 +0100 Subject: [PATCH 02/56] Add restart linphone core method --- src/org/linphone/LinphoneManager.java | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index ae597b8fa..f7c141004 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -550,6 +550,28 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag } } + public synchronized final void destroyLinphoneCore(Context c) { + sExited = true; + BluetoothManager.getInstance().destroy(); + try { + mTimer.cancel(); + mLc.destroy(); + } + catch (RuntimeException e) { + e.printStackTrace(); + } + finally { + mServiceContext.unregisterReceiver(instance.mKeepAliveReceiver); + mLc = null; + } + } + + public void restartLinphoneCore(Context context){ + destroyLinphoneCore(context); + startLibLinphone(context); + sExited = true; + } + private synchronized void startLibLinphone(Context c) { try { copyAssetsFromPackage(); From ecc4cf85cfa9ba0f0800fb332a832ff24999ff28 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 30 Oct 2015 15:00:41 +0100 Subject: [PATCH 03/56] fix restartLinphoneCore() --- src/org/linphone/LinphoneManager.java | 9 ++++----- src/org/linphone/setup/RemoteProvisioningActivity.java | 6 +----- submodules/linphone | 2 +- 3 files changed, 6 insertions(+), 11 deletions(-) diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index f7c141004..1b8eb2622 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -550,7 +550,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag } } - public synchronized final void destroyLinphoneCore(Context c) { + public synchronized final void destroyLinphoneCore() { sExited = true; BluetoothManager.getInstance().destroy(); try { @@ -566,10 +566,9 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag } } - public void restartLinphoneCore(Context context){ - destroyLinphoneCore(context); - startLibLinphone(context); - sExited = true; + public void restartLinphoneCore(){ + destroyLinphoneCore(); + startLibLinphone(mServiceContext); } private synchronized void startLibLinphone(Context c) { diff --git a/src/org/linphone/setup/RemoteProvisioningActivity.java b/src/org/linphone/setup/RemoteProvisioningActivity.java index 9a22a05b2..f97ecfe7d 100644 --- a/src/org/linphone/setup/RemoteProvisioningActivity.java +++ b/src/org/linphone/setup/RemoteProvisioningActivity.java @@ -183,11 +183,7 @@ public class RemoteProvisioningActivity extends Activity { mHandler.postDelayed(new Runnable() { @Override public void run() { - LinphoneManager.destroy(); - stopService(new Intent(ACTION_MAIN).setClass(RemoteProvisioningActivity.this, LinphoneService.class)); - Intent intent = new Intent(); - intent.setClass(RemoteProvisioningActivity.this, LinphoneLauncherActivity.class); - startActivity(intent); + LinphoneManager.getInstance().restartLinphoneCore(); } }, 1000); } diff --git a/submodules/linphone b/submodules/linphone index 9f2f6163d..f06140d07 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 9f2f6163d0cdf8125af94c3719a8f49647d533b1 +Subproject commit f06140d0758a409a70070aa2bd6f31086613cf1d From 80211b04461cca7d1b93934d8c2cb084270237dd Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 30 Oct 2015 15:05:25 +0100 Subject: [PATCH 04/56] set sExited = false after restarting --- src/org/linphone/LinphoneManager.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index 1b8eb2622..bf99a9473 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -569,6 +569,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag public void restartLinphoneCore(){ destroyLinphoneCore(); startLibLinphone(mServiceContext); + sExited = false; } private synchronized void startLibLinphone(Context c) { From fff9ec1c8c20e1bcc527221c2c85f790a161a550 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 30 Oct 2015 15:47:15 +0100 Subject: [PATCH 05/56] fix remote provisioning stuff --- src/org/linphone/LinphoneManager.java | 13 +++++++------ src/org/linphone/LinphonePreferences.java | 7 ++----- submodules/linphone | 2 +- 3 files changed, 10 insertions(+), 12 deletions(-) diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index bf99a9473..8a05a54c1 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -582,12 +582,6 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag mLc = LinphoneCoreFactory.instance().createLinphoneCore(this, mLinphoneConfigFile, mLinphoneFactoryConfigFile, null, c); - try { - initLiblinphone(); - } catch (LinphoneCoreException e) { - Log.e(e); - } - TimerTask lTask = new TimerTask() { @Override public void run() { @@ -872,6 +866,13 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag public void globalState(final LinphoneCore lc, final GlobalState state, final String message) { Log.i("New global state [",state,"]"); + if (state == GlobalState.GlobalOn){ + try { + initLiblinphone(); + } catch (LinphoneCoreException e) { + Log.e(e); + } + } } public void registrationState(final LinphoneCore lc, final LinphoneProxyConfig proxy,final RegistrationState state,final String message) { diff --git a/src/org/linphone/LinphonePreferences.java b/src/org/linphone/LinphonePreferences.java index f67b34fb4..81a1675a1 100644 --- a/src/org/linphone/LinphonePreferences.java +++ b/src/org/linphone/LinphonePreferences.java @@ -1053,14 +1053,11 @@ public class LinphonePreferences { if (url != null && url.length() == 0) { url = null; } - - LpConfig config = getConfig(); - config.setString("misc", "config-uri", url); - config.sync(); + getLc().setProvisioningUri(url); } public String getRemoteProvisioningUrl() { - return getConfig().getString("misc", "config-uri", null); + return getLc().getProvisioningUri(); } public void setDefaultDisplayName(String displayName) { diff --git a/submodules/linphone b/submodules/linphone index f06140d07..d94a20367 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit f06140d0758a409a70070aa2bd6f31086613cf1d +Subproject commit d94a20367fca31e882632d6b44d354ee4efea62f From ed30a6b6b8211497207cbcf762ce66a5d319ddd1 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 30 Oct 2015 16:52:38 +0100 Subject: [PATCH 06/56] update polarssl and linphone in order to fix SRTP-DTLS interoperability issues --- submodules/externals/polarssl | 2 +- submodules/linphone | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/submodules/externals/polarssl b/submodules/externals/polarssl index ab2f403a3..919006f5f 160000 --- a/submodules/externals/polarssl +++ b/submodules/externals/polarssl @@ -1 +1 @@ -Subproject commit ab2f403a3e0ec91257f0e943129c0eec272f34e8 +Subproject commit 919006f5f33febe72205078a125fae811b12a3d6 diff --git a/submodules/linphone b/submodules/linphone index d94a20367..5948c2e97 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit d94a20367fca31e882632d6b44d354ee4efea62f +Subproject commit 5948c2e9730aceccf0e854fad593ab8916e35584 From 7d35d3290e07057a9dcbfd642e77ff1fdd83c59b Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Fri, 30 Oct 2015 18:05:34 +0100 Subject: [PATCH 07/56] fix crash in tester --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 5948c2e97..933a75d87 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 5948c2e9730aceccf0e854fad593ab8916e35584 +Subproject commit 933a75d8734338aa52bf4da7356bd1390eea4b58 From fa3c7e277a7f1bc0495872769d04475de80f3308 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Mon, 2 Nov 2015 22:02:05 +0100 Subject: [PATCH 08/56] update linphone submodule --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 933a75d87..7b529234d 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 933a75d8734338aa52bf4da7356bd1390eea4b58 +Subproject commit 7b529234d631c04c8a59671ec49e0a5d0643a4b1 From efbfc780d737deada60d979de6aefa21fcb33d7c Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 3 Nov 2015 14:14:29 +0100 Subject: [PATCH 09/56] fix nullpointer exceptions at startup --- src/org/linphone/LinphoneManager.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index 8a05a54c1..0ffaad7fa 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -605,7 +605,8 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag } } - private synchronized void initLiblinphone() throws LinphoneCoreException { + private synchronized void initLiblinphone(LinphoneCore lc) throws LinphoneCoreException { + mLc = lc; boolean isDebugLogEnabled = !(mR.getBoolean(R.bool.disable_every_log)) && mPrefs.isDebugEnabled(); LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name)); LinphoneCoreFactory.instance().enableLogCollection(isDebugLogEnabled); @@ -868,7 +869,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag Log.i("New global state [",state,"]"); if (state == GlobalState.GlobalOn){ try { - initLiblinphone(); + initLiblinphone(lc); } catch (LinphoneCoreException e) { Log.e(e); } From 8f24f95a5409259cc43de6c347f33685d9b68d8b Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 3 Nov 2015 14:37:52 +0100 Subject: [PATCH 10/56] update linphone submodule for missing java wrapper. --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 7b529234d..4385557cd 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 7b529234d631c04c8a59671ec49e0a5d0643a4b1 +Subproject commit 4385557cd8e4b82d74194db094edabe8dd708c35 From 76fd5a4a822a6041e5e7c1f710ae4dd01a5e9851 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Tue, 3 Nov 2015 18:30:55 +0100 Subject: [PATCH 11/56] fix crash at startup --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 4385557cd..faa609223 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 4385557cd8e4b82d74194db094edabe8dd708c35 +Subproject commit faa60922366ddb62f35ec4fe05bfd4bc8fc87aa6 From 0287f98dc40e3ebadfb394c58033d0cc56a88b30 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 4 Nov 2015 17:55:32 +0100 Subject: [PATCH 12/56] update linphone submodule --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index faa609223..f0b9d0fff 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit faa60922366ddb62f35ec4fe05bfd4bc8fc87aa6 +Subproject commit f0b9d0fffec8048c1f11ee313a08cce5efbfc1ed From 9d3939469995330cbc9955344e6746d5d5183247 Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Sun, 8 Nov 2015 00:12:03 +0100 Subject: [PATCH 13/56] fix compilation error in a tester --- liblinphone_tester/src/org/linphone/tester/WrapperTester.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/liblinphone_tester/src/org/linphone/tester/WrapperTester.java b/liblinphone_tester/src/org/linphone/tester/WrapperTester.java index c84ed980b..7635a67ba 100644 --- a/liblinphone_tester/src/org/linphone/tester/WrapperTester.java +++ b/liblinphone_tester/src/org/linphone/tester/WrapperTester.java @@ -32,7 +32,7 @@ public class WrapperTester extends AndroidTestCase { mCore.enableVideoMulticast(false); Assert.assertEquals(false, mCore.videoMulticastEnabled()); - LinphoneCallParams params = mCore.createDefaultCallParameters(); + LinphoneCallParams params = mCore.createCallParams(null); params.enableAudioMulticast(true); Assert.assertEquals(true, params.audioMulticastEnabled()); params.enableAudioMulticast(false); From 6d1a2e82de925e121223e66a0f5721a84577d03b Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Mon, 9 Nov 2015 16:11:39 +0100 Subject: [PATCH 14/56] Fixed textrel issue for AMRWB --- submodules/externals/build/opencore-amr/Android.mk | 4 ++-- submodules/externals/build/vo-amrwbenc/Android.mk | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/submodules/externals/build/opencore-amr/Android.mk b/submodules/externals/build/opencore-amr/Android.mk index 16aadfba5..461b7834f 100644 --- a/submodules/externals/build/opencore-amr/Android.mk +++ b/submodules/externals/build/opencore-amr/Android.mk @@ -34,7 +34,7 @@ LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/amrnb #in this mode we try to dynamically link against the opencore-amr provided by android -LOCAL_CFLAGS += -include ../build/opencore-amr/stubs.h +LOCAL_CFLAGS += -include ../build/opencore-amr/stubs.h -fPIC endif ifeq ($(BUILD_AMRNB),full) @@ -278,7 +278,7 @@ LOCAL_C_INCLUDES += \ endif #turn off warnings since we cannot fix them -LOCAL_CFLAGS += -w +LOCAL_CFLAGS += -w -fPIC include $(BUILD_STATIC_LIBRARY) diff --git a/submodules/externals/build/vo-amrwbenc/Android.mk b/submodules/externals/build/vo-amrwbenc/Android.mk index 1003b8708..f31de4b2c 100644 --- a/submodules/externals/build/vo-amrwbenc/Android.mk +++ b/submodules/externals/build/vo-amrwbenc/Android.mk @@ -107,7 +107,7 @@ LOCAL_C_INCLUDES += \ $(LOCAL_PATH)/common/include/ #turn off warnings since we cannot fix them -LOCAL_CFLAGS += -w +LOCAL_CFLAGS += -w -fPIC include $(BUILD_STATIC_LIBRARY) From d239221a573f4ea1a609a9bcdd2da1f13ca87f86 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Mon, 9 Nov 2015 16:59:23 +0100 Subject: [PATCH 15/56] This should fix the Android 6 issue when loading shared libs (bsed hack) --- Makefile | 5 ++--- submodules/linphone | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index a4d8f4917..948dd77cf 100644 --- a/Makefile +++ b/Makefile @@ -187,7 +187,7 @@ $(FFMPEG_BUILD_DIR)/arm/libavcodec/libavcodec-linphone-arm.so: $(FFMPEG_BUILD_DI $(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 + $(ARM_TOOLCHAIN_PATH)gcc -lm -lz --sysroot=$(ARM_SYSROOT) -Wl,-soname,libffmpeg-linphone-arm.so,--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 && \ @@ -204,7 +204,7 @@ $(FFMPEG_BUILD_DIR)/x86/libavcodec/libavcodec-linphone-x86.so: $(FFMPEG_BUILD_DI $(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 + $(X86_TOOLCHAIN_PATH)gcc -lm -lz --sysroot=$(X86_SYSROOT) -Wl,-soname,libffmpeg-linphone-x86.so,--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) @@ -457,7 +457,6 @@ 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 && \ diff --git a/submodules/linphone b/submodules/linphone index f0b9d0fff..2e56ba2aa 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit f0b9d0fffec8048c1f11ee313a08cce5efbfc1ed +Subproject commit 2e56ba2aa1ee558c0eb3d0e50e121124451a0ec0 From c8e757c3b6ffd592a65463feb869a900518d0e97 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 10 Nov 2015 11:41:12 +0100 Subject: [PATCH 16/56] Fix SILK text relocation --- submodules/mssilk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/mssilk b/submodules/mssilk index a687fa960..2af360002 160000 --- a/submodules/mssilk +++ b/submodules/mssilk @@ -1 +1 @@ -Subproject commit a687fa9608d0257273adac6d10f2a8c8a8d50589 +Subproject commit 2af360002ccf2a0e30c48aec9498b2bfd23fcd2c From a6ff219e934a27aabb7e95f6bea1a870721b8a14 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 10 Nov 2015 17:25:17 +0100 Subject: [PATCH 17/56] Updated webrtc to fix text relocation issue --- submodules/externals/build/webrtc/Android.mk | 4 ++- .../common_audio/signal_processing/Android.mk | 25 ++++++++++--------- .../modules/audio_processing/aecm/Android.mk | 11 +++++--- .../audio_processing/utility/Android.mk | 7 +++--- .../build/webrtc/system_wrappers/Android.mk | 6 ++++- submodules/externals/webrtc | 2 +- submodules/mswebrtc | 2 +- 7 files changed, 34 insertions(+), 23 deletions(-) diff --git a/submodules/externals/build/webrtc/Android.mk b/submodules/externals/build/webrtc/Android.mk index 35f5a4bf9..17a825263 100644 --- a/submodules/externals/build/webrtc/Android.mk +++ b/submodules/externals/build/webrtc/Android.mk @@ -1,7 +1,9 @@ MY_WEBRTC_COMMON_DEFS := \ -DWEBRTC_ANDROID \ -DWEBRTC_LINUX \ - -DWEBRTC_CLOCK_TYPE_REALTIME + -DWEBRTC_CLOCK_TYPE_REALTIME \ + -DWEBRTC_POSIX \ + -fPIC ifneq (,$(findstring armeabi,$(TARGET_ARCH_ABI))) MY_WEBRTC_COMMON_DEFS += -DWEBRTC_ARCH_ARM diff --git a/submodules/externals/build/webrtc/common_audio/signal_processing/Android.mk b/submodules/externals/build/webrtc/common_audio/signal_processing/Android.mk index 62a4583e3..bcac1bd43 100644 --- a/submodules/externals/build/webrtc/common_audio/signal_processing/Android.mk +++ b/submodules/externals/build/webrtc/common_audio/signal_processing/Android.mk @@ -7,7 +7,7 @@ # be found in the AUTHORS file in the root of the source tree. MY_WEBRTC_PATH := $(call my-dir)/../../ -LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/common_audio/signal_processing +LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/common_audio/signal_processing include $(CLEAR_VARS) @@ -45,7 +45,6 @@ LOCAL_SRC_FILES := \ resample_fractional.c \ spl_init.c \ spl_sqrt.c \ - spl_version.c \ splitting_filter.c \ sqrt_of_one_minus_x_squared.c \ vector_scaling_operations.c @@ -56,19 +55,20 @@ LOCAL_CFLAGS := \ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/include \ - $(LOCAL_PATH)/../.. + $(LOCAL_PATH)/../.. \ + $(LOCAL_PATH)/../../.. ifeq ($(ARCH_ARM_HAVE_ARMV7A),true) LOCAL_SRC_FILES += \ - filter_ar_fast_q12_armv7.s + filter_ar_fast_q12_armv7.S else LOCAL_SRC_FILES += \ filter_ar_fast_q12.c endif ifeq ($(TARGET_ARCH),arm) LOCAL_SRC_FILES += \ - complex_bit_reverse_arm.s \ - spl_sqrt_floor_arm.s + complex_bit_reverse_arm.S \ + spl_sqrt_floor_arm.S else LOCAL_SRC_FILES += \ complex_bit_reverse.c \ @@ -103,19 +103,20 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES LOCAL_MODULE := libwebrtc_spl_neon LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := \ - cross_correlation_neon.s \ - downsample_fast_neon.s \ - min_max_operations_neon.s \ - vector_scaling_operations_neon.s + cross_correlation_neon.c \ + downsample_fast_neon.c \ + min_max_operations_neon.c # Flags passed to both C and C++ files. LOCAL_CFLAGS := \ $(MY_WEBRTC_COMMON_DEFS) \ - $(MY_ARM_CFLAGS_NEON) + $(MY_ARM_CFLAGS_NEON) \ + -mfloat-abi=softfp -mfpu=neon LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/include \ - $(LOCAL_PATH)/../.. + $(LOCAL_PATH)/../.. \ + $(LOCAL_PATH)/../../.. ifndef NDK_ROOT include external/stlport/libstlport.mk diff --git a/submodules/externals/build/webrtc/modules/audio_processing/aecm/Android.mk b/submodules/externals/build/webrtc/modules/audio_processing/aecm/Android.mk index 9ef3de3bd..7730650a3 100644 --- a/submodules/externals/build/webrtc/modules/audio_processing/aecm/Android.mk +++ b/submodules/externals/build/webrtc/modules/audio_processing/aecm/Android.mk @@ -2,7 +2,7 @@ # Build the non-neon library. MY_WEBRTC_PATH := $(call my-dir)/../../../ -LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/modules/audio_processing/aecm +LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/modules/audio_processing/aecm include $(CLEAR_VARS) @@ -14,7 +14,8 @@ LOCAL_MODULE := libwebrtc_aecm LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := \ echo_control_mobile.c \ - aecm_core.c + aecm_core.c \ + aecm_core_c.c # Flags passed to both C and C++ files. LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS) @@ -25,6 +26,7 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/../../.. \ $(LOCAL_PATH)/../../../common_audio/signal_processing/include \ $(LOCAL_PATH)/../../../system_wrappers/interface \ + $(LOCAL_PATH)/../../../.. \ LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers @@ -62,7 +64,7 @@ LOCAL_MODULE_TAGS := optional # #$(LOCAL_PATH)/aecm_core_neon.S: $(LOCAL_PATH)/aecm_core_neon_offsets.h -LOCAL_SRC_FILES := aecm_core_neon.S +LOCAL_SRC_FILES := aecm_core_neon.c # Flags passed to both C and C++ files. LOCAL_CFLAGS := \ @@ -75,7 +77,8 @@ LOCAL_C_INCLUDES := \ $(LOCAL_PATH)/include \ $(LOCAL_PATH)/../../.. \ $(LOCAL_PATH)/../../../common_audio/signal_processing/include \ - $(MY_WEBRTC_PATH)/modules/audio_processing/aecm + $(MY_WEBRTC_PATH)/modules/audio_processing/aecm \ + $(LOCAL_PATH)/../../../.. \ LOCAL_INCLUDES := $(LOCAL_C_INCLUDES) diff --git a/submodules/externals/build/webrtc/modules/audio_processing/utility/Android.mk b/submodules/externals/build/webrtc/modules/audio_processing/utility/Android.mk index 8f8bb6b8c..50d32a1f2 100644 --- a/submodules/externals/build/webrtc/modules/audio_processing/utility/Android.mk +++ b/submodules/externals/build/webrtc/modules/audio_processing/utility/Android.mk @@ -7,7 +7,7 @@ # be found in the AUTHORS file in the root of the source tree. MY_WEBRTC_PATH := $(call my-dir)/../../../ -LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/modules/audio_processing/utility +LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/modules/audio_processing/utility include $(CLEAR_VARS) @@ -18,7 +18,7 @@ LOCAL_MODULE_CLASS := STATIC_LIBRARIES LOCAL_MODULE := libwebrtc_apm_utility LOCAL_MODULE_TAGS := optional LOCAL_SRC_FILES := \ - ring_buffer.c \ + ../../../common_audio/ring_buffer.c \ delay_estimator.c \ delay_estimator_wrapper.c @@ -30,7 +30,8 @@ LOCAL_CFLAGS := \ LOCAL_C_INCLUDES := \ $(LOCAL_PATH) \ $(LOCAL_PATH)/../../.. \ - $(LOCAL_PATH)/../../../common_audio/signal_processing/include + $(LOCAL_PATH)/../../../common_audio/signal_processing/include \ + $(LOCAL_PATH)/../../../.. \ LOCAL_SHARED_LIBRARIES := \ libcutils \ diff --git a/submodules/externals/build/webrtc/system_wrappers/Android.mk b/submodules/externals/build/webrtc/system_wrappers/Android.mk index fce5e9cdd..147d9b676 100644 --- a/submodules/externals/build/webrtc/system_wrappers/Android.mk +++ b/submodules/externals/build/webrtc/system_wrappers/Android.mk @@ -7,7 +7,7 @@ # be found in the AUTHORS file in the root of the source tree. MY_WEBRTC_PATH := $(call my-dir)/../ -LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/system_wrappers/source +LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/system_wrappers/source include $(CLEAR_VARS) @@ -32,8 +32,12 @@ LOCAL_SHARED_LIBRARIES := \ libcutils \ libdl \ libstlport + +LOCAL_STATIC_LIBRARIES := cpufeatures ifndef NDK_ROOT include external/stlport/libstlport.mk endif + include $(BUILD_STATIC_LIBRARY) +$(call import-module,android/cpufeatures) diff --git a/submodules/externals/webrtc b/submodules/externals/webrtc index 2117f353f..a34bb2a78 160000 --- a/submodules/externals/webrtc +++ b/submodules/externals/webrtc @@ -1 +1 @@ -Subproject commit 2117f353f82da43f648b10dc6bd99f55e0d44c3f +Subproject commit a34bb2a78c713e5b9e2224bf7f793d140b0ca608 diff --git a/submodules/mswebrtc b/submodules/mswebrtc index 5a55409dd..5175b37e3 160000 --- a/submodules/mswebrtc +++ b/submodules/mswebrtc @@ -1 +1 @@ -Subproject commit 5a55409ddce8bc35163662231dae475488dfce75 +Subproject commit 5175b37e3e21ed7dfe1aa32f74fd37f53ecba930 From b171bdf04dd685bff8e751abb87c1b12d8051ea3 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 10 Nov 2015 17:27:04 +0100 Subject: [PATCH 18/56] Targetting Android 6 in Manifest, disabled AMRWB for now because of text relocation issue, and ISAC because not done yet since webrtc update [--force] --- AndroidManifest.xml | 2 +- Makefile | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 755751d8d..05b1c2001 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -2,7 +2,7 @@ - + diff --git a/Makefile b/Makefile index 948dd77cf..0c9b39590 100644 --- a/Makefile +++ b/Makefile @@ -43,14 +43,14 @@ BUILD_NON_FREE_CODECS=1 ENABLE_OPENH264_DECODER=1 BUILD_UPNP=1 BUILD_AMRNB=full # 0, light or full -BUILD_AMRWB=1 +BUILD_AMRWB=0 # Has text relocation issue, don't use when targetting API 23 for now BUILD_ZRTP=1 BUILD_SILK=1 BUILD_TUNNEL=0 BUILD_WEBRTC_AECM=1 BUILD_OPUS=1 BUILD_MATROSKA=1 -BUILD_WEBRTC_ISAC=1 +BUILD_WEBRTC_ISAC=0 BUILD_FOR_X86=1 BUILD_FOR_ARM=1 USE_JAVAH=1 @@ -366,9 +366,6 @@ clean-vpx: rm -rf submodules/externals/build/libvpx/arm && \ rm -rf submodules/externals/build/libvpx/x86 - - - #srtp $(TOPDIR)/submodules/externals/srtp/config.h : $(TOPDIR)/submodules/externals/build/srtp/config.h @cd $(TOPDIR)/submodules/externals/srtp/ && \ From 6dff3bd26ea11113b8f47504e51f3ffba0bbc9ad Mon Sep 17 00:00:00 2001 From: Simon Morlat Date: Wed, 11 Nov 2015 19:46:36 +0100 Subject: [PATCH 19/56] fix webrtc revision [Switch submodule branch] --- submodules/externals/webrtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/externals/webrtc b/submodules/externals/webrtc index a34bb2a78..3354b1c97 160000 --- a/submodules/externals/webrtc +++ b/submodules/externals/webrtc @@ -1 +1 @@ -Subproject commit a34bb2a78c713e5b9e2224bf7f793d140b0ca608 +Subproject commit 3354b1c97cc143a3579f1a9e0b47dd16ab786162 From 2411a40389efb096fb8d5db9cb6e92cbcea97be5 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 12 Nov 2015 10:05:53 +0100 Subject: [PATCH 20/56] Removed webrtc from submodules/externals to use the one in submodules/mswebrtc --- .gitmodules | 3 - jni/Android.mk | 10 +- submodules/externals/build/webrtc/Android.mk | 18 --- .../common_audio/signal_processing/Android.mk | 126 --------------- .../codecs/isac/fix/source/Android.mk | 151 ------------------ .../modules/audio_processing/aecm/Android.mk | 90 ----------- .../aecm/aecm_core_neon_offsets.h | 8 - .../audio_processing/utility/Android.mk | 44 ----- .../build/webrtc/system_wrappers/Android.mk | 43 ----- submodules/externals/webrtc | 1 - submodules/mswebrtc | 2 +- 11 files changed, 6 insertions(+), 490 deletions(-) delete mode 100644 submodules/externals/build/webrtc/Android.mk delete mode 100644 submodules/externals/build/webrtc/common_audio/signal_processing/Android.mk delete mode 100644 submodules/externals/build/webrtc/modules/audio_coding/codecs/isac/fix/source/Android.mk delete mode 100644 submodules/externals/build/webrtc/modules/audio_processing/aecm/Android.mk delete mode 100644 submodules/externals/build/webrtc/modules/audio_processing/aecm/aecm_core_neon_offsets.h delete mode 100644 submodules/externals/build/webrtc/modules/audio_processing/utility/Android.mk delete mode 100644 submodules/externals/build/webrtc/system_wrappers/Android.mk delete mode 160000 submodules/externals/webrtc diff --git a/.gitmodules b/.gitmodules index 03f8848b5..48b177bb8 100644 --- a/.gitmodules +++ b/.gitmodules @@ -88,9 +88,6 @@ 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 [submodule "submodules/mscodec2"] path = submodules/mscodec2 url = git://git.linphone.org/mscodec2.git diff --git a/jni/Android.mk b/jni/Android.mk index 4a2928c3e..fbb7fb5a0 100755 --- a/jni/Android.mk +++ b/jni/Android.mk @@ -166,9 +166,9 @@ 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/modules/audio_processing/utility/Android.mk -include $(linphone-root-dir)/submodules/externals/build/webrtc/modules/audio_processing/aecm/Android.mk +include $(linphone-root-dir)/submodules/mswebrtc/build/android/system_wrappers/Android.mk +include $(linphone-root-dir)/submodules/mswebrtc/build/android/modules/audio_processing/utility/Android.mk +include $(linphone-root-dir)/submodules/mswebrtc/build/android/modules/audio_processing/aecm/Android.mk endif # iSAC @@ -180,12 +180,12 @@ 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 +include $(linphone-root-dir)/submodules/mswebrtc/build/android/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/build/android/common_audio/signal_processing/Android.mk include $(linphone-root-dir)/submodules/mswebrtc/Android.mk endif diff --git a/submodules/externals/build/webrtc/Android.mk b/submodules/externals/build/webrtc/Android.mk deleted file mode 100644 index 17a825263..000000000 --- a/submodules/externals/build/webrtc/Android.mk +++ /dev/null @@ -1,18 +0,0 @@ -MY_WEBRTC_COMMON_DEFS := \ - -DWEBRTC_ANDROID \ - -DWEBRTC_LINUX \ - -DWEBRTC_CLOCK_TYPE_REALTIME \ - -DWEBRTC_POSIX \ - -fPIC - -ifneq (,$(findstring armeabi,$(TARGET_ARCH_ABI))) -MY_WEBRTC_COMMON_DEFS += -DWEBRTC_ARCH_ARM -endif - -ifeq ($(TARGET_ARCH_ABI), armeabi-v7a) -MY_WEBRTC_COMMON_DEFS += -DWEBRTC_DETECT_ARM_NEON -endif - -#turn off warnings since we cannot fix them -MY_WEBRTC_COMMON_DEFS += -w - diff --git a/submodules/externals/build/webrtc/common_audio/signal_processing/Android.mk b/submodules/externals/build/webrtc/common_audio/signal_processing/Android.mk deleted file mode 100644 index bcac1bd43..000000000 --- a/submodules/externals/build/webrtc/common_audio/signal_processing/Android.mk +++ /dev/null @@ -1,126 +0,0 @@ -# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -MY_WEBRTC_PATH := $(call my-dir)/../../ -LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/common_audio/signal_processing - -include $(CLEAR_VARS) - -include $(MY_WEBRTC_PATH)/Android.mk - -LOCAL_ARM_MODE := arm -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := libwebrtc_spl -LOCAL_MODULE_TAGS := optional -LOCAL_SRC_FILES := \ - auto_corr_to_refl_coef.c \ - auto_correlation.c \ - complex_fft.c \ - copy_set_operations.c \ - cross_correlation.c \ - division_operations.c \ - dot_product_with_scale.c \ - downsample_fast.c \ - energy.c \ - filter_ar.c \ - filter_ma_fast_q12.c \ - get_hanning_window.c \ - get_scaling_square.c \ - ilbc_specific_functions.c \ - levinson_durbin.c \ - lpc_to_refl_coef.c \ - min_max_operations.c \ - randomization_functions.c \ - real_fft.c \ - refl_coef_to_lpc.c \ - resample.c \ - resample_48khz.c \ - resample_by_2.c \ - resample_by_2_internal.c \ - resample_fractional.c \ - spl_init.c \ - spl_sqrt.c \ - splitting_filter.c \ - sqrt_of_one_minus_x_squared.c \ - vector_scaling_operations.c - -# Flags passed to both C and C++ files. -LOCAL_CFLAGS := \ - $(MY_WEBRTC_COMMON_DEFS) - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/include \ - $(LOCAL_PATH)/../.. \ - $(LOCAL_PATH)/../../.. - -ifeq ($(ARCH_ARM_HAVE_ARMV7A),true) -LOCAL_SRC_FILES += \ - filter_ar_fast_q12_armv7.S -else -LOCAL_SRC_FILES += \ - filter_ar_fast_q12.c -endif -ifeq ($(TARGET_ARCH),arm) -LOCAL_SRC_FILES += \ - complex_bit_reverse_arm.S \ - spl_sqrt_floor_arm.S -else -LOCAL_SRC_FILES += \ - complex_bit_reverse.c \ - spl_sqrt_floor.c -endif - -LOCAL_SHARED_LIBRARIES := libstlport - -ifeq ($(TARGET_OS)-$(TARGET_SIMULATOR),linux-true) -LOCAL_LDLIBS += -ldl -lpthread -endif - -ifneq ($(TARGET_SIMULATOR),true) -LOCAL_SHARED_LIBRARIES += libdl -endif - -ifndef NDK_ROOT -include external/stlport/libstlport.mk -endif -include $(BUILD_STATIC_LIBRARY) - -######################### -# Build the neon library. -ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) - -include $(CLEAR_VARS) - -include $(MY_WEBRTC_PATH)/Android.mk - -LOCAL_ARM_MODE := arm -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := libwebrtc_spl_neon -LOCAL_MODULE_TAGS := optional -LOCAL_SRC_FILES := \ - cross_correlation_neon.c \ - downsample_fast_neon.c \ - min_max_operations_neon.c - -# Flags passed to both C and C++ files. -LOCAL_CFLAGS := \ - $(MY_WEBRTC_COMMON_DEFS) \ - $(MY_ARM_CFLAGS_NEON) \ - -mfloat-abi=softfp -mfpu=neon - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/include \ - $(LOCAL_PATH)/../.. \ - $(LOCAL_PATH)/../../.. - -ifndef NDK_ROOT -include external/stlport/libstlport.mk -endif -include $(BUILD_STATIC_LIBRARY) - -endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) diff --git a/submodules/externals/build/webrtc/modules/audio_coding/codecs/isac/fix/source/Android.mk b/submodules/externals/build/webrtc/modules/audio_coding/codecs/isac/fix/source/Android.mk deleted file mode 100644 index e4d20f758..000000000 --- a/submodules/externals/build/webrtc/modules/audio_coding/codecs/isac/fix/source/Android.mk +++ /dev/null @@ -1,151 +0,0 @@ -# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -############################# -# Build the non-neon library. - -MY_WEBRTC_PATH := $(call my-dir)/../../../../../../ -LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/modules/audio_coding/codecs/isac/fix/source - -include $(CLEAR_VARS) - -include $(MY_WEBRTC_PATH)/Android.mk - -LOCAL_ARM_MODE := arm -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := libwebrtc_isacfix -LOCAL_MODULE_TAGS := optional -LOCAL_SRC_FILES := \ - arith_routines.c \ - arith_routines_hist.c \ - arith_routines_logist.c \ - bandwidth_estimator.c \ - decode.c \ - decode_bwe.c \ - decode_plc.c \ - encode.c \ - entropy_coding.c \ - fft.c \ - filterbank_tables.c \ - filterbanks.c \ - filters.c \ - initialize.c \ - isacfix.c \ - lattice.c \ - lpc_masking_model.c \ - lpc_tables.c \ - pitch_estimator.c \ - pitch_filter.c \ - pitch_gain_tables.c \ - pitch_lag_tables.c \ - spectrum_ar_model_tables.c \ - transform.c - -ifeq ($(ARCH_ARM_HAVE_ARMV7A),true) -# Using .S (instead of .s) extention is to include a C header file in assembly. -LOCAL_SRC_FILES += \ - lattice_armv7.S \ - pitch_filter_armv6.S -else -LOCAL_SRC_FILES += \ - lattice_c.c \ - pitch_filter_c.c -endif - -# Flags passed to both C and C++ files. -LOCAL_CFLAGS := \ - $(MY_WEBRTC_COMMON_DEFS) - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/../interface \ - $(LOCAL_PATH)/../../../../../.. \ - $(MY_WEBRTC_PATH)/../../webrtc/common_audio/signal_processing/include - -LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libdl \ - libstlport - -ifndef NDK_ROOT -include external/stlport/libstlport.mk -endif -include $(BUILD_STATIC_LIBRARY) - -######################### -# Build the neon library. -ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) - -include $(CLEAR_VARS) - -LOCAL_ARM_MODE := arm -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := libwebrtc_isacfix_neon -LOCAL_MODULE_TAGS := optional -LOCAL_SRC_FILES := \ - filters_neon.c \ - lattice_neon.S \ - lpc_masking_model_neon.S - -# Flags passed to both C and C++ files. -LOCAL_CFLAGS := \ - $(MY_WEBRTC_COMMON_DEFS) \ - -mfpu=neon \ - -mfloat-abi=softfp \ - -flax-vector-conversions - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/../interface \ - $(LOCAL_PATH)/../../../../../.. \ - $(MY_WEBRTC_PATH)/../../webrtc/common_audio/signal_processing/include - - -ifndef NDK_ROOT -include external/stlport/libstlport.mk -endif -include $(BUILD_STATIC_LIBRARY) - -endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) - -########################### -# isac test app - -include $(CLEAR_VARS) - -LOCAL_MODULE_TAGS := tests -LOCAL_CPP_EXTENSION := .cc -LOCAL_SRC_FILES:= ../test/kenny.c - -# Flags passed to both C and C++ files. -LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS) - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/../interface \ - $(LOCAL_PATH)/../../../../../.. - -LOCAL_STATIC_LIBRARIES := \ - libwebrtc_isacfix \ - libwebrtc_spl \ - libwebrtc_system_wrappers - -ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) -LOCAL_STATIC_LIBRARIES += \ - libwebrtc_isacfix_neon -endif - -LOCAL_SHARED_LIBRARIES := \ - libutils - -LOCAL_MODULE:= webrtc_isac_test - -ifdef NDK_ROOT -include $(BUILD_EXECUTABLE) -else -include $(BUILD_NATIVE_TEST) -endif diff --git a/submodules/externals/build/webrtc/modules/audio_processing/aecm/Android.mk b/submodules/externals/build/webrtc/modules/audio_processing/aecm/Android.mk deleted file mode 100644 index 7730650a3..000000000 --- a/submodules/externals/build/webrtc/modules/audio_processing/aecm/Android.mk +++ /dev/null @@ -1,90 +0,0 @@ -############################# -# Build the non-neon library. - -MY_WEBRTC_PATH := $(call my-dir)/../../../ -LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/modules/audio_processing/aecm - -include $(CLEAR_VARS) - -include $(MY_WEBRTC_PATH)/Android.mk - -LOCAL_ARM_MODE := arm -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := libwebrtc_aecm -LOCAL_MODULE_TAGS := optional -LOCAL_SRC_FILES := \ - echo_control_mobile.c \ - aecm_core.c \ - aecm_core_c.c - -# Flags passed to both C and C++ files. -LOCAL_CFLAGS := $(MY_WEBRTC_COMMON_DEFS) - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/include \ - $(LOCAL_PATH)/../utility \ - $(LOCAL_PATH)/../../.. \ - $(LOCAL_PATH)/../../../common_audio/signal_processing/include \ - $(LOCAL_PATH)/../../../system_wrappers/interface \ - $(LOCAL_PATH)/../../../.. \ - -LOCAL_STATIC_LIBRARIES += libwebrtc_system_wrappers - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libdl \ - libstlport - -ifndef NDK_ROOT -include external/stlport/libstlport.mk -endif -include $(BUILD_STATIC_LIBRARY) - -######################### -# Build the neon library. -ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) - -include $(CLEAR_VARS) - -include $(MY_WEBRTC_PATH)/Android.mk - -LOCAL_ARM_MODE := arm -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := libwebrtc_aecm_neon -LOCAL_MODULE_TAGS := optional - -# Generate a header file aecm_core_neon_offsets.h which will be included in -# assembly file aecm_core_neon.S, from file aecm_core_neon_offsets.c. -#$(LOCAL_PATH)/aecm_core_neon_offsets.h: $(LOCAL_PATH)/aecm_core_neon_offsets.S -# python $(LOCAL_PATH)/../../../build/generate_asm_header.py $^ $@ offset_aecm_ -# -#$(LOCAL_PATH)/aecm_core_neon_offsets.S: $(LOCAL_PATH)/aecm_core_neon_offsets.c -# $(TARGET_CC) $(addprefix -I, $(LOCAL_INCLUDES)) $(addprefix -isystem ,\ -# $(TARGET_C_INCLUDES)) -S -o $@ $^ -# -#$(LOCAL_PATH)/aecm_core_neon.S: $(LOCAL_PATH)/aecm_core_neon_offsets.h - -LOCAL_SRC_FILES := aecm_core_neon.c - -# Flags passed to both C and C++ files. -LOCAL_CFLAGS := \ - $(MY_WEBRTC_COMMON_DEFS) \ - -mfpu=neon \ - -mfloat-abi=softfp \ - -flax-vector-conversions - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/include \ - $(LOCAL_PATH)/../../.. \ - $(LOCAL_PATH)/../../../common_audio/signal_processing/include \ - $(MY_WEBRTC_PATH)/modules/audio_processing/aecm \ - $(LOCAL_PATH)/../../../.. \ - -LOCAL_INCLUDES := $(LOCAL_C_INCLUDES) - -ifndef NDK_ROOT -include external/stlport/libstlport.mk -endif -include $(BUILD_STATIC_LIBRARY) - -endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true) diff --git a/submodules/externals/build/webrtc/modules/audio_processing/aecm/aecm_core_neon_offsets.h b/submodules/externals/build/webrtc/modules/audio_processing/aecm/aecm_core_neon_offsets.h deleted file mode 100644 index 7f24270ec..000000000 --- a/submodules/externals/build/webrtc/modules/audio_processing/aecm/aecm_core_neon_offsets.h +++ /dev/null @@ -1,8 +0,0 @@ -#define offset_aecm_dfaCleanQDomain 13976 -#define offset_aecm_outBuf 15988 -#define offset_aecm_xBuf 15976 -#define offset_aecm_dBufNoisy 15984 -#define offset_aecm_dBufClean 15980 -#define offset_aecm_channelStored 15964 -#define offset_aecm_channelAdapt16 15968 -#define offset_aecm_channelAdapt32 15972 diff --git a/submodules/externals/build/webrtc/modules/audio_processing/utility/Android.mk b/submodules/externals/build/webrtc/modules/audio_processing/utility/Android.mk deleted file mode 100644 index 50d32a1f2..000000000 --- a/submodules/externals/build/webrtc/modules/audio_processing/utility/Android.mk +++ /dev/null @@ -1,44 +0,0 @@ -# Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -MY_WEBRTC_PATH := $(call my-dir)/../../../ -LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/modules/audio_processing/utility - -include $(CLEAR_VARS) - -include $(MY_WEBRTC_PATH)/Android.mk - -LOCAL_ARM_MODE := arm -LOCAL_MODULE_CLASS := STATIC_LIBRARIES -LOCAL_MODULE := libwebrtc_apm_utility -LOCAL_MODULE_TAGS := optional -LOCAL_SRC_FILES := \ - ../../../common_audio/ring_buffer.c \ - delay_estimator.c \ - delay_estimator_wrapper.c - -# Flags passed to both C and C++ files. -LOCAL_CFLAGS := \ - $(MY_WEBRTC_COMMON_DEFS) - -# Include paths placed before CFLAGS/CPPFLAGS -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH) \ - $(LOCAL_PATH)/../../.. \ - $(LOCAL_PATH)/../../../common_audio/signal_processing/include \ - $(LOCAL_PATH)/../../../.. \ - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libdl \ - libstlport - -ifndef NDK_ROOT -include external/stlport/libstlport.mk -endif -include $(BUILD_STATIC_LIBRARY) diff --git a/submodules/externals/build/webrtc/system_wrappers/Android.mk b/submodules/externals/build/webrtc/system_wrappers/Android.mk deleted file mode 100644 index 147d9b676..000000000 --- a/submodules/externals/build/webrtc/system_wrappers/Android.mk +++ /dev/null @@ -1,43 +0,0 @@ -# Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. -# -# Use of this source code is governed by a BSD-style license -# that can be found in the LICENSE file in the root of the source -# tree. An additional intellectual property rights grant can be found -# in the file PATENTS. All contributing project authors may -# be found in the AUTHORS file in the root of the source tree. - -MY_WEBRTC_PATH := $(call my-dir)/../ -LOCAL_PATH := $(MY_WEBRTC_PATH)/../../webrtc/webrtc/system_wrappers/source - -include $(CLEAR_VARS) - -include $(MY_WEBRTC_PATH)/Android.mk - -LOCAL_ARM_MODE := arm -LOCAL_MODULE := libwebrtc_system_wrappers -LOCAL_MODULE_TAGS := optional -LOCAL_CPP_EXTENSION := .cc -LOCAL_SRC_FILES := \ - cpu_features_android.c - -LOCAL_CFLAGS := \ - $(MY_WEBRTC_COMMON_DEFS) - -LOCAL_C_INCLUDES := \ - $(LOCAL_PATH)/../.. \ - $(LOCAL_PATH)/../interface \ - $(LOCAL_PATH)/spreadsortlib - -LOCAL_SHARED_LIBRARIES := \ - libcutils \ - libdl \ - libstlport - -LOCAL_STATIC_LIBRARIES := cpufeatures - -ifndef NDK_ROOT -include external/stlport/libstlport.mk -endif - -include $(BUILD_STATIC_LIBRARY) -$(call import-module,android/cpufeatures) diff --git a/submodules/externals/webrtc b/submodules/externals/webrtc deleted file mode 160000 index 3354b1c97..000000000 --- a/submodules/externals/webrtc +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 3354b1c97cc143a3579f1a9e0b47dd16ab786162 diff --git a/submodules/mswebrtc b/submodules/mswebrtc index 5175b37e3..b7456184f 160000 --- a/submodules/mswebrtc +++ b/submodules/mswebrtc @@ -1 +1 @@ -Subproject commit 5175b37e3e21ed7dfe1aa32f74fd37f53ecba930 +Subproject commit b7456184f3396134b735d0ae26889e4aa73d9f02 From 60f2dae6ae18f81206a058758547170f4bbf3047 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Thu, 12 Nov 2015 15:01:23 +0100 Subject: [PATCH 21/56] ISAC is back --- Makefile | 2 +- submodules/mswebrtc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 0c9b39590..275325f34 100644 --- a/Makefile +++ b/Makefile @@ -50,7 +50,7 @@ BUILD_TUNNEL=0 BUILD_WEBRTC_AECM=1 BUILD_OPUS=1 BUILD_MATROSKA=1 -BUILD_WEBRTC_ISAC=0 +BUILD_WEBRTC_ISAC=1 BUILD_FOR_X86=1 BUILD_FOR_ARM=1 USE_JAVAH=1 diff --git a/submodules/mswebrtc b/submodules/mswebrtc index b7456184f..02cd3c00a 160000 --- a/submodules/mswebrtc +++ b/submodules/mswebrtc @@ -1 +1 @@ -Subproject commit b7456184f3396134b735d0ae26889e4aa73d9f02 +Subproject commit 02cd3c00a3c1918ab28af597efd4132c98f44ded From 756a18343693a2b1036210221911050a35a5a116 Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Tue, 17 Nov 2015 10:15:06 +0100 Subject: [PATCH 22/56] Add topbar in settings and about menu add option for portrait orientation only --- .gitmodules | 2 +- AndroidManifest.xml | 4 +- res/layout/about.xml | 26 ----- res/layout/main.xml | 31 ++++- res/raw/linphonerc_factory | 3 - res/values/non_localizable_custom.xml | 3 + res/values/strings.xml | 3 + src/org/linphone/AboutFragment.java | 8 +- src/org/linphone/ChatListFragment.java | 2 +- src/org/linphone/FragmentsAvailable.java | 10 +- src/org/linphone/HistoryDetailFragment.java | 6 +- src/org/linphone/LinphoneActivity.java | 120 +++++++++----------- 12 files changed, 100 insertions(+), 118 deletions(-) diff --git a/.gitmodules b/.gitmodules index 48b177bb8..ef13a0bdc 100644 --- a/.gitmodules +++ b/.gitmodules @@ -90,4 +90,4 @@ ignore = dirty [submodule "submodules/mscodec2"] path = submodules/mscodec2 - url = git://git.linphone.org/mscodec2.git + url = git://git.linphone.org/mscodec2.git \ No newline at end of file diff --git a/AndroidManifest.xml b/AndroidManifest.xml index 813418a1b..db7a26a37 100644 --- a/AndroidManifest.xml +++ b/AndroidManifest.xml @@ -2,8 +2,8 @@ - + android:versionCode="2599" android:installLocation="auto"> + diff --git a/res/layout/about.xml b/res/layout/about.xml index 1006819ba..5f16136e0 100644 --- a/res/layout/about.xml +++ b/res/layout/about.xml @@ -5,32 +5,6 @@ android:layout_height="match_parent" android:orientation="vertical"> - - - - - - - - + + + + + + + + + android:layout_above="@id/footer" + android:layout_below="@id/top_bar"> sip.linphone.org stun.linphone.org false + false + false + https://www.linphone.org/wizard.php diff --git a/res/values/strings.xml b/res/values/strings.xml index 137e71354..541bb6dd7 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -20,6 +20,9 @@ Deny No account configured Search + outgoing + incoming + missed free SIP VOIP client diff --git a/src/org/linphone/AboutFragment.java b/src/org/linphone/AboutFragment.java index 1dde66f4c..f90607056 100644 --- a/src/org/linphone/AboutFragment.java +++ b/src/org/linphone/AboutFragment.java @@ -37,7 +37,6 @@ import android.widget.TextView; public class AboutFragment extends Fragment implements OnClickListener { View sendLogButton = null; View resetLogButton = null; - private ImageView cancel; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { @@ -50,9 +49,6 @@ public class AboutFragment extends Fragment implements OnClickListener { Log.e(e, "cannot get version name"); } - cancel = (ImageView) view.findViewById(R.id.cancel); - cancel.setOnClickListener(this); - sendLogButton = view.findViewById(R.id.send_log); sendLogButton.setOnClickListener(this); sendLogButton.setVisibility(org.linphone.LinphonePreferences.instance().isDebugEnabled() ? View.VISIBLE : View.GONE); @@ -70,9 +66,9 @@ public class AboutFragment extends Fragment implements OnClickListener { if (org.linphone.LinphoneActivity.isInstanciated()) { LinphoneActivity.instance().hideTabBar(true); + LinphoneActivity.instance().displayTopBar(true,"About"); } } - @Override public void onClick(View v) { @@ -86,8 +82,6 @@ public class AboutFragment extends Fragment implements OnClickListener { if (lc != null) { lc.resetLogCollection(); } - } else if (v == cancel) { - getFragmentManager().popBackStackImmediate(); } } } diff --git a/src/org/linphone/ChatListFragment.java b/src/org/linphone/ChatListFragment.java index 0efec2d03..6c542400b 100644 --- a/src/org/linphone/ChatListFragment.java +++ b/src/org/linphone/ChatListFragment.java @@ -240,7 +240,7 @@ public class ChatListFragment extends Fragment implements OnClickListener, OnIte } if (LinphoneActivity.isInstanciated()) { - LinphoneActivity.instance().selectMenu(FragmentsAvailable.CHATLIST); + LinphoneActivity.instance().selectMenu(FragmentsAvailable.CHAT_LIST); LinphoneActivity.instance().updateChatListFragment(this); LinphoneActivity.instance().hideTabBar(false); } diff --git a/src/org/linphone/FragmentsAvailable.java b/src/org/linphone/FragmentsAvailable.java index cbfdf26e4..75d3ef223 100644 --- a/src/org/linphone/FragmentsAvailable.java +++ b/src/org/linphone/FragmentsAvailable.java @@ -31,7 +31,7 @@ public enum FragmentsAvailable { ABOUT, ACCOUNT_SETTINGS, SETTINGS, - CHATLIST, + CHAT_LIST, CHAT; public boolean shouldAnimate() { @@ -58,18 +58,18 @@ public enum FragmentsAvailable { case DIALER: return CONTACT_EDITOR.isRightOf(fragment) || fragment == CONTACT_EDITOR; - case CHATLIST: + case CHAT_LIST: return DIALER.isRightOf(fragment) || fragment == DIALER; case SETTINGS: - return CHATLIST.isRightOf(fragment) || fragment == CHATLIST; + return CHAT_LIST.isRightOf(fragment) || fragment == CHAT_LIST; case ABOUT: case ACCOUNT_SETTINGS: return SETTINGS.isRightOf(fragment) || fragment == SETTINGS; case CHAT: - return CHATLIST.isRightOf(fragment) || fragment == CHATLIST; + return CHAT_LIST.isRightOf(fragment) || fragment == CHAT_LIST; default: return false; @@ -88,7 +88,7 @@ public enum FragmentsAvailable { return fragment == CONTACT_DETAIL || fragment == CONTACTS_LIST; case CHAT: - return fragment == CHATLIST; + return fragment == CHAT_LIST; default: return false; diff --git a/src/org/linphone/HistoryDetailFragment.java b/src/org/linphone/HistoryDetailFragment.java index de8c3ef76..99d4015db 100644 --- a/src/org/linphone/HistoryDetailFragment.java +++ b/src/org/linphone/HistoryDetailFragment.java @@ -98,11 +98,11 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener { contactAddress.setText(sipUri); } - if (status.equals("Missed")) { + if (status.equals(getResources().getString(R.string.missed))) { callDirection.setImageResource(R.drawable.call_missed); - } else if (status.equals("Incoming")) { + } else if (status.equals(getResources().getString(R.string.incoming))) { callDirection.setImageResource(R.drawable.call_incoming); - } else if (status.equals("Outgoing")) { + } else if (status.equals(getResources().getString(R.string.outgoing))) { callDirection.setImageResource(R.drawable.call_outgoing); } diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index 1bb86a746..5df9d1235 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -57,7 +57,6 @@ import android.app.FragmentTransaction; import android.content.Context; import android.content.Intent; import android.content.pm.ActivityInfo; -import android.content.res.Configuration; import android.graphics.Bitmap; import android.graphics.drawable.ColorDrawable; import android.graphics.drawable.Drawable; @@ -101,9 +100,11 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta private TextView missedCalls, missedChats; private RelativeLayout contacts, history, dialer, chat; private RelativeLayout contacts_selected, history_selected, dialer_selected, chat_selected; + private RelativeLayout mTopBar; + private ImageView cancel; private FragmentsAvailable currentFragment, nextFragment; private List fragmentsHistory; - private Fragment dialerFragment, messageListFragment, friendStatusListenerFragment; + private Fragment dialerFragment, messageListFragment; private ChatFragment chatFragment; private Fragment.SavedState dialerSavedState; private boolean newProxyConfig; @@ -118,7 +119,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta private ListView accountsList, sideMenuItemList; private ImageView menu; - static final boolean isInstanciated() { return instance != null; } @@ -135,13 +135,12 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta if (isTablet() && getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } else if (!isTablet() && getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_PORTRAIT) { - //setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + } else if (!isTablet() && getResources().getBoolean(R.bool.orientation_portrait_only)) { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } if (!LinphoneManager.isInstanciated()) { Log.e("No service running: avoid crash by starting the launch", this.getClass().getName()); - // super.onCreate called earlier finish(); startActivity(getIntent().setClass(this, LinphoneLauncherActivity.class)); return; @@ -161,6 +160,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } } + //TODO rework if (getResources().getBoolean(R.bool.use_linphone_tag)) { ContactsManager.getInstance().initializeSyncAccount(getApplicationContext(), getContentResolver()); } else { @@ -172,7 +172,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta fragmentsHistory = new ArrayList(); initButtons(); - createSideMenu(); + initSideMenu(); currentFragment = nextFragment = FragmentsAvailable.DIALER; fragmentsHistory.add(currentFragment); @@ -226,7 +226,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta @Override public void callState(LinphoneCore lc, LinphoneCall call, LinphoneCall.State state, String message) { if (state == State.IncomingReceived) { - //finish(); startActivity(new Intent(LinphoneActivity.instance(), CallIncomingActivity.class)); } else if (state == State.OutgoingInit || state == State.OutgoingProgress) { startActivity(new Intent(LinphoneActivity.instance(), CallOutgoingActivity.class)); @@ -279,24 +278,12 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta updateAnimationsState(); } - - @Override - protected void onPostCreate(Bundle savedInstanceState) { - super.onPostCreate(savedInstanceState); - // Sync the toggle state after onRestoreInstanceState has occurred. - //mDrawerToggle.syncState(); - } - - @Override - public void onConfigurationChanged(Configuration newConfig) { - super.onConfigurationChanged(newConfig); - // Pass any configuration change to the drawer toggls - //mDrawerToggle.onConfigurationChanged(newConfig); - } - - private void initButtons() { mTabBar = (LinearLayout) findViewById(R.id.footer); + mTopBar = (RelativeLayout) findViewById(R.id.top_bar); + + cancel = (ImageView) findViewById(R.id.cancel); + cancel.setOnClickListener(this); history = (RelativeLayout) findViewById(R.id.history); history.setOnClickListener(this); @@ -335,12 +322,9 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } if (statusFragment != null && !statusFragment.isVisible()) { - // Hack to ensure statusFragment is visible after coming back to - // dialer from chat statusFragment.getView().setVisibility(View.VISIBLE); } findViewById(R.id.status).setVisibility(View.VISIBLE); - //findViewById(R.id.fragmentContainer).setPadding(0, LinphoneUtils.pixelsToDpi(getResources(), 40), 0, 0); } public void isNewProxyConfig(){ @@ -375,7 +359,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta break; case CONTACTS_LIST: newFragment = new ContactsListFragment(); - friendStatusListenerFragment = newFragment; break; case CONTACT_DETAIL: newFragment = new ContactDetailsFragment(); @@ -399,7 +382,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta case ABOUT: newFragment = new AboutFragment(); break; - case CHATLIST: + case CHAT_LIST: newFragment = new ChatListFragment(); messageListFragment = newFragment; break; @@ -429,11 +412,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } private void changeFragment(Fragment newFragment, FragmentsAvailable newFragmentType, boolean withoutAnimation) { - /*if (statusFragment != null) { - statusFragment.closeStatusBar(); - }*/ - - FragmentTransaction transaction = getFragmentManager().beginTransaction(); if (!withoutAnimation && !isAnimationDisabled && currentFragment.shouldAnimate()) { @@ -452,7 +430,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta if (newFragmentType != FragmentsAvailable.DIALER || newFragmentType != FragmentsAvailable.CONTACTS_LIST - || newFragmentType != FragmentsAvailable.CHATLIST + || newFragmentType != FragmentsAvailable.CHAT_LIST || newFragmentType != FragmentsAvailable.HISTORY_LIST) { transaction.addToBackStack(newFragmentType.toString()); } @@ -464,16 +442,13 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } private void changeFragmentForTablets(Fragment newFragment, FragmentsAvailable newFragmentType, boolean withoutAnimation) { -// if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) { -// if (newFragmentType == FragmentsAvailable.DIALER) { -// showStatusBar(); -// } else { -// hideStatusBar(); -// } -// } - /*if (statusFragment != null) { - statusFragment.closeStatusBar(); - }*/ + if (getResources().getBoolean(R.bool.show_statusbar_only_on_dialer)) { + if (newFragmentType == FragmentsAvailable.DIALER) { + showStatusBar(); + } else { + hideStatusBar(); + } + } LinearLayout ll = (LinearLayout) findViewById(R.id.fragmentContainer2); @@ -500,7 +475,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta transaction.setCustomAnimations(R.anim.slide_in_left_to_right, R.anim.slide_out_left_to_right, R.anim.slide_in_right_to_left, R.anim.slide_out_right_to_left); } } - transaction.replace(R.id.fragmentContainer, newFragment); } transaction.commitAllowingStateLoss(); @@ -510,7 +484,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta if (newFragmentType == FragmentsAvailable.DIALER || newFragmentType == FragmentsAvailable.SETTINGS || newFragmentType == FragmentsAvailable.CONTACTS_LIST - || newFragmentType == FragmentsAvailable.CHATLIST + || newFragmentType == FragmentsAvailable.CHAT_LIST || newFragmentType == FragmentsAvailable.HISTORY_LIST) { try { getFragmentManager().popBackStackImmediate(null, FragmentManager.POP_BACK_STACK_INCLUSIVE); @@ -527,6 +501,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta lAddress = LinphoneCoreFactory.instance().createLinphoneAddress(sipUri); } catch (LinphoneCoreException e) { Log.e("Cannot display history details",e); + //TODO display error message return; } Contact c = ContactsManager.getInstance().findContactWithAddress(getContentResolver(), lAddress); @@ -536,12 +511,12 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta String status; if (log.getDirection() == CallDirection.Outgoing) { - status = "Outgoing"; + status = getString(R.string.outgoing); } else { if (log.getStatus() == CallStatus.Missed) { - status = "Missed"; + status = getString(R.string.missed); } else { - status = "Incoming"; + status = getString(R.string.incoming); } } @@ -601,7 +576,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta public void displayChatList() { Bundle extras = new Bundle(); - changeCurrentFragment(FragmentsAvailable.CHATLIST, extras); + changeCurrentFragment(FragmentsAvailable.CHAT_LIST, extras); } public void displayContactsForEdition(String sipAddress) { @@ -613,7 +588,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta public void displayAbout() { changeCurrentFragment(FragmentsAvailable.ABOUT, null); - //settings.setSelected(true); } public void displayAssistant() { @@ -649,8 +623,9 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } else { LinphoneAddress lAddress; try { - lAddress = LinphoneCoreFactory.instance().createLinphoneAddress(sipUri); + lAddress = LinphoneManager.getLc().interpretUrl(sipUri); } catch (LinphoneCoreException e) { + //TODO display error message Log.e("Cannot display chat",e); return; } @@ -664,7 +639,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta thumbnailUri = contact.getThumbnailUri().toString(); } - if (currentFragment == FragmentsAvailable.CHATLIST || currentFragment == FragmentsAvailable.CHAT) { + if (currentFragment == FragmentsAvailable.CHAT_LIST || currentFragment == FragmentsAvailable.CHAT) { Fragment fragment2 = getFragmentManager().findFragmentById(R.id.fragmentContainer2); if (fragment2 != null && fragment2.isVisible() && currentFragment == FragmentsAvailable.CHAT) { ChatFragment chatFragment = (ChatFragment) fragment2; @@ -717,8 +692,11 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta changeCurrentFragment(FragmentsAvailable.DIALER, null); dialer_selected.setVisibility(View.VISIBLE); } else if (id == R.id.chat) { - changeCurrentFragment(FragmentsAvailable.CHATLIST, null); + changeCurrentFragment(FragmentsAvailable.CHAT_LIST, null); chat_selected.setVisibility(View.VISIBLE); + } else if (id == R.id.cancel) { + displayTopBar(false,""); + getFragmentManager().popBackStackImmediate(); } } @@ -737,6 +715,17 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } } + public void displayTopBar(Boolean display, String name) { + TextView menuName = (TextView) findViewById(R.id.menu_name); + if(display){ + menuName.setText(name); + mTopBar.setVisibility(View.VISIBLE); + } else { + menuName.setText(""); + mTopBar.setVisibility(View.GONE); + } + } + @SuppressWarnings("incomplete-switch") public void selectMenu(FragmentsAvailable menuToSelect) { currentFragment = menuToSelect; @@ -757,9 +746,9 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta break; case SETTINGS: case ACCOUNT_SETTINGS: - //settings.setSelected(true); + displayTopBar(true,"settings"); break; - case CHATLIST: + case CHAT_LIST: case CHAT: chat_selected.setVisibility(View.VISIBLE); break; @@ -1213,8 +1202,9 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta if (call != null && call.getState() != LinphoneCall.State.IncomingReceived) { if (call.getCurrentParamsCopy().getVideoEnabled()) { - startVideoActivity(call); + //startVideoActivity(call); } else { + Log.w("outgoing call"); //startIncallActivity(call); } } @@ -1239,7 +1229,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta if (currentFragment == FragmentsAvailable.DIALER || currentFragment == FragmentsAvailable.CONTACTS_LIST || currentFragment == FragmentsAvailable.HISTORY_LIST - || currentFragment == FragmentsAvailable.CHATLIST) { + || currentFragment == FragmentsAvailable.CHAT_LIST) { boolean isBackgroundModeActive = LinphonePreferences.instance().isBackgroundModeEnabled(); if (!isBackgroundModeActive) { stopService(new Intent(Intent.ACTION_MAIN).setClass(this, LinphoneService.class)); @@ -1254,16 +1244,11 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } } } - } /*else if (keyCode == KeyEvent.KEYCODE_MENU && statusFragment != null) { - if (event.getRepeatCount() < 1) { - statusFragment.openOrCloseStatusBar(true); - } - }*/ + } return super.onKeyDown(keyCode, event); } //SIDE MENU - public void openOrCloseSideMenu(boolean open) { if(open) { sideMenu.openDrawer(sideMenuContent); @@ -1272,7 +1257,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } } - public void createSideMenu() { + public void initSideMenu() { sideMenu = (DrawerLayout) findViewById(R.id.side_menu); sideMenuItems = getResources().getStringArray(R.array.side_menu_item); sideMenuContent = (RelativeLayout) findViewById(R.id.side_menu_content); @@ -1320,7 +1305,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta private int getStatusIconResource(LinphoneCore.RegistrationState state) { try { - LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull(); if (state == RegistrationState.RegistrationOk) { return R.drawable.led_connected; } else if (state == RegistrationState.RegistrationProgress) { @@ -1396,8 +1380,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta accountsList = (ListView) findViewById(R.id.accounts_list); defaultAccount = (RelativeLayout) findViewById(R.id.default_account); - displayMainAccount(); - refreshAccounts(); } From 343bbed681b10224883f99d1827958eabe7a9a9e Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Tue, 17 Nov 2015 15:10:54 +0100 Subject: [PATCH 23/56] Updated linphone, ms2 and oRTP with changes for RTT --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 2e56ba2aa..04397c885 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 2e56ba2aa1ee558c0eb3d0e50e121124451a0ec0 +Subproject commit 04397c885f8d0162fd00deb271c1ad01710e37b8 From f2f12e1bdbed28f9784791938509ca25a751fa41 Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Tue, 17 Nov 2015 14:35:23 +0100 Subject: [PATCH 24/56] Rename assets --- res/layout/about.xml | 28 +++++++ res/layout/main.xml | 81 +++++++++---------- ...ccounts.xml => side_menu_account_cell.xml} | 9 ++- ..._menu_item.xml => side_menu_item_cell.xml} | 2 +- ...account.xml => side_menu_main_account.xml} | 16 ++-- res/values/strings.xml | 2 +- src/org/linphone/AboutFragment.java | 8 +- src/org/linphone/LinphoneActivity.java | 46 +++++------ 8 files changed, 104 insertions(+), 88 deletions(-) rename res/layout/{accounts.xml => side_menu_account_cell.xml} (82%) rename res/layout/{side_menu_item.xml => side_menu_item_cell.xml} (80%) rename res/layout/{side_menu_default_account.xml => side_menu_main_account.xml} (81%) diff --git a/res/layout/about.xml b/res/layout/about.xml index 5f16136e0..efc9917ca 100644 --- a/res/layout/about.xml +++ b/res/layout/about.xml @@ -5,6 +5,34 @@ android:layout_height="match_parent" android:orientation="vertical"> + + + + + + + + + android:layout_centerInParent="true"/> - + android:visibility="gone"/> @@ -118,42 +116,37 @@ android:background="@drawable/footer_button" android:layout_weight="1" android:layout_width="0dp" - android:layout_height="match_parent" - android:adjustViewBounds="true"> + android:layout_height="match_parent"> + android:layout_centerInParent="true"/> - + android:visibility="gone"/> - + android:layout_height="match_parent"> - - - - - + + - + - + android:dividerHeight="0dp"/> - + android:dividerHeight="1dp"/> + android:layout_height="50dp"> - + android:layout_height="wrap_content"/> outgoing incoming missed + Settings free SIP VOIP client @@ -293,7 +294,6 @@ Audio Prefix Advanced - Settings Proxy Domain* Password* diff --git a/src/org/linphone/AboutFragment.java b/src/org/linphone/AboutFragment.java index f90607056..47815700b 100644 --- a/src/org/linphone/AboutFragment.java +++ b/src/org/linphone/AboutFragment.java @@ -29,6 +29,7 @@ import android.view.View; import android.view.View.OnClickListener; import android.view.ViewGroup; import android.widget.ImageView; +import android.widget.RelativeLayout; import android.widget.TextView; /** @@ -37,6 +38,7 @@ import android.widget.TextView; public class AboutFragment extends Fragment implements OnClickListener { View sendLogButton = null; View resetLogButton = null; + ImageView cancel; @Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { @@ -49,6 +51,9 @@ public class AboutFragment extends Fragment implements OnClickListener { Log.e(e, "cannot get version name"); } + cancel = (ImageView) view.findViewById(R.id.cancel); + cancel.setOnClickListener(this); + sendLogButton = view.findViewById(R.id.send_log); sendLogButton.setOnClickListener(this); sendLogButton.setVisibility(org.linphone.LinphonePreferences.instance().isDebugEnabled() ? View.VISIBLE : View.GONE); @@ -66,7 +71,6 @@ public class AboutFragment extends Fragment implements OnClickListener { if (org.linphone.LinphoneActivity.isInstanciated()) { LinphoneActivity.instance().hideTabBar(true); - LinphoneActivity.instance().displayTopBar(true,"About"); } } @@ -82,6 +86,8 @@ public class AboutFragment extends Fragment implements OnClickListener { if (lc != null) { lc.resetLogCollection(); } + } else if (v == cancel) { + getFragmentManager().popBackStackImmediate(); } } } diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index 5df9d1235..9cc3353ba 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -99,7 +99,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta private StatusFragment statusFragment; private TextView missedCalls, missedChats; private RelativeLayout contacts, history, dialer, chat; - private RelativeLayout contacts_selected, history_selected, dialer_selected, chat_selected; + private View contacts_selected, history_selected, dialer_selected, chat_selected; private RelativeLayout mTopBar; private ImageView cancel; private FragmentsAvailable currentFragment, nextFragment; @@ -294,13 +294,13 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta chat = (RelativeLayout) findViewById(R.id.chat); chat.setOnClickListener(this); - history_selected = (RelativeLayout) findViewById(R.id.history_select); - contacts_selected = (RelativeLayout) findViewById(R.id.contacts_select); - dialer_selected = (RelativeLayout) findViewById(R.id.dialer_select); - chat_selected = (RelativeLayout) findViewById(R.id.chat_select); + history_selected = findViewById(R.id.history_select); + contacts_selected = findViewById(R.id.contacts_select); + dialer_selected = findViewById(R.id.dialer_select); + chat_selected = findViewById(R.id.chat_select); - missedCalls = (TextView) findViewById(R.id.missedCalls); - missedChats = (TextView) findViewById(R.id.missedChats); + missedCalls = (TextView) findViewById(R.id.missed_calls); + missedChats = (TextView) findViewById(R.id.missed_chats); } private boolean isTablet() { @@ -694,9 +694,9 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } else if (id == R.id.chat) { changeCurrentFragment(FragmentsAvailable.CHAT_LIST, null); chat_selected.setVisibility(View.VISIBLE); - } else if (id == R.id.cancel) { - displayTopBar(false,""); + } else if (id == R.id.cancel){ getFragmentManager().popBackStackImmediate(); + mTopBar.setVisibility(View.GONE); } } @@ -715,17 +715,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } } - public void displayTopBar(Boolean display, String name) { - TextView menuName = (TextView) findViewById(R.id.menu_name); - if(display){ - menuName.setText(name); - mTopBar.setVisibility(View.VISIBLE); - } else { - menuName.setText(""); - mTopBar.setVisibility(View.GONE); - } - } - @SuppressWarnings("incomplete-switch") public void selectMenu(FragmentsAvailable menuToSelect) { currentFragment = menuToSelect; @@ -746,7 +735,8 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta break; case SETTINGS: case ACCOUNT_SETTINGS: - displayTopBar(true,"settings"); + hideTabBar(true); + mTopBar.setVisibility(View.VISIBLE); break; case CHAT_LIST: case CHAT: @@ -1264,7 +1254,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta sideMenuItemList = (ListView)findViewById(R.id.item_list); menu = (ImageView) findViewById(R.id.side_menu_button); - sideMenuItemList.setAdapter(new ArrayAdapter(this, R.layout.side_menu_item, sideMenuItems)); + sideMenuItemList.setAdapter(new ArrayAdapter(this, R.layout.side_menu_item_cell, sideMenuItems)); sideMenuItemList.setOnItemClickListener(new AdapterView.OnItemClickListener() { @Override public void onItemClick(AdapterView adapterView, View view, int i, long l) { @@ -1323,9 +1313,9 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta private void displayMainAccount(){ defaultAccount.setVisibility(View.VISIBLE); - ImageView status = (ImageView) defaultAccount.findViewById(R.id.status_led); - TextView address = (TextView) defaultAccount.findViewById(R.id.address); - TextView displayName = (TextView) defaultAccount.findViewById(R.id.display_name); + ImageView status = (ImageView) defaultAccount.findViewById(R.id.main_account_status); + TextView address = (TextView) defaultAccount.findViewById(R.id.main_account_address); + TextView displayName = (TextView) defaultAccount.findViewById(R.id.main_account_display_name); LinphoneProxyConfig proxy = LinphoneManager.getLc().getDefaultProxyConfig(); @@ -1422,11 +1412,11 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta if (convertView != null) { view = convertView; } else { - view = getLayoutInflater().inflate(R.layout.accounts, parent, false); + view = getLayoutInflater().inflate(R.layout.side_menu_account_cell, parent, false); } - ImageView status = (ImageView) view.findViewById(R.id.status_led); - TextView address = (TextView) view.findViewById(R.id.address); + ImageView status = (ImageView) view.findViewById(R.id.account_status); + TextView address = (TextView) view.findViewById(R.id.account_address); String sipAddress = lpc.getAddress().asStringUriOnly(); address.setText(sipAddress); From 417b7d0a6affc024a14506d958b3dce887dbfd8c Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Tue, 17 Nov 2015 14:44:38 +0100 Subject: [PATCH 25/56] Back to dialer in settings and about --- res/layout/dialer.xml | 22 +++++++++---------- res/values/digit_style.xml | 2 +- src/org/linphone/AboutFragment.java | 2 +- src/org/linphone/BootReceiver.java | 2 +- src/org/linphone/CallActivity.java | 10 +++------ src/org/linphone/ChatFragment.java | 4 ++-- src/org/linphone/ContactEditorFragment.java | 2 +- src/org/linphone/ContactsManager.java | 8 ++----- src/org/linphone/LinphoneActivity.java | 6 ++++- src/org/linphone/LinphoneUtils.java | 5 +---- .../linphone/assistant/AssistantActivity.java | 4 ++-- src/org/linphone/ui/CallButton.java | 2 +- src/org/linphone/ui/Digit.java | 4 ++-- 13 files changed, 32 insertions(+), 41 deletions(-) diff --git a/res/layout/dialer.xml b/res/layout/dialer.xml index 8c549233d..4063c8c58 100644 --- a/res/layout/dialer.xml +++ b/res/layout/dialer.xml @@ -1,8 +1,8 @@ + android:layout_height="match_parent"> + - - diff --git a/res/values/digit_style.xml b/res/values/digit_style.xml index 1fb8cd745..de1ecbe02 100644 --- a/res/values/digit_style.xml +++ b/res/values/digit_style.xml @@ -5,7 +5,7 @@ 50dp @android:color/transparent 20sp - 30dp + 25dp diff --git a/src/org/linphone/AboutFragment.java b/src/org/linphone/AboutFragment.java index 47815700b..d3d22e88f 100644 --- a/src/org/linphone/AboutFragment.java +++ b/src/org/linphone/AboutFragment.java @@ -87,7 +87,7 @@ public class AboutFragment extends Fragment implements OnClickListener { lc.resetLogCollection(); } } else if (v == cancel) { - getFragmentManager().popBackStackImmediate(); + LinphoneActivity.instance().displayDialer(); } } } diff --git a/src/org/linphone/BootReceiver.java b/src/org/linphone/BootReceiver.java index a911879bb..aa2b1082c 100644 --- a/src/org/linphone/BootReceiver.java +++ b/src/org/linphone/BootReceiver.java @@ -35,7 +35,7 @@ public class BootReceiver extends BroadcastReceiver { if (lpConfig.getBool("app", "auto_start", false)) { Intent lLinphoneServiceIntent = new Intent(Intent.ACTION_MAIN); lLinphoneServiceIntent.setClass(context, LinphoneService.class); - context.startService(lLinphoneServiceIntent);; + context.startService(lLinphoneServiceIntent); } } } diff --git a/src/org/linphone/CallActivity.java b/src/org/linphone/CallActivity.java index 525ad7991..30944f9cb 100644 --- a/src/org/linphone/CallActivity.java +++ b/src/org/linphone/CallActivity.java @@ -1524,13 +1524,9 @@ public class CallActivity extends Activity implements OnClickListener { isCallPaused = false; isInConference = false; } else { - if (isConferenceRunning && call.isInConference()) { - //callState.setImageResource(R.drawable.remove); - isInConference = true; - } else { - //callState.setImageResource(R.drawable.play); - isInConference = false; - } + //callState.setImageResource(R.drawable.remove); +//callState.setImageResource(R.drawable.play); + isInConference = isConferenceRunning && call.isInConference(); isCallPaused = false; } diff --git a/src/org/linphone/ChatFragment.java b/src/org/linphone/ChatFragment.java index f4cde3cb9..f2f161a5d 100644 --- a/src/org/linphone/ChatFragment.java +++ b/src/org/linphone/ChatFragment.java @@ -1040,7 +1040,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC sendImage.showContextMenu(); } catch (Exception e) { e.printStackTrace(); - }; + } } @Override @@ -1116,7 +1116,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC contacts.clear(); contacts = (List) results.values; notifyDataSetChanged(); - } else {; + } else { contacts.clear(); contacts = getContactsList(); notifyDataSetInvalidated(); diff --git a/src/org/linphone/ContactEditorFragment.java b/src/org/linphone/ContactEditorFragment.java index 4b8fdaa41..d336fd3aa 100644 --- a/src/org/linphone/ContactEditorFragment.java +++ b/src/org/linphone/ContactEditorFragment.java @@ -736,7 +736,7 @@ public class ContactEditorFragment extends Fragment { newNumberOrAddress = newN; } - public void save() {; + public void save() { if (newNumberOrAddress == null || newNumberOrAddress.equals(oldNumberOrAddress)) return; diff --git a/src/org/linphone/ContactsManager.java b/src/org/linphone/ContactsManager.java index 357eb3f9d..d6ec79b54 100644 --- a/src/org/linphone/ContactsManager.java +++ b/src/org/linphone/ContactsManager.java @@ -93,7 +93,7 @@ public class ContactsManager { public void initializeSyncAccount(Context context, ContentResolver contentResolver) { initializeContactManager(context,contentResolver); - AccountManager accountManager = (AccountManager) context.getSystemService(context.ACCOUNT_SERVICE); + AccountManager accountManager = (AccountManager) context.getSystemService(Context.ACCOUNT_SERVICE); Account[] accounts = accountManager.getAccountsByType(context.getPackageName()); @@ -452,11 +452,7 @@ public class ContactsManager { public boolean isContactHasAddress(Contact contact, String address){ if(contact != null) { contact.refresh(contentResolver); - if (contact.getNumbersOrAddresses().contains(address) || contact.getNumbersOrAddresses().contains("sip:"+ address)) { - return true; - } else { - return false; - } + return contact.getNumbersOrAddresses().contains(address) || contact.getNumbersOrAddresses().contains("sip:" + address); } return false; } diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index 9cc3353ba..5977126ce 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -695,7 +695,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta changeCurrentFragment(FragmentsAvailable.CHAT_LIST, null); chat_selected.setVisibility(View.VISIBLE); } else if (id == R.id.cancel){ - getFragmentManager().popBackStackImmediate(); + displayDialer(); mTopBar.setVisibility(View.GONE); } } @@ -773,6 +773,10 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } } + public void displayDialer() { + changeCurrentFragment(FragmentsAvailable.DIALER, null); + } + public void displayAccountSettings(int accountNumber) { Bundle bundle = new Bundle(); bundle.putInt("Account", accountNumber); diff --git a/src/org/linphone/LinphoneUtils.java b/src/org/linphone/LinphoneUtils.java index 32c5b27a2..4015b1ce7 100644 --- a/src/org/linphone/LinphoneUtils.java +++ b/src/org/linphone/LinphoneUtils.java @@ -91,10 +91,7 @@ public final class LinphoneUtils { public static boolean isNumberAddress(String numberOrAddress) { LinphoneProxyConfig proxy = LinphoneManager.getLc().createProxyConfig(); - if(proxy.normalizePhoneNumber(numberOrAddress) != null){ - return true; - } - return false; + return proxy.normalizePhoneNumber(numberOrAddress) != null; } public static boolean isStrictSipAddress(String numberOrAddress) { diff --git a/src/org/linphone/assistant/AssistantActivity.java b/src/org/linphone/assistant/AssistantActivity.java index 886139da8..2c19a3351 100644 --- a/src/org/linphone/assistant/AssistantActivity.java +++ b/src/org/linphone/assistant/AssistantActivity.java @@ -108,8 +108,8 @@ public class AssistantActivity extends Activity implements OnClickListener { } }; instance = this; - }; - + } + @Override protected void onResume() { super.onResume(); diff --git a/src/org/linphone/ui/CallButton.java b/src/org/linphone/ui/CallButton.java index 1580f294c..82447ca0f 100644 --- a/src/org/linphone/ui/CallButton.java +++ b/src/org/linphone/ui/CallButton.java @@ -81,7 +81,7 @@ public class CallButton extends ImageView implements OnClickListener, AddressAwa } catch (LinphoneCoreException e) { LinphoneManager.getInstance().terminateCall(); onWrongDestinationAddress(); - }; + } } protected void onWrongDestinationAddress() { diff --git a/src/org/linphone/ui/Digit.java b/src/org/linphone/ui/Digit.java index 5146f9f9d..8eb705cf3 100644 --- a/src/org/linphone/ui/Digit.java +++ b/src/org/linphone/ui/Digit.java @@ -215,7 +215,7 @@ public class Digit extends Button implements AddressAware { } return true; } - }; - + } + } From b32ad9ab614236956341ffa0ed1a083f19cb2dbc Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Tue, 17 Nov 2015 17:22:51 +0100 Subject: [PATCH 26/56] Add mask for incoming cat bubble --- res/drawable-xhdpi/avatar_chat_mask.png | Bin 0 -> 5291 bytes res/layout/chat_bubble_incoming.xml | 2 +- src/org/linphone/AboutFragment.java | 1 - 3 files changed, 1 insertion(+), 2 deletions(-) create mode 100644 res/drawable-xhdpi/avatar_chat_mask.png diff --git a/res/drawable-xhdpi/avatar_chat_mask.png b/res/drawable-xhdpi/avatar_chat_mask.png new file mode 100644 index 0000000000000000000000000000000000000000..43d40040e72b467c056fa3c096cd17faca53f748 GIT binary patch literal 5291 zcmZ`-3s_WT8vf4A$PD*ET(1m`fMl*05=3&)4vL~CE?rbIR#}LPE960xp*8a;sF;iP zJa$20*V$FkBz>?*$50zbi%g->$`EIe!PT;4lyzO!HFDqooMD8`9v&X}{_}nBclmGc z_isv>o8<2^)Q5=tXU$A}j!5BRzZx%$bn3Q!fj?du&m<+%1NLJ&zIPi&yoH%B7Q*6N z_RCEjSy_xh^@>@^)74jegS5V5w>2*RlxRTQti*&Did#AyhNAGNw9^wd<-F!vvpsEX zOYXGr2_t^?;itS@I(hE4er@wZ%kI2>G;K;Nk$7S56a|qMVOY4I?*!4gf+;(%7=JPz zUG5##Q13s8FY{eZ&H()vL0x3k@h0CtF{vr&t|Wzj&y^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7_81r2ZpDV|7?TyhG83Xvh|VW+OuGSVn?#qhqN>tCbJT5Oa42-8Xza(>}6Fu)R zG>o7l+3q&*k8)Qy!`&oiSO3%CO1pNXmE&ul-;74wj|4A#D?rD%2&!5Vu7}xA&QMU( z!u_`!-itr|*a3x@p5u=`Jc`=pOgCrl;;3p5+R-@p+~aMuzq)QTcjx}u0nv5NO)(s{p1F<812WJ?XyQGDaG`Sm*=3(Rfr$Hfv)|njQ<8;=tm4C zD8%SZY$!__`W;&OIL>m3JxYXCoKWhUZ#2QpC~6uEH*-V2VxD!|kyJm+iwbUzeN#5G z+v|&PEfg26$6LkasMTt|Hr$?If%zYvSddlwtg>yi2q$@s|I+cbctz=i4c<)@p>#gL zs^bECq>}*+|Ew9`{2%wTNOAOPwe}|7ZWt0?WJI^*TTCZmr;4X_I@h%YS(dem^sVdR z;I}CzbI~919aR!8i z;>}7>;|+;PibWP>h7Rvf?HrzvjCj1t&`J0ztmPi5OnrJ1cu!EE^sSFH#fv{(!teob zhyi?Fk^%{@Umgi?vP8qTrgS}l$2RR9{RQ^C_K$>p2%i5u{A);JMbd62*}`o-64=VXFR2O-arB3A=QvzGQx}&p$>);+%|GHRZsn6_lCa(Hc5_K*E^R5vnt2ow&6++p K@!-_-b^ikdH~$j= literal 0 HcmV?d00001 diff --git a/res/layout/chat_bubble_incoming.xml b/res/layout/chat_bubble_incoming.xml index 3fe587400..edcc08feb 100644 --- a/res/layout/chat_bubble_incoming.xml +++ b/res/layout/chat_bubble_incoming.xml @@ -30,7 +30,7 @@ Date: Tue, 17 Nov 2015 17:23:19 +0100 Subject: [PATCH 27/56] Fix back in settings --- .../linphone/AccountPreferencesFragment.java | 184 +++++++----------- src/org/linphone/LinphoneActivity.java | 7 +- src/org/linphone/SettingsFragment.java | 11 +- 3 files changed, 81 insertions(+), 121 deletions(-) diff --git a/src/org/linphone/AccountPreferencesFragment.java b/src/org/linphone/AccountPreferencesFragment.java index d6822542b..2e972a6b5 100644 --- a/src/org/linphone/AccountPreferencesFragment.java +++ b/src/org/linphone/AccountPreferencesFragment.java @@ -59,13 +59,11 @@ public class AccountPreferencesFragment extends PreferencesListFragment { PreferenceScreen screen = getPreferenceScreen(); n = getArguments().getInt("Account", 0); - if(n == mPrefs.getAccountCount()){ - isNewAccount=true; + if(n == mPrefs.getAccountCount()) { + isNewAccount = true; builder = new AccountBuilder(LinphoneManager.getLc()); - initAccountPreferencesFields(screen); - } else { - manageAccountPreferencesFields(screen); } + initAccountPreferencesFields(screen); // Force hide keyboard getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN); @@ -185,7 +183,7 @@ public class AccountPreferencesFragment extends PreferencesListFragment { String value = newValue.toString(); preference.setSummary(value); if (isNewAccount) { - //TODO acocunt builder ste prefix + //TODO accpunt builder ste prefix } else { mPrefs.setPrefix(n, value); } @@ -274,55 +272,106 @@ public class AccountPreferencesFragment extends PreferencesListFragment { PreferenceCategory account = (PreferenceCategory) getPreferenceScreen().findPreference(getString(R.string.pref_sipaccount_key)); EditTextPreference username = (EditTextPreference) account.getPreference(0); username.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); - username.setOnPreferenceChangeListener(usernameChangedListener); - + username.setOnPreferenceChangeListener(usernameChangedListener); + if (!isNewAccount){ + username.setText(mPrefs.getAccountUsername(n)); + username.setSummary(username.getText()); + } + EditTextPreference userid = (EditTextPreference) account.getPreference(1); userid.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); - userid.setOnPreferenceChangeListener(useridChangedListener); + userid.setOnPreferenceChangeListener(useridChangedListener); + if (!isNewAccount){ + userid.setText(mPrefs.getAccountUserId(n)); + userid.setSummary(userid.getText()); + } EditTextPreference password = (EditTextPreference) account.getPreference(2); password.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); - password.setOnPreferenceChangeListener(passwordChangedListener); + password.setOnPreferenceChangeListener(passwordChangedListener); + if(!isNewAccount){ + password.setText(mPrefs.getAccountPassword(n)); + } EditTextPreference domain = (EditTextPreference) account.getPreference(3); domain.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); domain.setOnPreferenceChangeListener(domainChangedListener); + if (!isNewAccount){ + domain.setText(mPrefs.getAccountDomain(n)); + domain.setSummary(domain.getText()); + } EditTextPreference displayName = (EditTextPreference) account.getPreference(4); displayName.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PERSON_NAME); - displayName.setOnPreferenceChangeListener(displayNameChangedListener); + displayName.setOnPreferenceChangeListener(displayNameChangedListener); + if (!isNewAccount){ + displayName.setText(mPrefs.getAccountDisplayName(n)); + displayName.setSummary(displayName.getText()); + } PreferenceCategory advanced = (PreferenceCategory) getPreferenceScreen().findPreference(getString(R.string.pref_advanced_key)); - mTransportPreference = (ListPreference) advanced.getPreference(0); + mTransportPreference = (ListPreference) advanced.getPreference(0); initializeTransportPreference(mTransportPreference); - mTransportPreference.setOnPreferenceChangeListener(transportChangedListener); + mTransportPreference.setOnPreferenceChangeListener(transportChangedListener); + if(!isNewAccount){ + mTransportPreference.setSummary(mPrefs.getAccountTransportString(n)); + } mProxyPreference = (EditTextPreference) advanced.getPreference(1); mProxyPreference.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); mProxyPreference.setOnPreferenceChangeListener(proxyChangedListener); + if (!isNewAccount){ + mProxyPreference.setText(mPrefs.getAccountProxy(n)); + mProxyPreference.setSummary("".equals(mProxyPreference.getText()) || (mProxyPreference.getText() == null) ? getString(R.string.pref_help_proxy) : mProxyPreference.getText()); + } CheckBoxPreference outboundProxy = (CheckBoxPreference) advanced.getPreference(2); outboundProxy.setOnPreferenceChangeListener(outboundProxyChangedListener); + if (!isNewAccount){ + outboundProxy.setChecked(mPrefs.isAccountOutboundProxySet(n)); + } EditTextPreference expires = (EditTextPreference) advanced.getPreference(3); expires.setOnPreferenceChangeListener(expiresChangedListener); + if(!isNewAccount){ + expires.setText(mPrefs.getExpires(n)); + expires.setSummary(mPrefs.getExpires(n)); + } EditTextPreference prefix = (EditTextPreference) advanced.getPreference(4); prefix.setOnPreferenceChangeListener(prefixChangedListener); + if(!isNewAccount){ + String prefixValue = mPrefs.getPrefix(n); + prefix.setText(prefixValue); + prefix.setOnPreferenceChangeListener(prefixChangedListener); + } CheckBoxPreference avpf = (CheckBoxPreference) advanced.getPreference(5); avpf.setOnPreferenceChangeListener(avpfChangedListener); + if (!isNewAccount){ + avpf.setChecked(mPrefs.avpfEnabled(n)); + } EditTextPreference avpfRRInterval = (EditTextPreference) advanced.getPreference(6); avpfRRInterval.setOnPreferenceChangeListener(avpfRRIntervalChangedListener); + if (!isNewAccount){ + avpfRRInterval.setText(mPrefs.getAvpfRRInterval(n)); + avpfRRInterval.setSummary(mPrefs.getAvpfRRInterval(n)); + } CheckBoxPreference escape = (CheckBoxPreference) advanced.getPreference(7); escape.setOnPreferenceChangeListener(escapeChangedListener); + if(!isNewAccount){ + escape.setChecked(mPrefs.getReplacePlusByZeroZero(n)); + } PreferenceCategory manage = (PreferenceCategory) getPreferenceScreen().findPreference(getString(R.string.pref_manage_key)); final CheckBoxPreference disable = (CheckBoxPreference) manage.getPreference(0); disable.setEnabled(true); disable.setOnPreferenceChangeListener(disableChangedListener); + if(!isNewAccount){ + disable.setChecked(!mPrefs.isAccountEnabled(n)); + } CheckBoxPreference mainAccount = (CheckBoxPreference) manage.getPreference(1); mainAccount.setChecked(isDefaultAccount); @@ -337,111 +386,9 @@ public class AccountPreferencesFragment extends PreferencesListFragment { return true; } }); - - final Preference delete = manage.getPreference(2); - delete.setEnabled(true); - delete.setOnPreferenceClickListener(new OnPreferenceClickListener() { - public boolean onPreferenceClick(Preference preference) { - mPrefs.deleteAccount(n); - LinphoneActivity.instance().refreshAccounts(); - LinphoneActivity.instance().displaySettings(); - return true; - } - }); - } - - private void manageAccountPreferencesFields(PreferenceScreen parent) { - boolean isDefaultAccount = mPrefs.getDefaultAccountIndex() == n; - - PreferenceCategory account = (PreferenceCategory) getPreferenceScreen().findPreference(getString(R.string.pref_sipaccount_key)); - EditTextPreference username = (EditTextPreference) account.getPreference(0); - username.setText(mPrefs.getAccountUsername(n)); - username.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); - username.setOnPreferenceChangeListener(usernameChangedListener); - username.setSummary(username.getText()); - - EditTextPreference userid = (EditTextPreference) account.getPreference(1); - userid.setText(mPrefs.getAccountUserId(n)); - userid.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); - userid.setOnPreferenceChangeListener(useridChangedListener); - userid.setSummary(userid.getText()); - - EditTextPreference password = (EditTextPreference) account.getPreference(2); - password.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD); - password.setText(mPrefs.getAccountPassword(n)); - password.setOnPreferenceChangeListener(passwordChangedListener); - - EditTextPreference domain = (EditTextPreference) account.getPreference(3); - domain.setText(mPrefs.getAccountDomain(n)); - domain.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); - domain.setOnPreferenceChangeListener(domainChangedListener); - domain.setSummary(domain.getText()); - - EditTextPreference displayName = (EditTextPreference) account.getPreference(4); - displayName.setText(mPrefs.getAccountDisplayName(n)); - displayName.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PERSON_NAME); - displayName.setOnPreferenceChangeListener(displayNameChangedListener); - displayName.setSummary(displayName.getText()); - - PreferenceCategory advanced = (PreferenceCategory) getPreferenceScreen().findPreference(getString(R.string.pref_advanced_key)); - mTransportPreference = (ListPreference) advanced.getPreference(0); - initializeTransportPreference(mTransportPreference); - mTransportPreference.setOnPreferenceChangeListener(transportChangedListener); - mTransportPreference.setSummary(mPrefs.getAccountTransportString(n)); - - mProxyPreference = (EditTextPreference) advanced.getPreference(1); - mProxyPreference.setText(mPrefs.getAccountProxy(n)); - mProxyPreference.getEditText().setInputType(InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS); - mProxyPreference.setOnPreferenceChangeListener(proxyChangedListener); - mProxyPreference.setSummary("".equals(mProxyPreference.getText()) || (mProxyPreference.getText() == null) ? getString(R.string.pref_help_proxy) : mProxyPreference.getText()); - - CheckBoxPreference outboundProxy = (CheckBoxPreference) advanced.getPreference(2); - outboundProxy.setChecked(mPrefs.isAccountOutboundProxySet(n)); - outboundProxy.setOnPreferenceChangeListener(outboundProxyChangedListener); - - EditTextPreference expires = (EditTextPreference) advanced.getPreference(3); - expires.setText(mPrefs.getExpires(n)); - expires.setOnPreferenceChangeListener(expiresChangedListener); - expires.setSummary(mPrefs.getExpires(n)); - - EditTextPreference prefix = (EditTextPreference) advanced.getPreference(4); - String prefixValue = mPrefs.getPrefix(n); - prefix.setSummary(prefixValue); - prefix.setText(prefixValue); - prefix.setOnPreferenceChangeListener(prefixChangedListener); - - CheckBoxPreference avpf = (CheckBoxPreference) advanced.getPreference(5); - avpf.setChecked(mPrefs.avpfEnabled(n)); - avpf.setOnPreferenceChangeListener(avpfChangedListener); - - EditTextPreference avpfRRInterval = (EditTextPreference) advanced.getPreference(6); - avpfRRInterval.setText(mPrefs.getAvpfRRInterval(n)); - avpfRRInterval.setOnPreferenceChangeListener(avpfRRIntervalChangedListener); - avpfRRInterval.setSummary(mPrefs.getAvpfRRInterval(n)); - - CheckBoxPreference escape = (CheckBoxPreference) advanced.getPreference(7); - escape.setChecked(mPrefs.getReplacePlusByZeroZero(n)); - escape.setOnPreferenceChangeListener(escapeChangedListener); - - PreferenceCategory manage = (PreferenceCategory) getPreferenceScreen().findPreference(getString(R.string.pref_manage_key)); - final CheckBoxPreference disable = (CheckBoxPreference) manage.getPreference(0); - disable.setEnabled(true); - disable.setChecked(!mPrefs.isAccountEnabled(n)); - disable.setOnPreferenceChangeListener(disableChangedListener); - - CheckBoxPreference mainAccount = (CheckBoxPreference) manage.getPreference(1); - mainAccount.setChecked(isDefaultAccount); - mainAccount.setEnabled(!mainAccount.isChecked()); - mainAccount.setOnPreferenceClickListener(new OnPreferenceClickListener() - { - public boolean onPreferenceClick(Preference preference) { - mPrefs.setDefaultAccount(n); - disable.setEnabled(false); - disable.setChecked(false); - preference.setEnabled(false); - return true; - } - }); + if(!isNewAccount){ + mainAccount.setEnabled(!mainAccount.isChecked()); + } final Preference delete = manage.getPreference(2); delete.setEnabled(true); @@ -503,6 +450,7 @@ public class AccountPreferencesFragment extends PreferencesListFragment { } LinphoneActivity.instance().isNewProxyConfig(); LinphoneManager.getLc().refreshRegisters(); + LinphoneActivity.instance().hideTopBar(); } } } diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index 5977126ce..a2cadcb97 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -695,8 +695,8 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta changeCurrentFragment(FragmentsAvailable.CHAT_LIST, null); chat_selected.setVisibility(View.VISIBLE); } else if (id == R.id.cancel){ + hideTopBar(); displayDialer(); - mTopBar.setVisibility(View.GONE); } } @@ -715,6 +715,10 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta } } + public void hideTopBar() { + mTopBar.setVisibility(View.GONE); + } + @SuppressWarnings("incomplete-switch") public void selectMenu(FragmentsAvailable menuToSelect) { currentFragment = menuToSelect; @@ -781,6 +785,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta Bundle bundle = new Bundle(); bundle.putInt("Account", accountNumber); changeCurrentFragment(FragmentsAvailable.ACCOUNT_SETTINGS, bundle); + mTabBar.setVisibility(View.VISIBLE); //settings.setSelected(true); } diff --git a/src/org/linphone/SettingsFragment.java b/src/org/linphone/SettingsFragment.java index 924435860..71fb78163 100644 --- a/src/org/linphone/SettingsFragment.java +++ b/src/org/linphone/SettingsFragment.java @@ -885,7 +885,8 @@ public class SettingsFragment extends PreferencesListFragment { int port = -1; try { port = Integer.parseInt(newValue.toString()); - } catch (NumberFormatException nfe) { } + } catch (NumberFormatException nfe) { + } mPrefs.setSipPort(port); preference.setSummary(newValue.toString()); @@ -1010,7 +1011,7 @@ public class SettingsFragment extends PreferencesListFragment { @Override public boolean onPreferenceChange(Preference preference, Object newValue) { String value = (String) newValue; - if(value.equals("")) return false; + if (value.equals("")) return false; mPrefs.setDefaultUsername(value); preference.setSummary(value); @@ -1030,4 +1031,10 @@ public class SettingsFragment extends PreferencesListFragment { } } + + @Override + public void onPause() { + LinphoneActivity.instance().hideTopBar(); + super.onPause(); + } } From 3cbf0338647542d8a899ed5b83c056747f81f7cc Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Wed, 18 Nov 2015 10:15:59 +0100 Subject: [PATCH 28/56] Disable animations --- res/raw/linphonerc_factory | 3 +++ 1 file changed, 3 insertions(+) diff --git a/res/raw/linphonerc_factory b/res/raw/linphonerc_factory index 0b0a6c92c..763694075 100644 --- a/res/raw/linphonerc_factory +++ b/res/raw/linphonerc_factory @@ -1,6 +1,9 @@ [net] mtu=1300 +[app] +animations=0 + [sip] guess_hostname=1 inc_timeout=15 From 2b2ed36d3859be3751a61651eacb3c7b8e9a88a2 Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Wed, 18 Nov 2015 11:31:31 +0100 Subject: [PATCH 29/56] Fix contact test --- tests/src/org/linphone/test/Contacts.java | 32 +++++++++++------------ 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/tests/src/org/linphone/test/Contacts.java b/tests/src/org/linphone/test/Contacts.java index 22dae57ee..3d5e0dc4b 100644 --- a/tests/src/org/linphone/test/Contacts.java +++ b/tests/src/org/linphone/test/Contacts.java @@ -2,7 +2,7 @@ package org.linphone.test; import junit.framework.Assert; -import org.linphone.ContactsFragment; +import org.linphone.ContactsListFragment; import org.linphone.LinphoneActivity; import org.linphone.R; @@ -23,8 +23,8 @@ public class Contacts extends SampleTest { goToHistory(); solo.clickOnView(solo.getView(org.linphone.R.id.detail)); - solo.clickOnText(aContext.getString(org.linphone.R.string.add_to_contacts)); - solo.clickOnText(aContext.getString(org.linphone.R.string.button_add_contact)); + solo.clickOnView(solo.getView(org.linphone.R.id.contact_add)); + solo.clickOnView(solo.getView(org.linphone.R.id.newContact)); Assert.assertTrue(solo.searchText(iContext.getString(org.linphone.test.R.string.account_test_calls_login) + "@" + iContext.getString(org.linphone.test.R.string.account_test_calls_domain))); @@ -46,14 +46,14 @@ public class Contacts extends SampleTest { @LargeTest public void testBCreateContactWithPhoneNumber() { goToContacts(); - - solo.clickOnText(aContext.getString(org.linphone.R.string.button_add_contact)); + + solo.clickOnView(solo.getView(org.linphone.R.id.newContact)); solo.enterText(0, iContext.getString(org.linphone.test.R.string.contact_name)); - solo.enterText(2, iContext.getString(org.linphone.test.R.string.contact_number)); - solo.clickOnText(aContext.getString(org.linphone.R.string.button_ok)); + solo.enterText(3, iContext.getString(org.linphone.test.R.string.contact_number)); + solo.clickOnView(solo.getView(org.linphone.R.id.ok)); - if (ContactsFragment.instance() != null) { - ContactsFragment.instance().invalidate(); + if (ContactsListFragment.instance() != null) { + ContactsListFragment.instance().invalidate(); solo.sleep(1000); } Assert.assertTrue(solo.searchText(iContext.getString(org.linphone.test.R.string.contact_name))); @@ -65,7 +65,7 @@ public class Contacts extends SampleTest { goToContacts(); Assert.assertTrue(solo.searchText(iContext.getString(org.linphone.test.R.string.contact_name))); - solo.clickOnText(aContext.getString(org.linphone.R.string.button_sip_contacts)); + solo.clickOnView(solo.getView(org.linphone.R.id.linphone_contacts)); Assert.assertFalse(solo.searchText(iContext.getString(org.linphone.test.R.string.contact_name))); } @@ -73,13 +73,13 @@ public class Contacts extends SampleTest { @LargeTest public void testDEditContactAddSipAddressAndRemoveNumber() { goToContacts(); - solo.clickOnText(aContext.getString(org.linphone.R.string.button_all_contacts)); + solo.clickOnView(solo.getView(org.linphone.R.id.all_contacts)); solo.clickOnText(iContext.getString(org.linphone.test.R.string.contact_name)); - solo.clickOnText(aContext.getString(org.linphone.R.string.button_edit)); + solo.clickOnView(solo.getView(org.linphone.R.id.editContact)); solo.clickOnView(solo.getView(org.linphone.R.id.delete)); solo.enterText(3, iContext.getString(org.linphone.test.R.string.contact_sip)); - solo.clickOnText(aContext.getString(org.linphone.R.string.button_ok)); + solo.clickOnView(solo.getView(org.linphone.R.id.ok)); Assert.assertTrue(solo.searchText(iContext.getString(org.linphone.test.R.string.contact_sip))); Assert.assertFalse(solo.searchText(iContext.getString(org.linphone.test.R.string.contact_number))); @@ -92,7 +92,7 @@ public class Contacts extends SampleTest { goToContacts(); Assert.assertTrue(solo.searchText(iContext.getString(org.linphone.test.R.string.contact_name))); - solo.clickOnText(aContext.getString(org.linphone.R.string.button_sip_contacts)); + solo.clickOnView(solo.getView(org.linphone.R.id.linphone_contacts)); Assert.assertTrue(solo.searchText(iContext.getString(org.linphone.test.R.string.contact_name))); } @@ -102,7 +102,7 @@ public class Contacts extends SampleTest { goToContacts(); solo.clickOnText(iContext.getString(org.linphone.test.R.string.contact_name)); - solo.clickOnView(solo.getView(org.linphone.R.id.chat)); + solo.clickOnView(solo.getView(org.linphone.R.id.contact_chat)); Assert.assertTrue(solo.searchText(aContext.getString(org.linphone.R.string.button_send_message))); } @@ -113,7 +113,7 @@ public class Contacts extends SampleTest { goToContacts(); solo.clickOnText(iContext.getString(org.linphone.test.R.string.contact_name)); - solo.clickOnText(aContext.getString(org.linphone.R.string.delete_contact)); + solo.clickOnView(solo.getView(org.linphone.R.id.deleteContact)); solo.sleep(1000); solo.clickOnText(aContext.getString(R.string.button_ok)); Assert.assertFalse(solo.searchText(iContext.getString(org.linphone.test.R.string.contact_name))); From 67d5a2a4de5893dcfdc87f8b5643241766e409af Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Wed, 18 Nov 2015 11:52:32 +0100 Subject: [PATCH 30/56] Fix others tests --- .../linphone/test/ConferenceAndMultiCall.java | 58 +++++++++---------- tests/src/org/linphone/test/Contacts.java | 2 +- tests/src/org/linphone/test/History.java | 2 +- tests/src/org/linphone/test/Transfer.java | 4 +- 4 files changed, 33 insertions(+), 33 deletions(-) diff --git a/tests/src/org/linphone/test/ConferenceAndMultiCall.java b/tests/src/org/linphone/test/ConferenceAndMultiCall.java index 3b9b16632..9cd92f500 100644 --- a/tests/src/org/linphone/test/ConferenceAndMultiCall.java +++ b/tests/src/org/linphone/test/ConferenceAndMultiCall.java @@ -47,7 +47,7 @@ public class ConferenceAndMultiCall extends SampleTest { LinphoneTestManager.getInstance().declineCall = false; // Just in case startConference(); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.waitForActivity("LinphoneActivity", 5000); solo.assertCurrentActivity("Expected Linphone Activity", LinphoneActivity.class); } @@ -56,16 +56,16 @@ public class ConferenceAndMultiCall extends SampleTest { public void testCRemoveOneFromConference() { startConference(); - solo.clickOnView(solo.getView(org.linphone.R.id.callStatus)); + solo.clickOnView(solo.getView(org.linphone.R.id.conferenceStatus)); Assert.assertEquals(1, LinphoneTestManager.getLc(1).getCallsNb()); Assert.assertEquals(1, LinphoneTestManager.getLc(2).getCallsNb()); solo.sleep(1000); Assert.assertFalse(LinphoneManager.getLc().isInConference()); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.sleep(1000); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.waitForActivity("LinphoneActivity", 5000); solo.assertCurrentActivity("Expected Linphone Activity", LinphoneActivity.class); } @@ -80,14 +80,14 @@ public class ConferenceAndMultiCall extends SampleTest { waitForCallState(call2,LinphoneCall.State.StreamsRunning); waitForCallState(call1,LinphoneCall.State.PausedByRemote); - solo.clickOnView(solo.getView(org.linphone.R.id.callStatus)); + solo.clickOnView(solo.getView(org.linphone.R.id.call_pause)); solo.sleep(2000); waitForCallState(call1,LinphoneCall.State.StreamsRunning); waitForCallState(call2,LinphoneCall.State.PausedByRemote); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.sleep(1000); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.waitForActivity("LinphoneActivity", 5000); solo.assertCurrentActivity("Expected Linphone Activity", LinphoneActivity.class); } @@ -108,8 +108,8 @@ public class ConferenceAndMultiCall extends SampleTest { waitForCallState(call2,LinphoneCall.State.PausedByRemote); waitForCallState(call1,LinphoneCall.State.PausedByRemote); - // All calls are paused, one click on hangUp terminates them all - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + // All calls are paused, one click on hang_up terminates them all + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.waitForActivity("LinphoneActivity", 5000); solo.assertCurrentActivity("Expected Linphone Activity", LinphoneActivity.class); } @@ -117,19 +117,19 @@ public class ConferenceAndMultiCall extends SampleTest { @LargeTest public void testFAddNewCallAndCancelIt() { solo.enterText(0, iContext.getString(org.linphone.test.R.string.account_test_calls_login) + "@" + iContext.getString(org.linphone.test.R.string.account_test_calls_domain)); - solo.clickOnView(solo.getView(org.linphone.R.id.Call)); + solo.clickOnView(solo.getView(org.linphone.R.id.call)); assertCallIsCorrectlyRunning(1); LinphoneTestManager.getInstance().autoAnswer = false; solo.clickOnView(solo.getView(org.linphone.R.id.options)); - solo.clickOnView(solo.getView(org.linphone.R.id.addCall)); + solo.clickOnView(solo.getView(org.linphone.R.id.add_call)); solo.enterText(0, iContext.getString(org.linphone.test.R.string.conference_account_login) + "@" + iContext.getString(org.linphone.test.R.string.conference_account_domain)); - solo.clickOnView(solo.getView(org.linphone.R.id.Call)); + solo.clickOnView(solo.getView(org.linphone.R.id.call)); solo.sleep(2000); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); waitForCallState(LinphoneTestManager.getLc(1).getCalls()[0],LinphoneCall.State.PausedByRemote); solo.clickOnView(solo.getView(org.linphone.R.id.pause)); @@ -137,7 +137,7 @@ public class ConferenceAndMultiCall extends SampleTest { waitForCallState(LinphoneTestManager.getLc(1).getCalls()[0],LinphoneCall.State.StreamsRunning); solo.sleep(1000); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.waitForActivity("LinphoneActivity", 5000); solo.assertCurrentActivity("Expected Linphone Activity", LinphoneActivity.class); @@ -149,22 +149,22 @@ public class ConferenceAndMultiCall extends SampleTest { LinphoneTestManager.getInstance().autoAnswer = true; // Just in case solo.enterText(0, iContext.getString(org.linphone.test.R.string.account_test_calls_login) + "@" + iContext.getString(org.linphone.test.R.string.account_test_calls_domain)); - solo.clickOnView(solo.getView(org.linphone.R.id.Call)); + solo.clickOnView(solo.getView(org.linphone.R.id.call)); assertCallIsCorrectlyRunning(1); LinphoneTestManager.getInstance().declineCall = true; solo.clickOnView(solo.getView(org.linphone.R.id.options)); - solo.clickOnView(solo.getView(org.linphone.R.id.addCall)); + solo.clickOnView(solo.getView(org.linphone.R.id.add_call)); solo.enterText(0, iContext.getString(org.linphone.test.R.string.conference_account_login) + "@" + iContext.getString(org.linphone.test.R.string.conference_account_domain)); - solo.clickOnView(solo.getView(org.linphone.R.id.Call)); + solo.clickOnView(solo.getView(org.linphone.R.id.call)); solo.sleep(2000); waitForCallState(LinphoneTestManager.getLc(1).getCalls()[0],LinphoneCall.State.PausedByRemote); solo.sleep(1000); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.waitForActivity("LinphoneActivity", 5000); solo.assertCurrentActivity("Expected Linphone Activity", LinphoneActivity.class); @@ -176,7 +176,7 @@ public class ConferenceAndMultiCall extends SampleTest { LinphoneTestManager.getInstance().declineCall = false; //Just in case solo.enterText(0, iContext.getString(org.linphone.test.R.string.account_test_calls_login) + "@" + iContext.getString(org.linphone.test.R.string.account_test_calls_domain)); - solo.clickOnView(solo.getView(org.linphone.R.id.Call)); + solo.clickOnView(solo.getView(org.linphone.R.id.call)); assertCallIsCorrectlyRunning(1); @@ -188,7 +188,7 @@ public class ConferenceAndMultiCall extends SampleTest { } solo.waitForActivity("IncomingCallActivity", 5000); - solo.assertCurrentActivity("Expected Incoming Call Activity", CallIncomingActivity.class); + solo.assertCurrentActivity("Expected Incoming call Activity", CallIncomingActivity.class); solo.sleep(1000); View topLayout = solo.getView(org.linphone.R.id.topLayout); @@ -202,7 +202,7 @@ public class ConferenceAndMultiCall extends SampleTest { assertCallIsCorrectlyRunning(1); solo.sleep(2000); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.waitForActivity("LinphoneActivity", 5000); solo.assertCurrentActivity("Expected Linphone Activity", LinphoneActivity.class); } @@ -210,7 +210,7 @@ public class ConferenceAndMultiCall extends SampleTest { @LargeTest public void testIIncomingCallWhileInCallAndAccept() { solo.enterText(0, iContext.getString(org.linphone.test.R.string.account_test_calls_login) + "@" + iContext.getString(org.linphone.test.R.string.account_test_calls_domain)); - solo.clickOnView(solo.getView(org.linphone.R.id.Call)); + solo.clickOnView(solo.getView(org.linphone.R.id.call)); assertCallIsCorrectlyRunning(1); @@ -222,7 +222,7 @@ public class ConferenceAndMultiCall extends SampleTest { } solo.waitForActivity("IncomingCallActivity", 5000); - solo.assertCurrentActivity("Expected Incoming Call Activity", CallIncomingActivity.class); + solo.assertCurrentActivity("Expected Incoming call Activity", CallIncomingActivity.class); solo.sleep(1000); View topLayout = solo.getView(org.linphone.R.id.topLayout); @@ -238,9 +238,9 @@ public class ConferenceAndMultiCall extends SampleTest { waitForCallState(call1,LinphoneCall.State.PausedByRemote); assertCallIsCorrectlyRunning(2); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.sleep(1000); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.waitForActivity("LinphoneActivity", 5000); solo.assertCurrentActivity("Expected Linphone Activity", LinphoneActivity.class); } @@ -254,14 +254,14 @@ public class ConferenceAndMultiCall extends SampleTest { private void startTwoCalls() { solo.enterText(0, iContext.getString(org.linphone.test.R.string.account_test_calls_login) + "@" + iContext.getString(org.linphone.test.R.string.account_test_calls_domain)); - solo.clickOnView(solo.getView(org.linphone.R.id.Call)); + solo.clickOnView(solo.getView(org.linphone.R.id.call)); assertCallIsCorrectlyRunning(1); solo.clickOnView(solo.getView(org.linphone.R.id.options)); - solo.clickOnView(solo.getView(org.linphone.R.id.addCall)); + solo.clickOnView(solo.getView(org.linphone.R.id.add_call)); solo.enterText(0, iContext.getString(org.linphone.test.R.string.conference_account_login) + "@" + iContext.getString(org.linphone.test.R.string.conference_account_domain)); - solo.clickOnView(solo.getView(org.linphone.R.id.Call)); + solo.clickOnView(solo.getView(org.linphone.R.id.call)); assertCallIsCorrectlyRunning(2); } @@ -288,7 +288,7 @@ public class ConferenceAndMultiCall extends SampleTest { while ((call.getState() == LinphoneCall.State.OutgoingProgress || call.getState() == LinphoneCall.State.IncomingReceived) && retry < 5) { solo.sleep(1000); retry++; - Log.w("Call in progress but not running, retry = " + retry); + Log.w("call in progress but not running, retry = " + retry); } waitForCallState(call, LinphoneCall.State.StreamsRunning); diff --git a/tests/src/org/linphone/test/Contacts.java b/tests/src/org/linphone/test/Contacts.java index 3d5e0dc4b..88a9775d1 100644 --- a/tests/src/org/linphone/test/Contacts.java +++ b/tests/src/org/linphone/test/Contacts.java @@ -23,7 +23,7 @@ public class Contacts extends SampleTest { goToHistory(); solo.clickOnView(solo.getView(org.linphone.R.id.detail)); - solo.clickOnView(solo.getView(org.linphone.R.id.contact_add)); + solo.clickOnView(solo.getView(org.linphone.R.id.add_contact)); solo.clickOnView(solo.getView(org.linphone.R.id.newContact)); Assert.assertTrue(solo.searchText(iContext.getString(org.linphone.test.R.string.account_test_calls_login) + "@" + iContext.getString(org.linphone.test.R.string.account_test_calls_domain))); diff --git a/tests/src/org/linphone/test/History.java b/tests/src/org/linphone/test/History.java index 77a9234ab..238683448 100644 --- a/tests/src/org/linphone/test/History.java +++ b/tests/src/org/linphone/test/History.java @@ -45,7 +45,7 @@ public class History extends SampleTest { Assert.assertEquals(1, LinphoneTestManager.getLc().getCallsNb()); waitForCallState(LinphoneTestManager.getLc().getCalls()[0],LinphoneCall.State.StreamsRunning); - solo.clickOnView(solo.getView(org.linphone.R.id.hangUp)); + solo.clickOnView(solo.getView(org.linphone.R.id.hang_up)); solo.waitForActivity("LinphoneActivity", 5000); solo.assertCurrentActivity("Expected Linphone Activity", LinphoneActivity.class); } diff --git a/tests/src/org/linphone/test/Transfer.java b/tests/src/org/linphone/test/Transfer.java index db1014f0c..28e6da62b 100644 --- a/tests/src/org/linphone/test/Transfer.java +++ b/tests/src/org/linphone/test/Transfer.java @@ -17,7 +17,7 @@ public class Transfer extends SampleTest { @LargeTest public void testACallTransfer() { solo.enterText(0, iContext.getString(org.linphone.test.R.string.account_test_calls_login) + "@" + iContext.getString(org.linphone.test.R.string.account_test_calls_domain)); - solo.clickOnView(solo.getView(org.linphone.R.id.Call)); + solo.clickOnView(solo.getView(org.linphone.R.id.call)); assertCallIsCorrectlyRunning(); @@ -27,7 +27,7 @@ public class Transfer extends SampleTest { solo.assertCurrentActivity("Expected Linphone Activity", LinphoneActivity.class); solo.enterText(0, iContext.getString(org.linphone.test.R.string.conference_account_login) + "@" + iContext.getString(org.linphone.test.R.string.conference_account_domain)); - solo.clickOnView(solo.getView(org.linphone.R.id.Call)); // Transfer button as the same id, only the image changes + solo.clickOnView(solo.getView(org.linphone.R.id.call)); // Transfer button as the same id, only the image changes solo.sleep(2000); Assert.assertTrue(LinphoneTestManager.getLc(1).getCallsNb() > 0); From baa19b60a625a1bcb3890e47d1097f523e8d446a Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Wed, 18 Nov 2015 12:59:41 +0100 Subject: [PATCH 31/56] Update linphone --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index 04397c885..d9a2fb2e0 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit 04397c885f8d0162fd00deb271c1ad01710e37b8 +Subproject commit d9a2fb2e083a327288902931042c46248fbac84e From fdd85c8b8305c95c5472153f8fb2b7d97149bc13 Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Thu, 19 Nov 2015 14:49:21 +0100 Subject: [PATCH 32/56] Update linphone --- submodules/linphone | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/submodules/linphone b/submodules/linphone index d9a2fb2e0..47662ce97 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit d9a2fb2e083a327288902931042c46248fbac84e +Subproject commit 47662ce97e0c3feb8eec53832c912f1d3acdf83b From 1a326030853a8b8ae9547e28b517a71937a3c8ee Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Thu, 19 Nov 2015 15:05:53 +0100 Subject: [PATCH 33/56] Add new icon for linphone notification --- res/drawable/status_level.xml | 2 +- src/org/linphone/LinphoneService.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/res/drawable/status_level.xml b/res/drawable/status_level.xml index 340186968..197cd4b3c 100644 --- a/res/drawable/status_level.xml +++ b/res/drawable/status_level.xml @@ -1,6 +1,6 @@ - + diff --git a/src/org/linphone/LinphoneService.java b/src/org/linphone/LinphoneService.java index ae99834b6..5634df505 100644 --- a/src/org/linphone/LinphoneService.java +++ b/src/org/linphone/LinphoneService.java @@ -155,7 +155,7 @@ public final class LinphoneService extends Service { bm = BitmapFactory.decodeResource(getResources(), R.drawable.linphone_logo); } catch (Exception e) { } - mNotif = Compatibility.createNotification(this, mNotificationTitle, "", R.drawable.status_level, R.drawable.logo_linphone_57x57, bm, mNotifContentIntent, true,notifcationsPriority); + mNotif = Compatibility.createNotification(this, mNotificationTitle, "", R.drawable.status_level, R.drawable.linphone_notification_icon, bm, mNotifContentIntent, true,notifcationsPriority); LinphoneManager.createAndStart(LinphoneService.this); From 41d998beb9ff1872c76d9d93aaa194fb6f6763be Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Thu, 19 Nov 2015 15:08:15 +0100 Subject: [PATCH 34/56] Clean settings and add orientation preference --- .../linphone_notification_icon.png | Bin 0 -> 10524 bytes res/values/non_localizable_custom.xml | 8 ++- res/values/non_localizable_strings.xml | 1 - res/values/strings.xml | 7 +++ res/xml/preferences.xml | 15 +---- src/org/linphone/LinphoneActivity.java | 2 +- .../linphone/LinphoneLauncherActivity.java | 6 +- src/org/linphone/SettingsFragment.java | 55 +++--------------- 8 files changed, 28 insertions(+), 66 deletions(-) create mode 100644 res/drawable-xhdpi/linphone_notification_icon.png diff --git a/res/drawable-xhdpi/linphone_notification_icon.png b/res/drawable-xhdpi/linphone_notification_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..fa36e433e24277e614fddfd9b0e6761937c9d5a6 GIT binary patch literal 10524 zcmeIYWmub0vnWbJfIyKHDNx)g6oOMcSh3<1Ez;t}-Ge*Dp@rg5C|;mQaS9X-?oKIg zp;+*f?r)!c@BMfF-9IPK^FCScWY)}@$y#G;qBYbM2=JcbVPIeoC@IQmVPF9K|2<%A zG-P-iV-WoXaMMzd!KfOc-bKIQIx8Bup^<0*JpdW@&)#SR16v(^cYW1YqUKHx+;1(M z-dS>cJ2<1UF)+lvMbSeCOZT_*-VXMTZlc~2jQ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)aI+;3~OkOugT+&Pf}xO zW2!-FkZJMqcrye2H5MO&lk3oEgopJ1pttD%HesP_ZU4VCqoHqL9*DX)8xlJTPc{Cv OEGo&X$yLdih5Rpg1ojI6 literal 0 HcmV?d00001 diff --git a/res/values/non_localizable_custom.xml b/res/values/non_localizable_custom.xml index 23c6d3942..fea153c50 100644 --- a/res/values/non_localizable_custom.xml +++ b/res/values/non_localizable_custom.xml @@ -1,13 +1,16 @@ - false - false sip.linphone.org stun.linphone.org + + + false + false false false false + false https://www.linphone.org/wizard.php @@ -70,7 +73,6 @@ false false false - false true diff --git a/res/values/non_localizable_strings.xml b/res/values/non_localizable_strings.xml index 8830a329b..6ef3b512f 100644 --- a/res/values/non_localizable_strings.xml +++ b/res/values/non_localizable_strings.xml @@ -36,7 +36,6 @@ pref_add_account_key pref_video_key pref_video_codecs_key - pref_linphone_friend_key pref_transport_key pref_transport_udp_key diff --git a/res/values/strings.xml b/res/values/strings.xml index 7a6d7845f..d1a4a95b7 100644 --- a/res/values/strings.xml +++ b/res/values/strings.xml @@ -85,6 +85,13 @@ Your correspondent paused the call ZRTP token is %s\nYou should only accept if you have the same token as your correspondent + + + default + high-fps + custom + + Toggle micro diff --git a/res/xml/preferences.xml b/res/xml/preferences.xml index e796b6d5b..2c96ad9ec 100644 --- a/res/xml/preferences.xml +++ b/res/xml/preferences.xml @@ -104,7 +104,9 @@ + android:key="@string/pref_video_preset_key" + android:entries="@array/video_preset_entries" + android:entryValues="@array/video_preset_entries" /> - - - - - - diff --git a/src/org/linphone/LinphoneActivity.java b/src/org/linphone/LinphoneActivity.java index a2cadcb97..5341568c6 100644 --- a/src/org/linphone/LinphoneActivity.java +++ b/src/org/linphone/LinphoneActivity.java @@ -135,7 +135,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta if (isTablet() && getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } else if (!isTablet() && getResources().getBoolean(R.bool.orientation_portrait_only)) { + } else if (getResources().getBoolean(R.bool.orientation_portrait_only)) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); } diff --git a/src/org/linphone/LinphoneLauncherActivity.java b/src/org/linphone/LinphoneLauncherActivity.java index 378ee9372..3dca406b9 100644 --- a/src/org/linphone/LinphoneLauncherActivity.java +++ b/src/org/linphone/LinphoneLauncherActivity.java @@ -52,9 +52,9 @@ public class LinphoneLauncherActivity extends Activity { // Hack to avoid to draw twice LinphoneActivity on tablets if (getResources().getBoolean(R.bool.isTablet)) { setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE); - } else { - setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); - } + } else if (getResources().getBoolean(R.bool.orientation_portrait_only)) { + setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT); + } setContentView(R.layout.launch_screen); mHandler = new Handler(); diff --git a/src/org/linphone/SettingsFragment.java b/src/org/linphone/SettingsFragment.java index 71fb78163..6fbbdab8a 100644 --- a/src/org/linphone/SettingsFragment.java +++ b/src/org/linphone/SettingsFragment.java @@ -28,7 +28,6 @@ import org.linphone.core.LinphoneCore.AdaptiveRateAlgorithm; import org.linphone.core.LinphoneCore.EcCalibratorStatus; import org.linphone.core.LinphoneCore.MediaEncryption; import org.linphone.core.LinphoneCoreException; -import org.linphone.core.LinphoneCoreFactory; import org.linphone.core.LinphoneCoreListenerBase; import org.linphone.core.LinphoneProxyConfig; import org.linphone.core.PayloadType; @@ -98,8 +97,6 @@ public class SettingsFragment extends PreferencesListFragment { // Inits the values or the listener on some settings private void initSettings() { - //Init accounts on Resume instead of on Create to update the account list when coming back from wizard - initTunnelSettings(); initAudioSettings(); initVideoSettings(); @@ -133,7 +130,7 @@ public class SettingsFragment extends PreferencesListFragment { emptyAndHidePreference(R.string.pref_sipaccounts_key); } - if(!getResources().getBoolean(R.bool.replace_wizard_with_old_interface)){ + if(!getResources().getBoolean(R.bool.replace_assistant_with_old_interface)){ hidePreference(R.string.pref_add_account_key); } @@ -141,10 +138,6 @@ public class SettingsFragment extends PreferencesListFragment { uncheckAndHidePreference(R.string.pref_animation_enable_key); } - if (!getResources().getBoolean(R.bool.enable_linphone_friends)) { - emptyAndHidePreference(R.string.pref_linphone_friend_key); - } - if (getResources().getBoolean(R.bool.disable_chat)) { findPreference(getString(R.string.pref_image_sharing_server_key)).setLayoutResource(R.layout.hidden); } @@ -320,13 +313,7 @@ public class SettingsFragment extends PreferencesListFragment { if (LinphoneManager.getLcIfManagerNotDestroyedOrNull() != null) { for (LinphoneProxyConfig lpc : LinphoneManager.getLc().getProxyConfigList()) { - LinphoneAddress addr = null; - try { - addr = LinphoneCoreFactory.instance().createLinphoneAddress(lpc.getIdentity()); - } catch (LinphoneCoreException e) { - me.setLed(R.drawable.led_disconnected); - return; - } + LinphoneAddress addr = lpc.getAddress(); if (addr.getUserName().equals(username) && addr.getDomain().equals(domain)) { if (lpc.getState() == LinphoneCore.RegistrationState.RegistrationOk) { me.setLed(R.drawable.led_connected); @@ -397,21 +384,6 @@ public class SettingsFragment extends PreferencesListFragment { pref.setValue(key); } - private void initializeVideoPresetPreferences(ListPreference pref) { - List entries = new ArrayList(); - List values = new ArrayList(); - entries.add("default"); - values.add("default"); - entries.add("high-fps"); - values.add("high-fps"); - entries.add("custom"); - values.add("custom"); - setListPreferenceValues(pref, entries, values); - String value = mPrefs.getVideoPreset(); - pref.setSummary(value); - pref.setValue(value); - } - private void initializePreferredVideoSizePreferences(ListPreference pref) { List entries = new ArrayList(); List values = new ArrayList(); @@ -581,7 +553,6 @@ public class SettingsFragment extends PreferencesListFragment { } private void initVideoSettings() { - initializeVideoPresetPreferences((ListPreference) findPreference(getString(R.string.pref_video_preset_key))); initializePreferredVideoSizePreferences((ListPreference) findPreference(getString(R.string.pref_preferred_video_size_key))); initializePreferredVideoFpsPreferences((ListPreference) findPreference(getString(R.string.pref_preferred_video_fps_key))); EditTextPreference bandwidth = (EditTextPreference) findPreference(getString(R.string.pref_bandwidth_limit_key)); @@ -589,6 +560,10 @@ public class SettingsFragment extends PreferencesListFragment { bandwidth.setSummary(bandwidth.getText()); updateVideoPreferencesAccordingToPreset(); + ListPreference videoPresetPref = (ListPreference) findPreference(getString(R.string.pref_video_preset_key)); + videoPresetPref.setSummary(mPrefs.getVideoPreset()); + videoPresetPref.setValue(mPrefs.getVideoPreset()); + PreferenceCategory codecs = (PreferenceCategory) findPreference(getString(R.string.pref_video_codecs_key)); codecs.removeAll(); @@ -630,7 +605,6 @@ public class SettingsFragment extends PreferencesListFragment { ((CheckBoxPreference) findPreference(getString(R.string.pref_video_enable_key))).setChecked(mPrefs.isVideoEnabled()); ((CheckBoxPreference) findPreference(getString(R.string.pref_video_use_front_camera_key))).setChecked(mPrefs.useFrontCam()); ((CheckBoxPreference) findPreference(getString(R.string.pref_video_initiate_call_with_video_key))).setChecked(mPrefs.shouldInitiateVideoCall()); - //((CheckBoxPreference) findPreference(getString(R.string.pref_video_automatically_share_my_video_key))).setChecked(mPrefs.shouldAutomaticallyShareMyVideo()); ((CheckBoxPreference) findPreference(getString(R.string.pref_video_automatically_accept_video_key))).setChecked(mPrefs.shouldAutomaticallyAcceptVideoRequests()); } @@ -642,14 +616,14 @@ public class SettingsFragment extends PreferencesListFragment { findPreference(getString(R.string.pref_preferred_video_fps_key)).setEnabled(false); findPreference(getString(R.string.pref_bandwidth_limit_key)).setEnabled(false); } - ((ListPreference) findPreference(getString(R.string.pref_video_preset_key))).setSummary(mPrefs.getVideoPreset()); + findPreference(getString(R.string.pref_video_preset_key)).setSummary(mPrefs.getVideoPreset()); int fps = mPrefs.getPreferredVideoFps(); String fpsStr = Integer.toString(fps); if (fpsStr.equals("0")) { fpsStr = "none"; } - ((ListPreference) findPreference(getString(R.string.pref_preferred_video_fps_key))).setSummary(fpsStr); - ((EditTextPreference) findPreference(getString(R.string.pref_bandwidth_limit_key))).setSummary(Integer.toString(mPrefs.getBandwidthLimit())); + findPreference(getString(R.string.pref_preferred_video_fps_key)).setSummary(fpsStr); + findPreference(getString(R.string.pref_bandwidth_limit_key)).setSummary(Integer.toString(mPrefs.getBandwidthLimit())); } private void setVideoPreferencesListener() { @@ -680,17 +654,6 @@ public class SettingsFragment extends PreferencesListFragment { } }); - /* - findPreference(getString(R.string.pref_video_automatically_share_my_video_key)).setOnPreferenceChangeListener(new OnPreferenceChangeListener() { - @Override - public boolean onPreferenceChange(Preference preference, Object newValue) { - boolean enable = (Boolean) newValue; - mPrefs.setAutomaticallyShareMyVideo(enable); - return true; - } - }); - */ - findPreference(getString(R.string.pref_video_automatically_accept_video_key)).setOnPreferenceChangeListener(new OnPreferenceChangeListener() { @Override public boolean onPreferenceChange(Preference preference, Object newValue) { From 92939a7028f76bba31caf323c4567041bc90fbeb Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Thu, 19 Nov 2015 15:09:41 +0100 Subject: [PATCH 35/56] Add database for calllogs --- src/org/linphone/HistoryListFragment.java | 60 ----------------------- src/org/linphone/LinphoneManager.java | 3 ++ 2 files changed, 3 insertions(+), 60 deletions(-) diff --git a/src/org/linphone/HistoryListFragment.java b/src/org/linphone/HistoryListFragment.java index af7088648..492155c65 100644 --- a/src/org/linphone/HistoryListFragment.java +++ b/src/org/linphone/HistoryListFragment.java @@ -315,66 +315,6 @@ public class HistoryListFragment extends Fragment implements OnClickListener, On } } - private void hideDeleteAllButton() { - if (delete == null || delete.getVisibility() != View.VISIBLE) { - return; - } - - if (LinphoneActivity.instance().isAnimationDisabled()) { - delete.setVisibility(View.INVISIBLE); - } else { - Animation animation = AnimationUtils.loadAnimation(getActivity(), R.anim.slide_out_right_to_left); - animation.setAnimationListener(new AnimationListener() { - @Override - public void onAnimationStart(Animation animation) { - - } - - @Override - public void onAnimationRepeat(Animation animation) { - - } - - @Override - public void onAnimationEnd(Animation animation) { - delete.setVisibility(View.INVISIBLE); - animation.setAnimationListener(null); - } - }); - delete.startAnimation(animation); - } - } - - private void showDeleteAllButton() { - if (delete == null || delete.getVisibility() == View.VISIBLE) { - return; - } - - if (LinphoneActivity.instance().isAnimationDisabled()) { - delete.setVisibility(View.VISIBLE); - } else { - Animation animation = AnimationUtils.loadAnimation(getActivity(), R.anim.slide_in_left_to_right); - animation.setAnimationListener(new AnimationListener() { - @Override - public void onAnimationStart(Animation animation) { - - } - - @Override - public void onAnimationRepeat(Animation animation) { - - } - - @Override - public void onAnimationEnd(Animation animation) { - delete.setVisibility(View.VISIBLE); - animation.setAnimationListener(null); - } - }); - delete.startAnimation(animation); - } - } - public void quitEditMode(){ isEditMode = false; editList.setVisibility(View.GONE); diff --git a/src/org/linphone/LinphoneManager.java b/src/org/linphone/LinphoneManager.java index ffb40469b..cce6518c5 100644 --- a/src/org/linphone/LinphoneManager.java +++ b/src/org/linphone/LinphoneManager.java @@ -649,6 +649,7 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag mLc.setRootCA(mLinphoneRootCaFile); mLc.setPlayFile(mPauseSoundFile); mLc.setChatDatabasePath(mChatDatabaseFile); + mLc.setCallLogsDatabasePath(mCallLogDatabaseFile); //mLc.setCallErrorTone(Reason.NotFound, mErrorToneFile); int availableCores = Runtime.getRuntime().availableProcessors(); @@ -658,6 +659,8 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag int migrationResult = getLc().migrateToMultiTransport(); Log.d("Migration to multi transport result = " + migrationResult); + mLc.migrateCallLogs(); + if (mServiceContext.getResources().getBoolean(R.bool.enable_push_id)) { Compatibility.initPushNotificationService(mServiceContext); } From a836e839b334a7ecbbf44a1730846a7be4cba23a Mon Sep 17 00:00:00 2001 From: Margaux Clerc Date: Fri, 20 Nov 2015 16:49:14 +0100 Subject: [PATCH 36/56] Update the chat view --- res/drawable-xhdpi/resizable_textfield.9.png | Bin 366 -> 223 bytes res/layout/chat.xml | 115 ++--- res/layout/chat_bubble_incoming.xml | 160 +++--- res/layout/chat_bubble_outgoing.xml | 25 +- res/layout/search_contact_cell.xml | 18 +- res/values/styles.xml | 6 +- src/org/linphone/ChatFragment.java | 483 +++++++------------ src/org/linphone/LinphoneManager.java | 7 +- src/org/linphone/ui/BubbleChat.java | 21 +- 9 files changed, 345 insertions(+), 490 deletions(-) diff --git a/res/drawable-xhdpi/resizable_textfield.9.png b/res/drawable-xhdpi/resizable_textfield.9.png index 0b657db887b19410ad5460c23f91d0ba91663f33..51ad75cf4f31940a9af089ecde7f16b03195d942 100644 GIT binary patch delta 196 zcmaFIbf0m8ay<>&kwg zTbN&tJBU9g04S8>>Eaj?aro^GL#_i394>*r_TTMSup5Lrt=iyyXx*XtQ6Cx;4D;T5 zMhnZ!b##QTSn2UeI!g5C5xHwB4vkE#TwknBq-`xGUuI_I643})02V6|z9Mar`MH6K qHA+frrOuB{XYGFP=id78ue!D~&*FK#%9DT=GkCiCxvXSiicELap=+HhKUBPoN+P zD2SDvii)X{VzMJyi3lO2c<$rPz`xlQ=ErpFD9Y~z7s}s@G4`PA`kP@GAVV}wdsS8S zeuuOy>xo~y;|H$mLYk&fRTZ>td(o6-x%PG(XT|ctEgbu}L4P^2!HXaWV45aamgUr- z0WIH?Z8j(#c%BFIJfDsfL5uJED|QFX^IRIFNS0+sXy5nJLA$OyLS;jW5R{dzz2E^WR91A2c#?+sSkvl%s7qL1)ux;C? m1bYhyH$9_G`A40$2>Sy6EL~Y{1qzh_0000 + android:layout_height="60dp"> @@ -26,7 +24,7 @@ android:src="@drawable/edit_list_button" android:background="@drawable/toolbar_button" android:contentDescription="@string/content_description_edit" - android:layout_width="70dp" + android:layout_width="60dp" android:layout_height="match_parent" android:layout_alignParentRight="true" android:padding="15dp"/> @@ -37,7 +35,7 @@ android:background="@drawable/toolbar_button" android:contentDescription="@string/content_description_call" android:layout_toLeftOf="@id/edit" - android:layout_width="70dp" + android:layout_width="60dp" android:layout_height="match_parent" android:padding="15dp"/> @@ -45,9 +43,8 @@ android:id="@+id/back_to_call" android:src="@drawable/call_back" android:background="@drawable/toolbar_button" - android:contentDescription="@string/content_description_call" android:layout_toLeftOf="@id/edit" - android:layout_width="70dp" + android:layout_width="60dp" android:layout_height="match_parent" android:visibility="gone" android:padding="15dp"/> @@ -61,100 +58,92 @@ android:layout_height="match_parent" android:layout_toRightOf="@id/back" android:layout_toLeftOf="@id/start_call" - android:paddingLeft="10dp" - android:gravity="center_vertical"/> + android:gravity="center_vertical" + android:paddingLeft="5dp"/> + android:layout_alignParentBottom="true"> - - - + android:layout_height="wrap_content" /> + android:layout_gravity="center_vertical"/> - + + - + \ No newline at end of file diff --git a/res/layout/chat_bubble_incoming.xml b/res/layout/chat_bubble_incoming.xml index edcc08feb..b4cabbd4f 100644 --- a/res/layout/chat_bubble_incoming.xml +++ b/res/layout/chat_bubble_incoming.xml @@ -4,106 +4,94 @@ android:layout_width="wrap_content" android:layout_height="wrap_content" android:gravity="left" - android:orientation="horizontal" > + android:orientation="horizontal"> - - - - - - - - - - - - - - - - - - + -