From 572bcb8cf453f66d9e0b6e979572ca9fcc933c40 Mon Sep 17 00:00:00 2001 From: Sylvain Berfini Date: Wed, 25 Jul 2012 16:46:45 +0200 Subject: [PATCH] Improved layouts + pause fix --- res/layout/active_call.xml | 16 ++++++++-------- res/layout/chat.xml | 20 +++++++++----------- res/layout/chatlist.xml | 12 ++++++++---- res/layout/contacts_list.xml | 12 ++++++++---- res/layout/history.xml | 14 ++++++++++---- src/org/linphone/LinphoneService.java | 11 ++++++++--- submodules/linphone | 2 +- 7 files changed, 52 insertions(+), 35 deletions(-) diff --git a/res/layout/active_call.xml b/res/layout/active_call.xml index a729896da..d2da148ba 100644 --- a/res/layout/active_call.xml +++ b/res/layout/active_call.xml @@ -14,29 +14,29 @@ @@ -35,9 +34,9 @@ + android:layout_height="0dip"> @@ -61,19 +59,19 @@ android:id="@+id/message" android:inputType="textMultiLine" android:textColor="@android:color/black" - android:layout_width="match_parent" + android:layout_weight="1" + android:layout_width="0dip" android:layout_height="match_parent" - android:layout_weight="0.21" android:background="@drawable/chat_message_background" android:padding="15dp"/> diff --git a/res/layout/chatlist.xml b/res/layout/chatlist.xml index 9b894bf40..cd48231e3 100644 --- a/res/layout/chatlist.xml +++ b/res/layout/chatlist.xml @@ -7,8 +7,7 @@ @@ -43,7 +48,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:divider="@android:color/darker_gray" - android:dividerHeight="1dp" - android:layout_weight="0.13" /> + android:dividerHeight="1dp" /> \ No newline at end of file diff --git a/res/layout/contacts_list.xml b/res/layout/contacts_list.xml index a2568bb40..0c2294298 100644 --- a/res/layout/contacts_list.xml +++ b/res/layout/contacts_list.xml @@ -7,8 +7,7 @@ + android:layout_height="match_parent"> @@ -51,7 +58,6 @@ android:layout_width="match_parent" android:layout_height="match_parent" android:divider="@android:color/darker_gray" - android:dividerHeight="1dp" - android:layout_weight="0.13" /> + android:dividerHeight="1dp" /> \ No newline at end of file diff --git a/src/org/linphone/LinphoneService.java b/src/org/linphone/LinphoneService.java index 06740e2b0..72cdb1850 100644 --- a/src/org/linphone/LinphoneService.java +++ b/src/org/linphone/LinphoneService.java @@ -226,9 +226,14 @@ public final class LinphoneService extends Service implements LinphoneServiceLis throw new IllegalArgumentException("Unknown state " + state); } - String userName = LinphoneManager.getLc().getCurrentCall().getRemoteAddress().getUserName(); - String domain = LinphoneManager.getLc().getCurrentCall().getRemoteAddress().getDomain(); - String displayName = LinphoneManager.getLc().getCurrentCall().getRemoteAddress().getDisplayName(); + if (LinphoneManager.getLc().getCallsNb() == 0) { + return; + } + + LinphoneCall call = LinphoneManager.getLc().getCalls()[0]; + String userName = call.getRemoteAddress().getUserName(); + String domain = call.getRemoteAddress().getDomain(); + String displayName = call.getRemoteAddress().getDisplayName(); LinphoneAddress address = LinphoneCoreFactoryImpl.instance().createLinphoneAddress("sip:" + userName + "@" + domain); address.setDisplayName(displayName); diff --git a/submodules/linphone b/submodules/linphone index c4bf7958a..46a389518 160000 --- a/submodules/linphone +++ b/submodules/linphone @@ -1 +1 @@ -Subproject commit c4bf7958ab6272155547c1f12e06189e1f84275c +Subproject commit 46a38951859ad9401d652ca8793b4b12dd4cf6e3