Merge remote-tracking branch 'linphone-android/master' into obiane

Conflicts:
	res/drawable-xhdpi/checkbox_checked.png
	res/drawable-xhdpi/checkbox_unchecked.png
	res/drawable-xhdpi/resizable_textfield.9.png
	res/drawable/avatar_mask_chat.xml
	res/layout/about.xml
	res/layout/call.xml
	res/layout/call_inactive_row.xml
	res/layout/chat.xml
	res/layout/chat_bubble_incoming.xml
	res/layout/chat_bubble_outgoing.xml
	res/layout/chatlist.xml
	res/layout/contact.xml
	res/layout/contacts_list.xml
	res/layout/dialer.xml
	res/layout/history.xml
	res/layout/history_detail.xml
	res/layout/main.xml
	res/layout/search_contact_cell.xml
	res/layout/side_menu_account_cell.xml
	res/layout/side_menu_item_cell.xml
	res/layout/side_menu_main_account.xml
	res/values/non_localizable_custom.xml
	res/values/strings.xml
	res/values/styles.xml
	src/org/linphone/ChatFragment.java
	src/org/linphone/ContactsListFragment.java
	src/org/linphone/DialerFragment.java
	src/org/linphone/HistoryDetailFragment.java
	src/org/linphone/LinphoneActivity.java
	src/org/linphone/LinphoneService.java
This commit is contained in:
Margaux Clerc 2015-11-30 14:29:14 +01:00
commit 8793a506e3
110 changed files with 2546 additions and 1893 deletions

5
.gitmodules vendored
View file

@ -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
url = git://git.linphone.org/mscodec2.git

View file

@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.linphone"
android:versionCode="2599" android:installLocation="auto">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22"/>
android:versionCode="2599" android:installLocation="auto">
<uses-sdk android:minSdkVersion="14" android:targetSdkVersion="23"/>
<!-- Permissions for Push Notification -->
<permission android:name="org.linphone.permission.C2D_MESSAGE" android:protectionLevel="signature" /> <!-- Change package ! -->
<uses-permission android:name="org.linphone.permission.C2D_MESSAGE" /> <!-- Change package ! -->
@ -127,7 +128,7 @@
<activity android:name=".assistant.AssistantActivity"
android:theme="@style/NoTitle"
android:screenOrientation="nosensor">
android:screenOrientation="behind">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
</intent-filter>

View file

@ -43,7 +43,7 @@ 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
@ -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)
@ -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/ && \
@ -457,7 +454,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 && \

View file

@ -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

View file

@ -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);

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

View file

Before

Width:  |  Height:  |  Size: 9.7 KiB

After

Width:  |  Height:  |  Size: 9.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 10 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.7 KiB

View file

@ -1,4 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<bitmap
xmlns:android="http://schemas.android.com/apk/res/android"
android:src="@drawable/backspace"/>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 978 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 402 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 575 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 684 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 87 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<level-list xmlns:android="http://schemas.android.com/apk/res/android">
<item android:maxLevel="0" android:drawable="@drawable/linphone_logo" />
<item android:maxLevel="1" android:drawable="@drawable/status_green" />
<item android:maxLevel="2" android:drawable="@drawable/status_red" />
<item android:maxLevel="3" android:drawable="@drawable/status_offline" />
<item android:maxLevel="0" android:drawable="@drawable/linphone_notification_icon" />
<item android:maxLevel="1" android:drawable="@drawable/linphone_notification_icon" />
<item android:maxLevel="2" android:drawable="@drawable/linphone_notification_icon" />
<item android:maxLevel="3" android:drawable="@drawable/linphone_notification_icon" />
</level-list>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.4 KiB

View file

@ -0,0 +1,133 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<TextView
android:text="@string/assistant_linphone_account_title"
android:contentDescription="@string/content_description_welcome"
style="@style/font6"
android:textAllCaps="true"
android:padding="5dp"
android:layout_gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="center_horizontal"/>
<TableLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="horizontal">
<TableRow
android:layout_weight="1"
android:gravity="center">
<TextView
android:text="@string/username"
style="@style/font13"
android:textAllCaps="true"
android:layout_marginLeft="5dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:text="@string/password"
style="@style/font13"
android:textAllCaps="true"
android:layout_marginLeft="5dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</TableRow>
<TableRow
android:layout_weight="1"
android:gravity="center">
<EditText
android:id="@+id/assistant_username"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:inputType="textEmailAddress"
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_weight="1"
android:layout_margin="5dp"
android:singleLine="true"/>
<EditText
android:id="@+id/assistant_password"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:inputType="textPassword"
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_weight="1"
android:layout_margin="5dp"
android:singleLine="true"/>
</TableRow>
<TableRow
android:layout_weight="1"
android:gravity="center">
<TextView
android:text="@string/assistant_display_name"
style="@style/font13"
android:textAllCaps="true"
android:layout_marginLeft="5dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
<TextView
android:layout_margin="5dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</TableRow>
<TableRow
android:layout_weight="1"
android:gravity="center">
<EditText
android:id="@+id/assistant_display_name"
android:background="@drawable/resizable_textfield"
android:textColor="@color/colorB"
android:textCursorDrawable="@null"
android:inputType="textEmailAddress"
android:layout_width="0dp"
android:layout_height="30dp"
android:layout_weight="1"
android:layout_margin="5dp"
android:singleLine="true"/>
<TextView
android:layout_margin="5dp"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_weight="1"/>
</TableRow>
</TableLayout>
<Button
android:id="@+id/assistant_apply"
android:text="@string/assistant_login"
android:background="@drawable/assistant_button"
style="@style/font8"
android:contentDescription="@string/content_description_validate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_gravity="center_horizontal"/>
</LinearLayout>

463
res/layout-land/call.xml Normal file
View file

@ -0,0 +1,463 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
android:layout_width="match_parent"
android:layout_height="35dp"
tools:layout="@layout/status" />
<android.support.v4.widget.DrawerLayout
android:id="@+id/side_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/status">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/status">
<LinearLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" />
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@+id/menu">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/conference_list"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:layout_alignParentTop="true"
android:orientation="vertical"
android:visibility="gone">
</LinearLayout>
<RelativeLayout
android:id="@+id/active_call"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="visible">
<LinearLayout
android:id="@+id/active_call_info"
android:background="@color/colorH"
android:alpha="0.8"
android:paddingBottom="10dp"
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center_horizontal"
android:orientation="horizontal">
<TextView
android:id="@+id/current_contact_name"
style="@style/font5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"/>
<Chronometer
android:id="@+id/current_call_timer"
style="@style/font2"
android:layout_marginLeft="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="bottom"/>
</LinearLayout>
<RelativeLayout
android:id="@+id/avatar_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_below="@id/active_call_info"
android:layout_margin="5dp"
android:paddingTop="10dp"
android:gravity="center_horizontal">
<ImageView
android:id="@+id/contact_picture"
android:src="@drawable/avatar"
android:contentDescription="@string/content_description_contact_picture"
android:layout_width="150dp"
android:layout_height="150dp"
android:adjustViewBounds="true"/>
<ImageView
android:id="@+id/mask"
android:src="@drawable/avatar_mask_border"
android:contentDescription="@string/content_description_contact_picture"
android:layout_width="150dp"
android:layout_height="150dp"
android:adjustViewBounds="true"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/remote_pause"
android:background="@color/colorC"
android:alpha="0.9"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<ImageView
android:src="@drawable/waiting_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
<TextView
android:text="@string/call_paused_by_remote"
style="@style/font16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</LinearLayout>
<ImageView
android:id="@+id/pause"
android:src="@drawable/pause_big_default"
android:contentDescription="@string/content_description_pause"
android:layout_width="80dp"
android:layout_height="80dp"
android:padding="10dp"
android:layout_below="@+id/active_call_info"
android:layout_alignParentRight="true"/>
<ImageView
android:id="@+id/switchCamera"
android:src="@drawable/switch_camera"
android:layout_width="80dp"
android:layout_height="80dp"
android:padding="10dp"
android:contentDescription="@string/content_description_switch_camera"
android:visibility="invisible"
android:layout_below="@+id/active_call_info"
android:layout_alignParentLeft="true"/>
</RelativeLayout>
<LinearLayout
android:id="@+id/calls_list"
android:background="@color/colorH"
android:layout_width="match_parent"
android:layout_weight="0.5"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/no_current_call"
android:background="@color/colorC"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_above="@id/calls_list"
android:gravity="center_vertical"
android:visibility="gone">
<ImageView
android:src="@drawable/waiting_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
<TextView
android:text="@string/no_current_call"
style="@style/font16"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</LinearLayout>
</RelativeLayout>
</FrameLayout>
<org.linphone.ui.Numpad
android:id="@+id/numpad"
android:background="@color/colorF"
android:contentDescription="@string/content_description_numpad"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_margin="10dp"
android:layout_above="@id/menu"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"/>
<LinearLayout
android:id="@+id/menu"
android:layout_width="wrap_content"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
<LinearLayout
android:id="@+id/main_bar"
android:background="@color/colorF"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_weight="1"
android:orientation="horizontal">
<ImageView
android:id="@+id/dialer"
android:src="@drawable/footer_dialer"
android:background="@color/colorC"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="20dp" />
<ImageView
android:id="@+id/hang_up"
android:src="@drawable/call_hangup"
android:background="@drawable/hangup"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:padding="15dp"/>
<ImageView
android:id="@+id/chat"
android:src="@drawable/footer_chat"
android:background="@color/colorC"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="18dp"/>
</LinearLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_weight="1"
android:orientation="horizontal">
<RelativeLayout
android:background="@drawable/button_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/video"
android:src="@drawable/camera_default"
android:background="@drawable/button_background"
android:padding="22dp"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ProgressBar
android:id="@+id/video_in_progress"
style="?android:attr/progressBarStyle"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>
<ImageView
android:id="@+id/micro"
android:src="@drawable/micro_default"
android:background="@drawable/button_background"
android:padding="15dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<ImageView
android:id="@+id/speaker"
android:src="@drawable/speaker_default"
android:background="@drawable/button_background"
android:padding="18dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageView
android:id="@+id/audio_route"
android:src="@drawable/routes_default"
android:background="@drawable/button_background"
android:visibility="gone"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageView
android:id="@+id/options"
android:src="@drawable/options_default"
android:background="@drawable/button_background"
android:padding="18dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/menu_bottom"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/menu"
android:orientation="horizontal" android:layout_alignParentLeft="true"
android:layout_alignParentStart="true">
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="1"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="1"/>
<ImageView
android:id="@+id/route_bluetooth"
android:src="@drawable/route_bluetooth"
android:background="@drawable/button_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.4" />
<ImageView
android:id="@+id/add_call"
android:src="@drawable/options_add_call"
android:background="@drawable/button_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.4" />
</LinearLayout>
<LinearLayout
android:id="@+id/menu_middle"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_above="@id/menu_bottom"
android:orientation="horizontal" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="1"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="1"/>
<ImageView
android:id="@+id/route_earpiece"
android:src="@drawable/route_earpiece"
android:background="@drawable/button_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.4"/>
<ImageView
android:id="@+id/transfer"
android:src="@drawable/options_transfer_call"
android:background="@drawable/button_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.4"/>
</LinearLayout>
<LinearLayout
android:layout_above="@id/menu_middle"
android:layout_width="match_parent"
android:layout_height="60dp"
android:orientation="horizontal" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="1"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="1"/>
<ImageView
android:id="@+id/route_speaker"
android:src="@drawable/route_speaker"
android:background="@drawable/button_background"
android:visibility="invisible"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.4"/>
<ImageView
android:id="@+id/conference"
android:src="@drawable/options_start_conference"
android:background="@drawable/button_background"
android:visibility="invisible"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1.4"/>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/side_menu_content"
android:background="@color/colorH"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="left">
<include layout="@layout/incall_stats" android:id="@+id/incall_stats"/>
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</RelativeLayout>

View file

@ -0,0 +1,193 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorH">
<fragment
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
android:layout_width="match_parent"
android:layout_height="40dp"
tools:layout="@layout/status" />
<RelativeLayout
android:id="@+id/top_bar"
android:background="@color/colorF"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="@id/status">
<TextView
android:text="@string/incoming_call"
style="@style/font1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/contact_detail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/top_bar"
android:paddingTop="10dp"
android:layout_above="@+id/menu">
<LinearLayout
android:orientation="horizontal"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/avatar_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:gravity="center">
<ImageView
android:id="@+id/contact_picture"
android:src="@drawable/avatar"
android:contentDescription="@string/content_description_contact_picture"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"/>
<ImageView
android:src="@drawable/avatar_mask_border"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_alignParentTop="true"/>
</RelativeLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical">
<TextView
android:id="@+id/contact_name"
style="@style/font5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:paddingTop="5dp"/>
<TextView
android:id="@+id/contact_number"
style="@style/font2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/contact_name"
android:layout_gravity="center"
android:layout_centerHorizontal="true"
android:paddingBottom="10dp"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<LinearLayout
android:id="@+id/menu"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:orientation="horizontal" >
<ImageView
android:id="@+id/decline"
android:src="@drawable/call_hangup"
android:background="@drawable/hangup"
android:contentDescription="@string/content_description_decline"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="15dp"/>
<LinearLayout
android:id="@+id/acceptUnlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:orientation="horizontal"
android:background="@color/colorA"
android:paddingLeft="15dp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:layout_gravity="bottom">
<ImageView
android:src="@drawable/arrow_accept"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ImageView
android:src="@drawable/arrow_accept"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.6"/>
<ImageView
android:id="@+id/acceptArrow"
android:src="@drawable/arrow_accept"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.2"/>
</LinearLayout>
<ImageView
android:id="@+id/accept"
android:src="@drawable/call_audio_start"
android:background="@drawable/call"
android:contentDescription="@string/content_description_accept"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="15dp"/>
<LinearLayout
android:id="@+id/declineUnlock"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:orientation="horizontal"
android:background="@color/colorD"
android:paddingLeft="15dp"
android:paddingTop="15dp"
android:paddingBottom="15dp"
android:layout_gravity="bottom">
<ImageView
android:id="@+id/arrow_hangup"
android:src="@drawable/arrow_hangup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.2"/>
<ImageView
android:src="@drawable/arrow_hangup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:alpha="0.6"/>
<ImageView
android:src="@drawable/arrow_hangup"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>

View file

@ -0,0 +1,149 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
android:id="@+id/topLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorH">
<fragment
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
tools:layout="@layout/status"
android:layout_width="match_parent"
android:layout_height="40dp"/>
<RelativeLayout
android:id="@+id/top_bar"
android:background="@color/colorF"
android:layout_width="match_parent"
android:layout_height="50dp"
android:layout_below="@id/status">
<TextView
android:text="@string/outgoing_call"
style="@style/font1"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="10dp"
android:gravity="center"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/contact_detail"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_above="@id/menu"
android:layout_below="@id/top_bar"
android:paddingTop="10dp">
<LinearLayout
android:orientation="horizontal"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<RelativeLayout
android:id="@+id/avatar_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="5dp"
android:gravity="center">
<ImageView
android:id="@+id/contact_picture"
android:src="@drawable/avatar"
android:contentDescription="@string/content_description_contact_picture"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"/>
<ImageView
android:src="@drawable/avatar_mask_border"
android:layout_width="200dp"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_alignParentTop="true"/>
</RelativeLayout>
<LinearLayout
android:orientation="vertical"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center_vertical">
<TextView
android:id="@+id/contact_name"
style="@style/font5"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true"
android:paddingTop="5dp"/>
<TextView
android:id="@+id/contact_number"
style="@style/font2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/contact_name"
android:layout_gravity="center"
android:layout_centerHorizontal="true"
android:paddingBottom="10dp"/>
</LinearLayout>
</LinearLayout>
</RelativeLayout>
<org.linphone.mediastream.video.display.GL2JNIView
android:id="@+id/videoSurface"
android:layout_width="match_parent"
android:layout_height="0dip"
android:layout_weight="1"
android:visibility="gone" />
<LinearLayout
android:id="@+id/menu"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:layout_alignParentLeft="true"
android:orientation="horizontal" >
<ImageView
android:id="@+id/micro"
android:src="@drawable/micro_default"
android:background="@drawable/button_background"
android:contentDescription="@string/content_description_toggle_micro"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="15dp"/>
<ImageView
android:id="@+id/speaker"
android:src="@drawable/speaker_default"
android:background="@drawable/button_background"
android:contentDescription="@string/content_description_toggle_speaker"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="20dp"/>
<ImageView
android:id="@+id/hang_up"
android:src="@drawable/call_hangup"
android:background="@drawable/hangup"
android:contentDescription="@string/content_description_hang_up"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.7"
android:padding="15dp"/>
</LinearLayout>
</RelativeLayout>

View file

@ -0,0 +1,127 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="60dp"
android:gravity="center_vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp"
android:paddingTop="5dp"
android:background="@drawable/list_selector">
<CheckBox
android:id="@+id/delete"
android:button="@drawable/checkbox"
android:contentDescription="@string/content_description_delete"
android:paddingRight="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:adjustViewBounds="true"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:visibility="invisible" />
<TextView
android:id="@+id/draft"
android:visibility="gone"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:textColor="@color/colorB"
android:text="@string/draft"
android:layout_marginLeft="5dp"
android:layout_marginRight="5dp" />
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_centerVertical="true"
android:layout_toLeftOf="@id/draft"
android:orientation="horizontal">
<RelativeLayout
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center">
<RelativeLayout
android:id="@+id/avatar_layout"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_centerHorizontal="true">
<ImageView
android:id="@+id/contact_picture"
android:src="@drawable/avatar"
android:contentDescription="@string/content_description_contact_picture"
android:layout_width="35dp"
android:layout_height="35dp"
android:adjustViewBounds="true"/>
<ImageView
android:id="@+id/mask"
android:src="@drawable/avatar_mask"
android:contentDescription="@string/content_description_contact_picture"
android:layout_width="35dp"
android:layout_height="35dp"
android:adjustViewBounds="true"/>
</RelativeLayout>
</RelativeLayout>
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:paddingLeft="10dp">
<TextView
android:id="@+id/date"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="5dp"
android:singleLine="true"
style="@style/font2"/>
<TextView
android:id="@+id/sipUri"
android:lines="1"
android:ellipsize="marquee"
android:marqueeRepeatLimit="marquee_forever"
android:scrollHorizontally="true"
android:fadingEdge="horizontal"
android:singleLine="true"
style="@style/font6"
android:paddingLeft="10dp"
android:layout_marginTop="5dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/date"
android:layout_marginRight="30dp"/>
<TextView
android:id="@+id/unreadMessages"
android:layout_width="25dp"
android:layout_height="25dp"
android:background="@drawable/chat_list_indicator"
style="@style/font18"
android:gravity="center"
android:singleLine="true"
android:layout_above="@+id/lastMessage"
android:layout_alignParentRight="true"
android:layout_alignParentEnd="true"/>
<TextView
android:id="@+id/lastMessage"
android:maxLines="2"
android:ellipsize="end"
android:layout_below="@id/sipUri"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
style="@style/font11"/>
</RelativeLayout>
</LinearLayout>
</RelativeLayout>

274
res/layout-land/main.xml Normal file
View file

@ -0,0 +1,274 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout
xmlns:tools="http://schemas.android.com/tools"
xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
android:layout_width="match_parent"
android:layout_height="35dp"
tools:layout="@layout/status" />
<android.support.v4.widget.DrawerLayout
android:id="@+id/side_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/status">
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/top_bar"
android:background="@color/colorF"
android:layout_width="match_parent"
android:layout_height="60dp"
android:visibility="gone"
android:layout_alignParentTop="true">
<TextView
android:id="@+id/menu_name"
android:text="@string/settings"
style="@style/font1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center_vertical"/>
<ImageView
android:id="@+id/cancel"
android:src="@drawable/dialer_back"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="15dp"
android:layout_centerInParent="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_below="@id/top_bar" android:layout_alignBottom="@+id/top_bar"
android:layout_toRightOf="@+id/footer" android:layout_toEndOf="@+id/footer">
<FrameLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_alignParentTop="true">
<LinearLayout
android:id="@+id/fragmentContainer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="horizontal" />
</FrameLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/footer"
android:layout_width="60dp"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<RelativeLayout
android:id="@+id/history"
android:background="@drawable/footer_button"
android:layout_weight="1"
android:layout_width="60dp"
android:layout_height="0dp">
<ImageView
android:src="@drawable/footer_history"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="15dp"
android:layout_centerInParent="true"/>
<View
android:id="@+id/history_select"
android:background="@color/colorA"
android:layout_width="5dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:visibility="gone"/>
<TextView
android:id="@+id/missed_calls"
android:background="@drawable/history_chat_indicator"
style="@style/font18"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_margin="12dp"
android:gravity="center"
android:visibility="gone"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/contacts"
android:background="@drawable/footer_button"
android:layout_weight="1"
android:layout_width="60dp"
android:layout_height="0dp">
<ImageView
android:src="@drawable/footer_contacts"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
android:layout_centerInParent="true"/>
<View
android:id="@+id/contacts_select"
android:background="@color/colorA"
android:layout_width="5dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:visibility="gone"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/dialer"
android:background="@drawable/footer_button"
android:layout_weight="1"
android:layout_width="60dp"
android:layout_height="0dp">
<ImageView
android:src="@drawable/footer_dialer"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
android:layout_centerInParent="true"/>
<View
android:id="@+id/dialer_select"
android:background="@color/colorA"
android:layout_width="5dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"/>
</RelativeLayout>
<RelativeLayout
android:id="@+id/chat"
android:background="@drawable/footer_button"
android:layout_weight="1"
android:layout_width="60dp"
android:layout_height="0dp">
<ImageView
android:src="@drawable/footer_chat"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
android:layout_centerInParent="true" />
<View
android:id="@+id/chat_select"
android:background="@color/colorA"
android:visibility="gone"
android:layout_width="5dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"/>
<TextView
android:id="@+id/missed_chats"
android:background="@drawable/history_chat_indicator"
style="@style/font18"
android:layout_width="25dp"
android:layout_height="25dp"
android:layout_margin="12dp"
android:gravity="center"
android:visibility="gone" />
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/fragmentContainer2"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
</RelativeLayout>
<!-- Side Menu -->
<RelativeLayout
android:id="@+id/side_menu_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="left">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/side_menu_main_account"/>
<ListView
android:id="@+id/accounts_list"
android:background="@color/colorB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:choiceMode="singleChoice"
android:cacheColorHint="@color/transparent"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"/>
<ListView
android:id="@+id/item_list"
android:background="@color/colorH"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@color/colorE"
android:listSelector="@color/colorH"
android:dividerHeight="1dp"/>
</LinearLayout>
<RelativeLayout
android:id="@+id/side_menu_quit"
android:background="@color/colorA"
android:gravity="bottom"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="50dp">
<ImageView
android:id="@+id/quit_button"
android:src="@drawable/quit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="5dp"
android:layout_alignParentLeft="true"
android:layout_centerVertical="true" />
<TextView
android:id="@+id/quit"
android:text="@string/quit"
style="@style/font14"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/quit_button"
android:gravity="center_vertical"
android:layout_centerInParent="true"/>
</RelativeLayout>
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</RelativeLayout>

View file

@ -9,9 +9,12 @@
android:id="@+id/top_bar"
android:background="@color/colorF"
android:layout_width="match_parent"
android:layout_height="70dp">
android:layout_height="50dp"
android:visibility="visible"
android:layout_alignParentTop="true">
<TextView
android:id="@+id/menu_name"
android:text="@string/about"
style="@style/font1"
android:layout_width="wrap_content"
@ -21,16 +24,18 @@
<ImageView
android:id="@+id/cancel"
android:contentDescription="@string/content_description_dialer"
android:layout_width="70dp"
android:src="@drawable/dialer_back"
android:background="@drawable/toolbar_button"
android:layout_width="60dp"
android:layout_height="match_parent"
android:padding="20dp"
android:padding="12dp"
android:layout_centerInParent="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
<ImageView
android:src="@drawable/linphone_logo_orange"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"

View file

@ -10,7 +10,7 @@
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="35dp"
tools:layout="@layout/status" />
<include layout="@layout/assistant_topbar" android:id="@+id/topbar" />

View file

@ -20,7 +20,7 @@
android:layout_width="200dp"
android:layout_height="200dp"
android:layout_centerInParent="true"
android:src="@drawable/linphone_orange"/>
android:src="@drawable/linphone_logo_orange"/>
<ProgressBar
android:layout_height="wrap_content"

View file

@ -5,19 +5,19 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<fragment
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
android:layout_width="match_parent"
android:layout_height="40dp"
tools:layout="@layout/status" />
<fragment
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
android:layout_width="match_parent"
android:layout_height="35dp"
tools:layout="@layout/status" />
<android.support.v4.widget.DrawerLayout
android:id="@+id/side_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/status">
<android.support.v4.widget.DrawerLayout
android:id="@+id/side_menu"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_below="@id/status">
<RelativeLayout
android:layout_width="match_parent"
@ -35,402 +35,408 @@
android:layout_height="match_parent"
android:layout_above="@+id/menu">
<RelativeLayout
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="wrap_content">
<LinearLayout
android:id="@+id/conference_list"
android:layout_width="match_parent"
android:layout_height="wrap_content">
android:layout_height="wrap_content"
android:layout_gravity="top"
android:layout_alignParentTop="true"
android:orientation="vertical"
android:visibility="gone">
</LinearLayout>
<LinearLayout
android:id="@+id/conference_list"
android:layout_width="match_parent"
<LinearLayout
android:id="@+id/calls_list"
android:background="@color/colorG"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:divider="@color/colorF"
android:dividerHeight="1dp"
android:orientation="vertical">
</LinearLayout>
<ImageView
android:id="@+id/contact_picture"
android:src="@drawable/avatar_big"
android:contentDescription="@string/content_description_contact_picture"
android:layout_centerInParent="true"
android:layout_width="200dp"
android:layout_height="200dp"
android:paddingBottom="20dp"/>
<LinearLayout
android:id="@+id/active_call_info"
android:background="@color/colorG"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<TextView
android:id="@+id/current_contact_name"
style="@style/font13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="top"
android:paddingTop="5dp"
android:layout_alignParentTop="true"
android:orientation="vertical"
android:visibility="gone">
</LinearLayout>
android:layout_gravity="center"/>
<LinearLayout
android:id="@+id/calls_list"
android:background="@color/colorG"
android:layout_width="match_parent"
<Chronometer
android:id="@+id/current_call_timer"
style="@style/font11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:layout_gravity="bottom"
android:divider="@color/colorF"
android:dividerHeight="1dp"
android:orientation="vertical">
</LinearLayout>
android:layout_below="@id/current_contact_name"
android:layout_gravity="center"/>
</LinearLayout>
<LinearLayout
android:id="@+id/active_call_info"
android:background="@color/colorG"
android:layout_width="match_parent"
android:layout_height="80dp"
android:layout_centerHorizontal="true"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<LinearLayout
android:id="@+id/remote_pause"
android:background="@color/colorA"
android:alpha="0.9"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<TextView
android:id="@+id/current_contact_name"
style="@style/font13"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:layout_alignParentTop="true"
android:layout_gravity="center"/>
<ImageView
android:src="@drawable/waiting_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
<Chronometer
android:id="@+id/current_call_timer"
style="@style/font11"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/current_contact_name"
android:layout_gravity="center"/>
</LinearLayout>
<TextView
android:text="@string/call_paused_by_remote"
style="@style/font4"
android:gravity="center"
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
</LinearLayout>
<LinearLayout
android:id="@+id/remote_pause"
android:background="@color/colorA"
android:alpha="0.9"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:gravity="center"
android:orientation="vertical"
android:visibility="gone">
<ImageView
android:id="@+id/pause"
android:src="@drawable/pause_big_default"
android:contentDescription="@string/content_description_pause"
android:layout_width="80dp"
android:layout_height="80dp"
android:padding="15dp"
android:layout_below="@+id/active_call_info"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"/>
<ImageView
android:src="@drawable/waiting_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
<ImageView
android:id="@+id/switchCamera"
android:src="@drawable/switch_camera"
android:layout_width="80dp"
android:layout_height="80dp"
android:padding="15dp"
android:contentDescription="@string/content_description_switch_camera"
android:visibility="invisible"
android:layout_alignParentTop="true"
android:layout_below="@+id/active_call_info"
android:layout_alignParentLeft="true"/>
</RelativeLayout>
<TextView
android:text="@string/call_paused_by_remote"
style="@style/font4"
android:gravity="center"
android:layout_margin="10dp"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
<LinearLayout
android:id="@+id/no_current_call"
android:background="@color/colorA"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_above="@id/calls_list"
android:gravity="center_vertical"
android:visibility="gone">
</LinearLayout>
<ImageView
android:src="@drawable/waiting_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
<ImageView
android:id="@+id/pause"
android:src="@drawable/pause_big_default"
android:contentDescription="@string/content_description_pause"
android:layout_width="80dp"
android:layout_height="80dp"
android:padding="15dp"
android:layout_below="@+id/active_call_info"
android:layout_alignParentTop="true"
android:layout_alignParentRight="true"/>
<TextView
android:text="@string/no_current_call"
style="@style/font4"
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_gravity="center"/>
</LinearLayout>
</FrameLayout>
<ImageView
android:id="@+id/switchCamera"
android:src="@drawable/switch_camera"
android:layout_width="80dp"
android:layout_height="80dp"
android:padding="15dp"
android:contentDescription="@string/content_description_switch_camera"
android:visibility="invisible"
android:layout_alignParentTop="true"
android:layout_below="@+id/active_call_info"
android:layout_alignParentLeft="true"/>
</RelativeLayout>
<org.linphone.ui.Numpad
android:id="@+id/numpad"
android:background="@color/colorC"
android:contentDescription="@string/content_description_numpad"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_margin="10dp"
android:layout_above="@id/menu"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"/>
<LinearLayout
android:id="@+id/no_current_call"
android:background="@color/colorA"
<LinearLayout
android:id="@+id/menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_alignParentBottom="true"
android:orientation="vertical">
<LinearLayout
android:background="@color/colorF"
android:layout_width="match_parent"
android:layout_height="70dp"
android:orientation="horizontal">
<RelativeLayout
android:background="@drawable/button_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/video"
android:src="@drawable/camera_default"
android:background="@drawable/button_background"
android:padding="25dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_above="@id/calls_list"
android:gravity="center_vertical"
android:visibility="gone">
android:layout_height="match_parent"/>
<ImageView
android:src="@drawable/waiting_time"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_gravity="center"/>
<TextView
android:text="@string/no_current_call"
style="@style/font4"
android:gravity="center"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_margin="10dp"
android:layout_gravity="center"/>
</LinearLayout>
<ProgressBar
android:id="@+id/video_in_progress"
style="?android:attr/progressBarStyle"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>
</FrameLayout>
<org.linphone.ui.Numpad
android:id="@+id/numpad"
android:background="@color/colorC"
android:contentDescription="@string/content_description_numpad"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:visibility="gone"
android:layout_margin="10dp"
android:layout_above="@id/menu"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"/>
<ImageView
android:id="@+id/micro"
android:src="@drawable/micro_default"
android:background="@drawable/button_background"
android:padding="15dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<ImageView
android:id="@+id/speaker"
android:src="@drawable/speaker_default"
android:background="@drawable/button_background"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageView
android:id="@+id/audio_route"
android:src="@drawable/routes"
android:background="@drawable/button_background"
android:visibility="gone"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageView
android:id="@+id/options"
android:src="@drawable/options_default"
android:background="@drawable/button_background"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/menu"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/main_bar"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_alignParentBottom="true"
android:orientation="vertical">
android:layout_gravity="center"
android:orientation="horizontal" >
<LinearLayout
android:background="@color/colorF"
<ImageView
android:id="@+id/dialer"
android:src="@drawable/dialer"
android:background="@color/colorC"
android:layout_width="match_parent"
android:layout_height="70dp"
android:orientation="horizontal">
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="20dp" />
<RelativeLayout
android:background="@drawable/button_background"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
<ImageView
android:id="@+id/video"
android:src="@drawable/camera_default"
android:background="@drawable/button_background"
android:padding="25dp"
android:layout_width="match_parent"
android:layout_height="match_parent"/>
<ProgressBar
android:id="@+id/video_in_progress"
style="?android:attr/progressBarStyle"
android:layout_centerHorizontal="true"
android:layout_centerVertical="true"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"/>
</RelativeLayout>
<ImageView
android:id="@+id/micro"
android:src="@drawable/micro_default"
android:background="@drawable/button_background"
android:padding="15dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
<ImageView
android:id="@+id/speaker"
android:src="@drawable/speaker_default"
android:background="@drawable/button_background"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageView
android:id="@+id/audio_route"
android:src="@drawable/routes"
android:background="@drawable/button_background"
android:visibility="gone"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1" />
<ImageView
android:id="@+id/options"
android:src="@drawable/options_default"
android:background="@drawable/button_background"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1" />
</LinearLayout>
<LinearLayout
android:id="@+id/main_bar"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_alignParentBottom="true"
<ImageView
android:id="@+id/hang_up"
android:src="@drawable/call_hangup"
android:background="@drawable/hangup"
android:layout_gravity="center"
android:orientation="horizontal" >
<ImageView
android:id="@+id/dialer"
android:src="@drawable/dialer"
android:background="@color/colorC"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="20dp" />
<ImageView
android:id="@+id/hang_up"
android:src="@drawable/call_hangup"
android:background="@drawable/hangup"
android:layout_gravity="center"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:padding="15dp"/>
<ImageView
android:id="@+id/chat"
android:src="@drawable/chat"
android:background="@color/colorC"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="20dp"/>
</LinearLayout>
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"
android:padding="15dp"/>
<ImageView
android:id="@+id/chat"
android:src="@drawable/chat"
android:background="@color/colorC"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="1"
android:padding="20dp"/>
</LinearLayout>
<LinearLayout
android:id="@+id/menu_bottom"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_above="@id/menu"
android:orientation="horizontal" >
</LinearLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
<ImageView
android:id="@+id/route_bluetooth"
android:src="@drawable/route_bluetooth"
android:background="@drawable/button_call_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5" />
<ImageView
android:id="@+id/add_call"
android:src="@drawable/add_call_button"
android:background="@drawable/button_call_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5" />
</LinearLayout>
<LinearLayout
android:id="@+id/menu_middle"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_above="@id/menu_bottom"
android:orientation="horizontal" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
<ImageView
android:id="@+id/route_earpiece"
android:src="@drawable/route_earpiece"
android:background="@drawable/button_call_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"/>
<ImageView
android:id="@+id/transfer"
android:src="@drawable/transfer_button"
android:background="@drawable/button_call_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"/>
</LinearLayout>
<LinearLayout
android:layout_above="@id/menu_middle"
android:layout_width="match_parent"
android:layout_height="70dp"
android:orientation="horizontal" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
<ImageView
android:id="@+id/route_speaker"
android:src="@drawable/route_speaker"
android:background="@drawable/button_call_background"
android:visibility="invisible"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"/>
<ImageView
android:id="@+id/conference"
android:src="@drawable/conference_button"
android:background="@drawable/button_call_background"
android:visibility="invisible"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"/>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/side_menu_content"
android:background="@color/colorH"
<LinearLayout
android:id="@+id/menu_bottom"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="left">
android:layout_height="70dp"
android:layout_above="@id/menu"
android:orientation="horizontal" >
<include layout="@layout/incall_stats" android:id="@+id/incall_stats"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
</RelativeLayout>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
</android.support.v4.widget.DrawerLayout>
<ImageView
android:id="@+id/route_bluetooth"
android:src="@drawable/route_bluetooth"
android:background="@drawable/button_call_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5" />
<ImageView
android:id="@+id/add_call"
android:src="@drawable/add_call_button"
android:background="@drawable/button_call_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5" />
</LinearLayout>
<LinearLayout
android:id="@+id/menu_middle"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_above="@id/menu_bottom"
android:orientation="horizontal" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
<ImageView
android:id="@+id/route_earpiece"
android:src="@drawable/route_earpiece"
android:background="@drawable/button_call_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"/>
<ImageView
android:id="@+id/transfer"
android:src="@drawable/transfer_button"
android:background="@drawable/button_call_background"
android:padding="20dp"
android:visibility="invisible"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"/>
</LinearLayout>
<LinearLayout
android:layout_above="@id/menu_middle"
android:layout_width="match_parent"
android:layout_height="70dp"
android:orientation="horizontal" >
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
<TextView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:visibility="invisible"
android:layout_weight="0.5"/>
<ImageView
android:id="@+id/route_speaker"
android:src="@drawable/route_speaker"
android:background="@drawable/button_call_background"
android:visibility="invisible"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"/>
<ImageView
android:id="@+id/conference"
android:src="@drawable/conference_button"
android:background="@drawable/button_call_background"
android:visibility="invisible"
android:padding="20dp"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_weight="0.5"/>
</LinearLayout>
</RelativeLayout>
<RelativeLayout
android:id="@+id/side_menu_content"
android:background="@color/colorH"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_gravity="left">
<include layout="@layout/incall_stats" android:id="@+id/incall_stats"/>
</RelativeLayout>
</android.support.v4.widget.DrawerLayout>
</RelativeLayout>

View file

@ -7,14 +7,13 @@
<RelativeLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_gravity="bottom">
android:layout_height="60dp">
<ImageView
android:id="@+id/back"
android:src="@drawable/back_button"
android:contentDescription="@string/content_description_back"
android:layout_width="70dp"
android:layout_width="60dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:padding="20dp"/>
@ -23,7 +22,7 @@
android:id="@+id/edit"
android:src="@drawable/edit_list_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"/>
@ -33,7 +32,7 @@
android:src="@drawable/call_alt_start"
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"/>
@ -42,7 +41,7 @@
android:src="@drawable/call_back_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"/>
@ -64,6 +63,7 @@
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="1dp"/>
</RelativeLayout>
<include layout="@layout/edit_list"/>
@ -103,9 +103,8 @@
android:layout_alignTop="@+id/message"
android:layout_alignParentRight="true"/>
<EditText
android:imeOptions="flagNoExtractUi"
android:textCursorDrawable="@null"
android:id="@+id/message"
android:imeOptions="flagNoExtractUi"
android:textCursorDrawable="@null"
@ -150,31 +149,32 @@
android:layout_above="@id/footer"/>
<ListView
android:id="@+id/chatMessageList"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/chat_message_list"
android:divider="@android:color/transparent"
android:stackFromBottom="true"
android:transcriptMode="alwaysScroll"
android:cacheColorHint="@color/transparent"
android:layout_above="@id/remoteComposing"
android:dividerHeight="10dp"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"
android:cacheColorHint="@color/transparent"
android:layout_above="@id/remote_composing"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="10dp"
android:layout_below="@+id/top_bar"/>
<AutoCompleteTextView
android:id="@+id/searchContactField"
android:background="@drawable/resizable_textfield"
android:hint="@string/search"
android:inputType="textPersonName"
android:completionThreshold="1"
android:textCursorDrawable="@null"
android:visibility="gone"
android:layout_margin="10dp"
android:layout_below="@id/top_bar"
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingRight="5dp"/>
<AutoCompleteTextView
android:id="@+id/search_contact_field"
android:background="@drawable/resizable_textfield"
android:hint="@string/search"
android:inputType="textPersonName"
android:completionThreshold="1"
android:textCursorDrawable="@null"
android:visibility="gone"
android:layout_margin="10dp"
android:layout_below="@id/top_bar"
android:layout_width="match_parent"
android:layout_height="40dp"
android:paddingRight="5dp"/>
</RelativeLayout>

View file

@ -1,10 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/bubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:orientation="horizontal" >
android:id="@+id/bubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:gravity="left"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="wrap_content"
@ -12,71 +12,71 @@
android:background="@drawable/resizable_chat_bubble_incoming"
android:orientation="horizontal" >
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:id="@+id/contact_header"
style="@style/font12"
android:singleLine="true"
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
android:layout_height="wrap_content"
android:orientation="vertical"
android:paddingLeft="10dp"
android:paddingRight="10dp">
<TextView
android:id="@+id/message"
style="@style/font14"
android:linksClickable="true"
android:autoLink="web"
android:layout_gravity="left"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/image"
android:visibility="gone"
android:layout_width="150dp"
android:layout_height="150dp"
android:scaleType="centerInside"
android:maxWidth="250dp"
android:maxHeight="250dp" />
<RelativeLayout
android:id="@+id/imageLayout"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ProgressBar
android:id="@+id/progress_bar"
android:paddingRight="5dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="150dp"
android:layout_height="5dp"/>
<Button
android:id="@+id/accept_download"
android:text="@string/accept"
android:background="@drawable/resizable_assistant_button"
style="@style/font8"
android:contentDescription="@string/content_description_validate"
<TextView
android:id="@+id/contact_header"
style="@style/font12"
android:singleLine="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_below="@id/progress_bar"/>
android:layout_height="wrap_content" />
</RelativeLayout>
<TextView
android:id="@+id/message"
style="@style/font14"
android:linksClickable="true"
android:autoLink="web"
android:layout_gravity="left"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<ImageView
android:id="@+id/image"
android:visibility="gone"
android:layout_width="150dp"
android:layout_height="150dp"
android:scaleType="centerInside"
android:maxWidth="250dp"
android:maxHeight="250dp" />
<RelativeLayout
android:id="@+id/imageLayout"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ProgressBar
android:id="@+id/progress_bar"
android:paddingRight="5dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="150dp"
android:layout_height="5dp"/>
<Button
android:id="@+id/accept_download"
android:text="@string/accept"
android:background="@drawable/resizable_assistant_button"
style="@style/font8"
android:contentDescription="@string/content_description_validate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="10dp"
android:layout_below="@id/progress_bar"/>
</RelativeLayout>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<CheckBox
android:id="@+id/delete"
android:button="@drawable/checkbox"

View file

@ -3,7 +3,7 @@
android:id="@+id/bubble"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="horizontal" >
android:orientation="horizontal">
<CheckBox
android:id="@+id/delete"
@ -15,14 +15,15 @@
android:layout_height="30dp"
android:adjustViewBounds="true"
android:layout_alignParentRight="true"
android:visibility="gone" />
android:visibility="gone"/>
<LinearLayout
android:background="@drawable/resizable_chat_bubble_outgoing"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_toLeftOf="@id/delete"
android:background="@drawable/resizable_chat_bubble_outgoing"
android:orientation="horizontal" >
android:orientation="horizontal">
<LinearLayout
android:layout_width="wrap_content"
@ -56,17 +57,17 @@
android:layout_centerInParent="true" />
<RelativeLayout
android:id="@+id/imageLayout"
android:id="@+id/file_transfer_layout"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content">
<ProgressBar
android:id="@+id/progress_bar"
style="@android:style/Widget.ProgressBar.Horizontal"
android:paddingRight="5dp"
android:layout_marginTop="10dp"
android:layout_marginBottom="10dp"
style="@android:style/Widget.ProgressBar.Horizontal"
android:layout_width="150dp"
android:layout_height="5dp"/>
@ -75,7 +76,6 @@
android:text="@string/cancel"
android:background="@drawable/resizable_confirm_delete_button"
style="@style/font15"
android:contentDescription="@string/content_description_validate"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_below="@id/progress_bar"/>
@ -88,8 +88,7 @@
android:id="@+id/status"
android:contentDescription="@string/content_description_message_status"
android:visibility="invisible"
android:paddingRight="5dp"
android:paddingTop="5dp"
android:padding="5dp"
android:layout_gravity="top|right"
android:layout_width="20dp"
android:layout_height="20dp"

View file

@ -8,8 +8,14 @@
<RelativeLayout
android:id="@+id/top_bar"
android:layout_width="match_parent"
<<<<<<< HEAD
android:layout_height="60dp"
android:layout_gravity="top">
=======
android:layout_height="50dp"
android:layout_gravity="top"
android:background="@color/colorF">
>>>>>>> linphone-android/master
<ImageView
android:id="@+id/new_discussion"
@ -18,14 +24,14 @@
android:layout_width="70dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:padding="15dp"/>
android:padding="12dp"/>
<ImageView
android:id="@+id/back_in_call"
android:src="@drawable/call_back_button"
android:layout_width="70dp"
android:layout_height="match_parent"
android:padding="15dp"
android:padding="12dp"
android:visibility="gone"
android:layout_toRightOf="@+id/new_discussion"/>
@ -36,6 +42,7 @@
android:layout_width="70dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
<<<<<<< HEAD
android:padding="15dp"/>
<View
@ -43,6 +50,9 @@
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="1dp"/>
=======
android:padding="12dp"/>
>>>>>>> linphone-android/master
</RelativeLayout>
<include layout="@layout/edit_list"/>
@ -58,7 +68,11 @@
<TextView
android:id="@+id/noChatHistory"
android:text="@string/no_chat_history"
<<<<<<< HEAD
style="@style/font2"
=======
style="@style/font6"
>>>>>>> linphone-android/master
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="match_parent"

View file

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="75dp"
android:layout_height="60dp"
android:gravity="center_vertical"
android:background="@color/colorG">
@ -9,6 +9,7 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:gravity="center_vertical"
android:paddingLeft="10dp">
<TextView

View file

@ -2,7 +2,7 @@
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/colorA"
android:alpha="0.5"
android:layout_height="60dp"
android:layout_height="50dp"
android:layout_width="match_parent"
android:layout_margin="2dp"
android:gravity="center_vertical"

View file

@ -17,7 +17,7 @@
android:layout_width="70dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:padding="20dp"/>
android:padding="15dp"/>
<View
android:background="@color/colorF"
@ -26,59 +26,64 @@
android:layout_height="1dp"/>
</RelativeLayout>
<LinearLayout
<ScrollView
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/contact_picture"
android:src="@drawable/avatar"
android:contentDescription="@string/content_description_contact_picture"
android:layout_width="80dp"
android:layout_height="80dp"
android:adjustViewBounds="true"
android:layout_alignParentLeft="true"
android:layout_marginLeft="5dp"/>
android:layout_height="wrap_content">
<LinearLayout
android:layout_width="wrap_content"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/contact_name"
style="@style/font13"
android:lines="2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="10dp"
android:orientation="horizontal">
<TextView
android:id="@+id/contact_function"
style="@style/font2"
android:singleLine="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<ImageView
android:id="@+id/contact_picture"
android:src="@drawable/avatar"
android:contentDescription="@string/content_description_contact_picture"
android:layout_width="80dp"
android:layout_height="80dp"
android:adjustViewBounds="true"
android:layout_alignParentLeft="true"
android:layout_marginLeft="5dp"/>
<LinearLayout
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingLeft="10dp"
android:orientation="vertical">
<TextView
android:id="@+id/contact_name"
style="@style/font13"
android:lines="2"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/contact_function"
style="@style/font2"
android:singleLine="true"
android:layout_width="wrap_content"
android:layout_height="wrap_content"/>
</LinearLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:text="@string/address_sip"
style="@style/font8"
android:textStyle="bold"
android:background="@color/colorA"
android:textAllCaps="true"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"/>
<TextView
android:text="@string/address_sip"
style="@style/font8"
android:textStyle="bold"
android:background="@color/colorA"
android:textAllCaps="true"
android:layout_width="match_parent"
android:layout_height="40dp"
android:gravity="center"/>
<ScrollView
android:layout_width="match_parent"
android:layout_height="match_parent">
<TableLayout
android:id="@+id/controls"
@ -86,7 +91,9 @@
android:layout_height="wrap_content"
android:stretchColumns="*"
android:paddingTop="10dp"/>
</LinearLayout>
</ScrollView>
</LinearLayout>

View file

@ -7,7 +7,7 @@
<RelativeLayout
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="50dp"
android:layout_gravity="bottom"
android:background="@color/colorF">
@ -18,15 +18,16 @@
android:layout_width="70dp"
android:layout_height="match_parent"
android:layout_alignParentLeft="true"
android:padding="20dp"/>
android:padding="15dp"/>
<ImageView
android:id="@+id/ok"
android:contentDescription="@string/content_description_valid"
android:layout_alignParentRight="true"
android:padding="20dp"
android:padding="15dp"
android:src="@drawable/valid"
android:background="@drawable/toolbar_button"
android:gravity="center"
android:layout_width="70dp"
android:layout_height="match_parent"/>
@ -34,8 +35,9 @@
<ImageView
android:id="@+id/deleteContact"
android:contentDescription="@string/content_description_delete"
android:padding="15dp"
android:padding="12dp"
android:src="@drawable/delete"
android:background="@drawable/toolbar_button"
android:gravity="center"
android:layout_width="70dp"
android:layout_height="match_parent"

View file

@ -52,25 +52,23 @@
<TextView
android:id="@+id/noSipContact"
android:text="@string/no_sip_contact"
style="@style/font6"
android:visibility="gone"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_centerVertical="true"
android:text="@string/no_sip_contact"
android:textColor="@color/colorB"
android:textAppearance="@android:style/TextAppearance.Large"/>
android:layout_centerVertical="true"/>
<TextView
android:id="@+id/noContact"
android:text="@string/no_contact"
android:visibility="gone"
style="@style/font6"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:layout_centerVertical="true"
android:text="@string/no_contact"
android:textColor="@color/colorB"
android:textAppearance="@android:style/TextAppearance.Large"/>
android:layout_centerVertical="true"/>
</RelativeLayout>

View file

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/colorC"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/colorC">
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/address_bar"
android:background="@color/colorG"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="50dp"
android:layout_marginBottom="10dp"
android:layout_alignParentTop="true">
@ -39,12 +40,20 @@
</RelativeLayout>
<org.linphone.ui.Numpad
android:id="@+id/numpad"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
android:layout_above="@id/controls"
android:layout_below="@id/address_bar"
android:layout_centerInParent="true"/>
<LinearLayout
android:id="@+id/controls"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="70dp">
android:layout_height="60dp">
<ImageView
android:id="@+id/back"
@ -61,20 +70,10 @@
android:background="@drawable/call"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="15dp"
android:padding="12dp"
android:layout_weight="0.5"/>
</LinearLayout>
<org.linphone.ui.Numpad
android:id="@+id/numpad"
android:contentDescription="@string/content_description_numpad"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:padding="10dp"
android:layout_above="@id/controls"
android:layout_below="@id/address_bar"
android:layout_centerInParent="true"/>
<ScrollView
android:layout_width="wrap_content"

View file

@ -3,7 +3,7 @@
android:id="@+id/edit_list"
android:background="@color/colorG"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="50dp"
android:visibility="gone">
<ImageView
@ -12,7 +12,7 @@
android:contentDescription="@string/content_description_valid"
android:layout_width="70dp"
android:layout_height="match_parent"
android:padding="15dp"
android:padding="12dp"
android:layout_alignParentLeft="true"/>
<ImageView
@ -21,7 +21,7 @@
android:contentDescription="@string/content_description_valid"
android:layout_width="70dp"
android:layout_height="match_parent"
android:padding="15dp"
android:padding="12dp"
android:layout_alignParentRight="true"/>
<ImageView
@ -30,7 +30,7 @@
android:contentDescription="@string/content_description_valid"
android:layout_width="70dp"
android:layout_height="match_parent"
android:padding="15dp"
android:padding="12dp"
android:layout_toLeftOf="@id/delete"/>
<ImageView
@ -39,7 +39,7 @@
android:contentDescription="@string/content_description_valid"
android:layout_width="70dp"
android:layout_height="match_parent"
android:padding="15dp"
android:padding="12dp"
android:layout_toLeftOf="@id/delete"
android:visibility="gone"/>

View file

@ -9,7 +9,7 @@
android:id="@+id/top_bar"
android:background="@color/colorG"
android:layout_width="match_parent"
android:layout_height="60dp"
android:layout_height="50dp"
android:layout_gravity="top">
<ImageView
@ -29,7 +29,7 @@
android:layout_height="match_parent"
android:layout_alignParentTop="true"
android:layout_toRightOf="@+id/all_calls"
android:layout_toEndOf="@+id/all_calls"/>
android:layout_toEndOf="@+id/all_calls"/>r
<ImageView
android:id="@+id/edit"
@ -38,13 +38,14 @@
android:layout_width="70dp"
android:layout_height="match_parent"
android:layout_alignParentRight="true"
android:padding="15dp"/>
android:padding="12dp"/>
<View
android:background="@color/colorF"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="1dp"/>
</RelativeLayout>
<include layout="@layout/edit_list"/>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:background="@color/colorG"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
android:background="@color/colorG"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical" >
<RelativeLayout
android:layout_width="match_parent"
@ -26,12 +26,12 @@
android:layout_width="match_parent"
android:layout_height="1dp"/>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dp"
android:orientation="horizontal">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:padding="20dp"
android:orientation="horizontal">
<ImageView
android:id="@+id/contact_picture"
@ -65,7 +65,7 @@
</LinearLayout>
</LinearLayout>
</LinearLayout>
<TextView
android:text="@string/address_sip"
@ -85,9 +85,9 @@
android:padding="2dp"
android:layout_gravity="center"/>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:gravity="center"
android:orientation="horizontal">
@ -111,7 +111,7 @@
android:adjustViewBounds="true"
android:layout_centerInParent="true" />
</LinearLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/log_row"

View file

@ -9,7 +9,7 @@
android:id="@+id/status"
android:name="org.linphone.StatusFragment"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="35dp"
tools:layout="@layout/status" />
<android.support.v4.widget.DrawerLayout
@ -22,11 +22,40 @@
android:layout_width="match_parent"
android:layout_height="match_parent">
<RelativeLayout
android:id="@+id/top_bar"
android:background="@color/colorF"
android:layout_width="match_parent"
android:layout_height="60dp"
android:visibility="gone"
android:layout_alignParentTop="true">
<TextView
android:id="@+id/menu_name"
android:text="@string/settings"
style="@style/font1"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_centerInParent="true"
android:gravity="center_vertical"/>
<ImageView
android:id="@+id/cancel"
android:src="@drawable/dialer_back"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:padding="15dp"
android:layout_centerInParent="true"
android:layout_alignParentRight="true"/>
</RelativeLayout>
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_above="@id/footer">
android:layout_above="@id/footer"
android:layout_below="@id/top_bar">
<FrameLayout
android:layout_width="match_parent"
@ -45,7 +74,7 @@
<LinearLayout
android:id="@+id/footer"
android:layout_width="match_parent"
android:layout_height="70dp"
android:layout_height="60dp"
android:layout_alignParentBottom="true"
android:orientation="horizontal">
@ -100,7 +129,6 @@
android:padding="18dp"
android:layout_centerInParent="true"/>
<RelativeLayout
android:id="@+id/chat"
android:background="@drawable/footer_button"
@ -111,9 +139,9 @@
<ImageView
android:id="@+id/chat_image"
android:src="@drawable/footer_chat"
android:contentDescription="@string/content_description_chat"
android:layout_width="match_parent"
android:layout_height="35dp"
android:layout_height="wrap_content"
android:padding="15dp"
android:layout_centerInParent="true" />
<TextView
@ -131,22 +159,21 @@
</RelativeLayout>
</LinearLayout>
<LinearLayout
android:id="@+id/fragmentContainer2"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
<LinearLayout
android:id="@+id/fragmentContainer2"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:orientation="vertical">
</LinearLayout>
</RelativeLayout>
<!-- Side Menu -->
<RelativeLayout
android:id="@+id/side_menu_content"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:id="@+id/side_menu_content"
android:layout_gravity="left">
<LinearLayout
@ -154,34 +181,37 @@
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/side_menu_default_account"/>
<include layout="@layout/side_menu_main_account"/>
<ListView android:id="@+id/accounts_list"
<ListView
android:id="@+id/accounts_list"
android:background="@color/colorB"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:choiceMode="singleChoice"
android:cacheColorHint="@color/transparent"
android:divider="@android:color/transparent"
android:dividerHeight="0dp"
android:background="@color/colorB"/>
android:dividerHeight="0dp"/>
<ListView android:id="@+id/item_list"
<ListView
android:id="@+id/item_list"
android:background="@color/colorG"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:choiceMode="singleChoice"
android:divider="@color/colorE"
android:listSelector="@color/colorG"
android:dividerHeight="1dp"
android:background="@color/colorG"/>
android:dividerHeight="1dp"/>
</LinearLayout>
<RelativeLayout
android:id="@+id/side_menu_quit"
android:background="@color/colorA"
android:gravity="bottom"
android:layout_alignParentBottom="true"
android:layout_width="match_parent"
android:layout_height="60dp"
android:background="@color/colorA">
android:layout_height="60dp">
<ImageView
android:id="@+id/quit_button"

View file

@ -8,11 +8,11 @@
<ImageView
android:contentDescription="@string/content_description_welcome"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_height="match_parent"
android:adjustViewBounds="true"
android:scaleType="centerCrop"
android:scaleType="center"
android:layout_centerInParent="true"
android:src="@drawable/logo"/>
android:src="@drawable/linphone_logo_orange"/>
<ProgressBar
android:id="@+id/spinner"

View file

@ -1,17 +1,17 @@
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/layout"
android:background="@color/colorG"
android:layout_width="match_parent"
android:layout_height="60dp"
android:padding="5dp"
android:gravity="center_vertical"
android:background="@color/colorG"
android:orientation="vertical" >
<TextView
android:id="@+id/Contact_name"
android:id="@+id/contact_name"
style="@style/font6"
android:lines="1"
style="@style/font2"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_toRightOf="@id/icon"
@ -22,8 +22,5 @@
style="@style/font9"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:layout_alignParentRight="true"
android:layout_centerVertical="true"
android:adjustViewBounds="true"
android:scaleType="centerInside" />
android:layout_centerVertical="true"/>
</LinearLayout>

View file

@ -1,9 +1,9 @@
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:background="@color/colorG"
android:layout_height="40dp"
android:gravity="center">
android:layout_width="match_parent"
android:background="@color/colorG"
android:layout_height="40dp"
android:gravity="center">
<TextView
android:id="@+id/address"

View file

@ -6,7 +6,7 @@
android:layout_height="80dp">
<ImageView
android:id="@+id/icon"
android:id="@+id/main_account_avatar"
android:src="@drawable/avatar"
android:layout_width="40dp"
android:layout_height="40dp"
@ -19,15 +19,14 @@
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:orientation="vertical"
android:layout_toRightOf="@+id/icon"
android:layout_toRightOf="@+id/main_account_avatar"
android:gravity="center_vertical">
<TextView
android:id="@+id/display_name"
style="@style/font3"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:editable="false"/>
android:layout_height="wrap_content"/>
<TextView
android:id="@+id/address"
@ -39,10 +38,10 @@
</LinearLayout>
<ImageView
android:id="@+id/status_led"
android:id="@+id/main_account_status"
android:src="@drawable/led_connected"
android:layout_width="25dp"
android:layout_height="25dp"
android:src="@drawable/led_connected"
android:padding="5dp"
android:layout_marginBottom="10dp"
android:layout_alignParentRight="true"

View file

@ -3,7 +3,7 @@
android:id="@+id/status"
android:background="@color/colorC"
android:layout_width="match_parent"
android:layout_height="40dp"
android:layout_height="35dp"
android:orientation="horizontal">
<RelativeLayout
@ -16,7 +16,7 @@
android:src="@drawable/menu_burger"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:padding="10dp"
android:padding="8dp"
android:layout_centerInParent="true"
android:layout_alignParentLeft="true"/>

View file

@ -5,7 +5,7 @@
<item name="android:layout_height">50dp</item>
<item name="android:textColor">@android:color/transparent</item>
<item name="android:textSize">20sp</item>
<item name="android:layout_margin">30dp</item>
<item name="android:layout_margin">25dp</item>
</style>
<declare-styleable name="Numpad">

View file

@ -1,12 +1,14 @@
<?xml version="1.0" encoding="utf-8"?>
<resources>
<!-- New settings -->
<bool name="assistant_use_linphone_login_as_first_fragment">false</bool>
<bool name="hide_in_call_stats">false</bool>
<string name="default_domain">sip.linphone.org</string>
<string name="default_stun">stun.linphone.org</string>
<bool name="assistant_use_linphone_login_as_first_fragment">false</bool>
<bool name="hide_in_call_stats">false</bool>
<bool name="use_linphone_friend">true</bool>
<bool name="orientation_portrait_only">true</bool>
<bool name="show_statusbar_only_on_dialer">false</bool>
<bool name="replace_assistant_with_old_interface">false</bool>
<string name="wizard_url">https://www.linphone.org/wizard.php</string>
<bool name="display_remote_provisioning_login_activity">false</bool>
@ -68,7 +70,6 @@
<bool name="hide_phone_numbers_in_editor">false</bool>
<bool name="hide_sip_addresses_in_editor">false</bool>
<bool name="setup_cancel_move_to_back">false</bool>
<bool name="replace_wizard_with_old_interface">false</bool>
<bool name="enable_call_notification">true</bool>

View file

@ -36,7 +36,6 @@
<string name="pref_add_account_key">pref_add_account_key</string>
<string name="pref_video_key">pref_video_key</string>
<string name="pref_video_codecs_key">pref_video_codecs_key</string>
<string name="pref_linphone_friend_key">pref_linphone_friend_key</string>
<string name="pref_transport_key">pref_transport_key</string>
<string name="pref_transport_udp_key">pref_transport_udp_key</string>

View file

@ -18,6 +18,10 @@
<string name="no_account">No account configured</string>
<string name="search">Search</string>
<string name="address_sip">Address Sip</string>
<string name="outgoing">outgoing</string>
<string name="incoming">incoming</string>
<string name="missed">missed</string>
<string name="settings">Settings</string>
<!-- splashscreen -->
<string name="app_description">free SIP VOIP client</string>
@ -79,6 +83,13 @@
<string name="call_paused_by_remote">Your correspondent paused the call</string>
<string name="zrtp_dialog">ZRTP token is %s\nYou should only accept if you have the same token as your correspondent</string>
<!-- Settings -->
<string-array name="video_preset_entries">
<item>default</item>
<item>high-fps</item>
<item>custom</item>
</string-array>
<!-- Content description -->
<string name="content_description_toggle_micro">Toggle micro</string>
@ -288,7 +299,6 @@
<string name="pref_audio">Audio</string>
<string name="pref_prefix">Prefix</string>
<string name="pref_advanced">Advanced</string>
<string name="menu_settings">Settings</string>
<string name="pref_proxy">Proxy</string>
<string name="pref_domain">Domain*</string>
<string name="pref_passwd">Password*</string>

View file

@ -3,6 +3,6 @@
<account-authenticator
xmlns:android="http://schemas.android.com/apk/res/android"
android:accountType="@string/sync_account_type"
android:icon="@drawable/logo_linphone_57x57"
android:smallIcon="@drawable/logo_linphone_57x57"
android:icon="@drawable/linphone_logo"
android:smallIcon="@drawable/linphone_logo"
android:label="@string/app_name"/>

View file

@ -5,7 +5,7 @@
<ContactsDataKind
android:mimeType="vnd.android.cursor.item/org.linphone.profile"
android:icon="@drawable/logo_linphone_57x57"
android:icon="@drawable/linphone_logo"
android:summaryColumn="data2"
android:detailColumn="data3"
android:detailSocialSummary="true"/>

View file

@ -104,7 +104,9 @@
<ListPreference
android:title="Video preset"
android:key="@string/pref_video_preset_key"/>
android:key="@string/pref_video_preset_key"
android:entries="@array/video_preset_entries"
android:entryValues="@array/video_preset_entries" />
<ListPreference
android:title="@string/pref_preferred_video_size"
@ -267,15 +269,4 @@
</PreferenceCategory>
<PreferenceCategory
android:title="@string/pref_linphone_friend_title"
android:key="@string/pref_linphone_friend_key">
<CheckBoxPreference
android:title="@string/pref_auto_accept_friends_title"
android:key="@string/pref_auto_accept_friends_key"
android:summary="@string/pref_auto_accept_friends_desc"/>
</PreferenceCategory>
</PreferenceScreen>

View file

@ -37,7 +37,7 @@ import android.widget.TextView;
public class AboutFragment extends Fragment implements OnClickListener {
View sendLogButton = null;
View resetLogButton = null;
private ImageView cancel;
ImageView cancel;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
@ -72,7 +72,6 @@ public class AboutFragment extends Fragment implements OnClickListener {
LinphoneActivity.instance().hideTabBar(true);
}
}
@Override
public void onClick(View v) {
@ -87,7 +86,7 @@ public class AboutFragment extends Fragment implements OnClickListener {
lc.resetLogCollection();
}
} else if (v == cancel) {
getFragmentManager().popBackStackImmediate();
LinphoneActivity.instance().displayDialer();
}
}
}

View file

@ -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();
}
}
}

View file

@ -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);
}
}
}

View file

@ -71,7 +71,7 @@ import android.widget.Toast;
* @author Sylvain Berfini
*/
public class CallActivity extends Activity implements OnClickListener {
private final static int SECONDS_BEFORE_HIDING_CONTROLS = 5000;
private final static int SECONDS_BEFORE_HIDING_CONTROLS = 4000;
private final static int SECONDS_BEFORE_DENYING_CALL_UPDATE = 30000;
private static CallActivity instance;
@ -465,11 +465,8 @@ public class CallActivity extends Activity implements OnClickListener {
conference.setEnabled(false);
}
refreshInCallActions();
refreshCallList(getResources());
}
private void refreshInCallActions() {
@ -1322,16 +1319,6 @@ public class CallActivity extends Activity implements OnClickListener {
@Override
protected void onResume() {
instance = this;
if (isVideoEnabled(LinphoneManager.getLc().getCurrentCall())) {
//displayVideoCallControlsIfHidden();
} else if(LinphoneManager.getLc().isInConference()) {
displayConference();
} else {
LinphoneManager.startProximitySensorForActivity(this);
removeCallbacks();
}
super.onResume();
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
@ -1341,6 +1328,15 @@ public class CallActivity extends Activity implements OnClickListener {
refreshIncallUi();
handleViewIntent();
if (isVideoEnabled(LinphoneManager.getLc().getCurrentCall())) {
displayVideoCall(false);
} else if(LinphoneManager.getLc().isInConference()) {
displayConference();
} else {
LinphoneManager.startProximitySensorForActivity(this);
removeCallbacks();
}
}
private void handleViewIntent() {
@ -1490,13 +1486,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;
}

View file

@ -85,8 +85,8 @@ import android.widget.EditText;
import android.widget.Filter;
import android.widget.Filterable;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ListView;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
import android.widget.Toast;
@ -113,14 +113,14 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
private String displayName;
private String pictureUri;
private EditText message;
private ImageView cancelUpload, edit, selectAll, deselectAll, startCall, delete, sendImage, sendMessage, cancel;
private ImageView edit, selectAll, deselectAll, startCall, delete, sendImage, sendMessage, cancel;
private TextView contactName, remoteComposing;
private ImageView back, backToCall;
private AutoCompleteTextView searchContactField;
private RelativeLayout uploadLayout, textLayout, topBar, editList;
private RelativeLayout topBar, editList;
private LinearLayout textLayout;
private ListView messagesList;
private ProgressBar progressBar;
private boolean isEditMode = false;
private Contact contact;
private Uri imageToUploadUri;
@ -131,7 +131,6 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
private LinphoneCoreListenerBase mListener;
private ByteArrayInputStream mUploadingImageStream;
private LinphoneChatMessage currentMessageInFileTransferUploadState;
private boolean newChatConversation = false;
public static boolean isInstanciated() {
@ -159,17 +158,17 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
//Initialize UI
contactName = (TextView) view.findViewById(R.id.contact_name);
messagesList = (ListView) view.findViewById(R.id.chatMessageList);
searchContactField = (AutoCompleteTextView) view.findViewById(R.id.searchContactField);
messagesList = (ListView) view.findViewById(R.id.chat_message_list);
searchContactField = (AutoCompleteTextView) view.findViewById(R.id.search_contact_field);
editList = (RelativeLayout) view.findViewById(R.id.edit_list);
textLayout = (RelativeLayout) view.findViewById(R.id.messageLayout);
textLayout = (LinearLayout) view.findViewById(R.id.message_layout);
topBar = (RelativeLayout) view.findViewById(R.id.top_bar);
sendMessage = (ImageView) view.findViewById(R.id.sendMessage);
sendMessage = (ImageView) view.findViewById(R.id.send_message);
sendMessage.setOnClickListener(this);
remoteComposing = (TextView) view.findViewById(R.id.remoteComposing);
remoteComposing = (TextView) view.findViewById(R.id.remote_composing);
remoteComposing.setVisibility(View.GONE);
cancel = (ImageView) view.findViewById(R.id.cancel);
@ -196,9 +195,9 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
if (newChatConversation) {
messagesList.setVisibility(View.GONE);
searchContactField.setVisibility(View.VISIBLE);
searchContactField.setAdapter(new SearchContactsListAdapter(inflater));
searchContactField.showDropDown();
searchContactField.requestFocus();
searchContactField.setAdapter(new SearchContactsListAdapter(null , null, inflater));
edit.setVisibility(View.INVISIBLE);
startCall.setVisibility(View.INVISIBLE);
contactName.setVisibility(View.INVISIBLE);
@ -218,12 +217,10 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
}
displayChatHeader(lAddress);
//Manage multiline
message = (EditText) view.findViewById(R.id.message);
sendImage = (ImageView) view.findViewById(R.id.sendPicture);
sendImage = (ImageView) view.findViewById(R.id.send_picture);
if (!getResources().getBoolean(R.bool.disable_chat_send_file)) {
sendImage.setOnClickListener(new View.OnClickListener() {
@Override
@ -280,8 +277,6 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
}
};
// Force hide keyboard
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN);
return view;
}
@ -289,10 +284,13 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
return instance;
}
public String getSipUri() {
return sipUri;
}
@Override
public void onSaveInstanceState(Bundle outState) {
outState.putString("messageDraft", message.getText().toString());
super.onSaveInstanceState(outState);
}
@ -305,9 +303,9 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
int heightDiff = getActivity().getWindow().getDecorView().getRootView().getHeight() - (visibleArea.bottom - visibleArea.top);
if (heightDiff > 200) {
//showKeyboardVisibleMode();
showKeyboardVisibleMode();
} else {
//hideKeyboardVisibleMode();
hideKeyboardVisibleMode();
}
}
};
@ -321,8 +319,9 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
public void showKeyboardVisibleMode() {
boolean isOrientationLandscape = getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
if (isOrientationLandscape && topBar != null) {
topBar.setVisibility(View.GONE);
//topBar.setVisibility(View.GONE);
}
LinphoneActivity.instance().hideTabBar(true);
//contactPicture.setVisibility(View.GONE);
}
@ -330,8 +329,9 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
boolean isOrientationLandscape = getResources().getConfiguration().orientation == Configuration.ORIENTATION_LANDSCAPE;
//contactPicture.setVisibility(View.VISIBLE);
if (isOrientationLandscape && topBar != null) {
topBar.setVisibility(View.VISIBLE);
//topBar.setVisibility(View.VISIBLE);
}
LinphoneActivity.instance().hideTabBar(false);
}
public int getNbItemsChecked(){
@ -418,13 +418,11 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
CheckBox deleteChatBubble = (CheckBox) v.findViewById(R.id.delete);
if(isEditMode) {
Log.w("edit mode");
deleteChatBubble.setVisibility(View.VISIBLE);
RelativeLayout.LayoutParams layoutParams = new RelativeLayout.LayoutParams(RelativeLayout.LayoutParams.WRAP_CONTENT, RelativeLayout.LayoutParams.WRAP_CONTENT);
layoutParams.addRule(RelativeLayout.ALIGN_PARENT_RIGHT);
layoutParams.setMargins(0, 10, 0, 10);
v.setLayoutParams(layoutParams);
deleteChatBubble.setOnCheckedChangeListener(new CompoundButton.OnCheckedChangeListener() {
@Override
public void onCheckedChanged(CompoundButton compoundButton, boolean b) {
@ -472,6 +470,28 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
}
}
public void initChatRoom(String sipUri) {
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
LinphoneAddress lAddress = null;
try {
lAddress = lc.interpretUrl(sipUri);
} catch (Exception e){
//TODO Error popup and quit chat
}
if (lAddress != null) {
chatRoom = lc.getChatRoom(lAddress);
chatRoom.markAsRead();
contact = ContactsManager.getInstance().findContactWithAddress(getActivity().getContentResolver(), lAddress);
if(chatRoom != null) {
displayChatHeader(lAddress);
dispayMessageList();
}
}
}
public void dispayMessageList() {
messagesList.setChoiceMode(AbsListView.CHOICE_MODE_MULTIPLE);
adapter = new ChatMessageAdapter(getActivity(), chatRoom.getHistory());
@ -490,52 +510,13 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
this.sipUri = newSipUri;
this.displayName = displayName;
this.pictureUri = pictureUri;
if (!message.getText().toString().equals("") && LinphoneActivity.isInstanciated()) {
ChatStorage chatStorage = LinphoneActivity.instance().getChatStorage();
if (chatStorage.getDraft(sipUri) == null) {
chatStorage.saveDraft(sipUri, message.getText().toString());
} else {
chatStorage.updateDraft(sipUri, message.getText().toString());
}
} else if (LinphoneActivity.isInstanciated()) {
LinphoneActivity.instance().getChatStorage().deleteDraft(sipUri);
}
if (LinphoneActivity.isInstanciated()) {
String draft = LinphoneActivity.instance().getChatStorage().getDraft(sipUri);
if (draft == null)
draft = "";
message.setText(draft);
}
LinphoneAddress lAddress = null;
try {
lAddress = LinphoneManager.getLc().interpretUrl(sipUri);
//contact = ContactsManager.getInstance().findContactWithAddress(getActivity().getContentResolver(), lAddress);
} catch (Exception e){
Log.w("error");
}
if(lAddress == null){
//TODO SHOW POPUP
LinphoneActivity.instance().displayChatList();
}
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (lc != null) {
chatRoom = lc.getOrCreateChatRoom(sipUri);
//Only works if using liblinphone storage
chatRoom.markAsRead();
}
displayChatHeader(lAddress);
dispayMessageList();
initChatRoom(sipUri);
}
@Override
public void onCreateContextMenu(ContextMenu menu, View v, ContextMenu.ContextMenuInfo menuInfo) {
if (v.getId() == R.id.sendPicture) {
if (v.getId() == R.id.send_picture) {
menu.add(0, MENU_PICTURE_SMALL, 0, getString(R.string.share_picture_size_small));
menu.add(0, MENU_PICTURE_MEDIUM, 0, getString(R.string.share_picture_size_medium));
menu.add(0, MENU_PICTURE_LARGE, 0, getString(R.string.share_picture_size_large));
@ -588,9 +569,8 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
@Override
public void onPause() {
//message.removeTextChangedListener(textWatcher);
//removeVirtualKeyboardVisiblityListener();
message.removeTextChangedListener(textWatcher);
removeVirtualKeyboardVisiblityListener();
LinphoneService.instance().removeMessageNotification();
@ -604,13 +584,8 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
}
LinphoneManager.removeListener(this);
onSaveInstanceState(getArguments());
// uploadLayout.setVisibility(View.GONE);
// textLayout.setVisibility(View.VISIBLE);
//progressBar.setProgress(0);
//Hide keybord
InputMethodManager imm = (InputMethodManager)getActivity().getSystemService(Context.INPUT_METHOD_SERVICE);
imm.hideSoftInputFromWindow(message.getWindowToken(), 0);
@ -620,8 +595,8 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
@SuppressLint("UseSparseArrays")
@Override
public void onResume() {
//message.addTextChangedListener(textWatcher);
//addVirtualKeyboardVisiblityListener();
message.addTextChangedListener(textWatcher);
addVirtualKeyboardVisiblityListener();
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
if (lc != null) {
@ -631,7 +606,6 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
if (LinphoneActivity.isInstanciated()) {
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CHAT);
LinphoneActivity.instance().updateChatFragment(this);
LinphoneActivity.instance().hideTabBar(false);
}
if(LinphoneManager.getLc().isIncall()){
@ -644,44 +618,17 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
}
}
LinphoneAddress lAddress;
try {
lAddress = LinphoneCoreFactory.instance().createLinphoneAddress(sipUri);
//contact = ContactsManager.getInstance().findContactWithAddress(getActivity().getContentResolver(), lAddress);
} catch (Exception e){
}
LinphoneManager.addListener(this);
final LinphoneChatMessage msg = LinphoneManager.getInstance().getMessageUploadPending();
if(msg != null && msg.getTo().asString().equals(sipUri)){
//uploadLayout.setVisibility(View.VISIBLE);
// textLayout.setVisibility(View.GONE);
// if(msg.getFileTransferInformation() != null){
// progressBar.setProgress(msg.getFileTransferInformation().getRealSize());
// }
/* cancelUpload.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
uploadLayout.setVisibility(View.GONE);
textLayout.setVisibility(View.VISIBLE);
progressBar.setProgress(0);
msg.cancelFileTransfer();
LinphoneManager.getInstance().setUploadPendingFileMessage(null);
}
});*/
}
// Force hide keyboard
getActivity().getWindow().setSoftInputMode(WindowManager.LayoutParams.SOFT_INPUT_STATE_ALWAYS_HIDDEN | WindowManager.LayoutParams.SOFT_INPUT_ADJUST_PAN);
String draft = getArguments().getString("messageDraft");
message.setText(draft);
if(!newChatConversation) {
initChatRoom(sipUri);
remoteComposing.setVisibility(chatRoom.isRemoteComposing() ? View.VISIBLE : View.GONE);
dispayMessageList();
}
super.onResume();
}
@ -715,13 +662,10 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
public void onClick(View v) {
int id = v.getId();
Log.w(id);
if (id == R.id.back_to_call) {
LinphoneActivity.instance().resetClassicMenuLayoutAndGoBackToCallIfStillRunning();
return;
}
if (id == R.id.select_all) {
deselectAll.setVisibility(View.VISIBLE);
selectAll.setVisibility(View.GONE);
@ -736,12 +680,10 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
selectAllList(false);
return;
}
if (id == R.id.cancel) {
quitEditMode();
return;
}
if (id == R.id.delete) {
final Dialog dialog = LinphoneActivity.instance().displayDialog(getString(R.string.delete_text));
Button delete = (Button) dialog.findViewById(R.id.delete);
@ -766,21 +708,17 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
dialog.show();
return;
}
if(id == R.id.sendMessage){
if(id == R.id.send_message){
sendTextMessage();
}
if (id == R.id.edit) {
topBar.setVisibility(View.INVISIBLE);
editList.setVisibility(View.VISIBLE);
isEditMode = true;
dispayMessageList();
//TODO refaire la liste
}
else if (id == R.id.new_discussion) {
//TODO call sipUri
}
else if(id == R.id.start_call){
if(id == R.id.start_call){
LinphoneActivity.instance().setAddresGoToDialerAndCall(sipUri, LinphoneUtils.getUsernameFromAddress(sipUri), null);
}
}
@ -790,7 +728,6 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
message.setText("");
}
private void displayBubbleChat(LinphoneChatMessage message){
adapter.addMessage(message);
adapter.notifyDataSetChanged();
@ -799,46 +736,47 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
private void sendTextMessage(String messageToSend) {
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
boolean isNetworkReachable = lc == null ? false : lc.isNetworkReachable();
LinphoneAddress lAddress = null;
//Start new conversation in fast chat
if(newChatConversation){
if(newChatConversation && chatRoom == null) {
String address = searchContactField.getText().toString();
if(address != null && !address.equals("")) {
LinphoneAddress lAddress = LinphoneManager.getLc().getDefaultProxyConfig().normalizeSipUri(address);
if(lAddress != null) {
chatRoom = lc.getChatRoom(lAddress);
if (chatRoom != null && messageToSend != null && messageToSend.length() > 0 && isNetworkReachable) {
LinphoneChatMessage message = chatRoom.createLinphoneChatMessage(messageToSend);
chatRoom.sendChatMessage(message);
message.setListener(LinphoneManager.getInstance());
exitNewConversationMode(lAddress.asStringUriOnly(), LinphoneUtils.getAddressDisplayName(lAddress));
}
} else {
//TODO ERROR MESSAGE
LinphoneActivity.instance().displayCustomToast(getString(R.string.error_user_not_found), Toast.LENGTH_LONG);
}
if (address != null && !address.equals("")) {
initChatRoom(address);
}
} else {
if (chatRoom != null && messageToSend != null && messageToSend.length() > 0 && isNetworkReachable) {
LinphoneChatMessage message = chatRoom.createLinphoneChatMessage(messageToSend);
chatRoom.sendChatMessage(message);
}
if (chatRoom != null && messageToSend != null && messageToSend.length() > 0 && isNetworkReachable) {
LinphoneChatMessage message = chatRoom.createLinphoneChatMessage(messageToSend);
chatRoom.sendChatMessage(message);
lAddress = chatRoom.getPeerAddress();
if (LinphoneActivity.isInstanciated()) {
LinphoneActivity.instance().onMessageSent(sipUri, messageToSend);
}
if (LinphoneActivity.isInstanciated()) {
LinphoneActivity.instance().onMessageSent(sipUri, messageToSend);
}
message.setListener(LinphoneManager.getInstance());
message.setListener(LinphoneManager.getInstance());
if (newChatConversation) {
exitNewConversationMode(contact, lAddress.asStringUriOnly(), null);
} else {
invalidate();
Log.i("Sent message current status: " + message.getStatus());
} else if (!isNetworkReachable && LinphoneActivity.isInstanciated()) {
LinphoneActivity.instance().displayCustomToast(getString(R.string.error_network_unreachable), Toast.LENGTH_LONG);
}
Log.i("Sent message current status: " + message.getStatus());
} else if (!isNetworkReachable && LinphoneActivity.isInstanciated()) {
LinphoneActivity.instance().displayCustomToast(getString(R.string.error_network_unreachable), Toast.LENGTH_LONG);
}
}
private void sendImageMessage(String path, int imageSize) {
LinphoneCore lc = LinphoneManager.getLcIfManagerNotDestroyedOrNull();
boolean isNetworkReachable = lc == null ? false : lc.isNetworkReachable();
if(newChatConversation && chatRoom == null) {
String address = searchContactField.getText().toString();
if (address != null && !address.equals("")) {
initChatRoom(address);
}
}
invalidate();
if (chatRoom != null && path != null && path.length() > 0 && isNetworkReachable) {
@ -857,18 +795,86 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
LinphoneActivity.instance().displayCustomToast(getString(R.string.error_network_unreachable), Toast.LENGTH_LONG);
}
}
private LinphoneChatMessage getMessageForId(int id) {
for (LinphoneChatMessage message : chatRoom.getHistory()) {
if (message.getStorageId() == id) {
return message;
}
}
return null;
}
private void invalidate() {
adapter.refreshHistory();
adapter.notifyDataSetChanged();
chatRoom.markAsRead();
}
private void resendMessage(int id) {
LinphoneChatMessage message = getMessageForId(id);
if (message == null)
return;
chatRoom.deleteMessage(getMessageForId(id));
invalidate();
if (message.getText() != null && message.getText().length() > 0) {
sendTextMessage(message.getText());
} else {
sendImageMessage(message.getAppData(), 0);
}
}
private void copyTextMessageToClipboard(int id) {
String msg = LinphoneActivity.instance().getChatStorage().getTextMessageForId(chatRoom, id);
if (msg != null) {
Compatibility.copyTextToClipboard(getActivity(), msg);
LinphoneActivity.instance().displayCustomToast(getString(R.string.text_copied_to_clipboard), Toast.LENGTH_SHORT);
}
}
//File transfer
private void pickImage() {
List<Intent> cameraIntents = new ArrayList<Intent>();
Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
File file = new File(Environment.getExternalStorageDirectory(), getString(R.string.temp_photo_name_with_date).replace("%s", String.valueOf(System.currentTimeMillis())));
imageToUploadUri = Uri.fromFile(file);
captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageToUploadUri);
cameraIntents.add(captureIntent);
Intent galleryIntent = new Intent();
galleryIntent.setType("image/*");
galleryIntent.setAction(Intent.ACTION_PICK);
Intent chooserIntent = Intent.createChooser(galleryIntent, getString(R.string.image_picker_title));
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, cameraIntents.toArray(new Parcelable[]{}));
startActivityForResult(chooserIntent, ADD_PHOTO);
}
public String getRealPathFromURI(Uri contentUri) {
String[] proj = {MediaStore.Images.Media.DATA};
CursorLoader loader = new CursorLoader(getActivity(), contentUri, proj, null, null, null);
Cursor cursor = loader.loadInBackground();
if (cursor != null && cursor.moveToFirst()) {
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
String result = cursor.getString(column_index);
cursor.close();
return result;
}
return null;
}
class FileUploadPrepareTask extends AsyncTask<Bitmap, Void, byte[]> {
private String path;
private int imageSize;
private ProgressDialog progressDialog;
public FileUploadPrepareTask(Context context, String fileToUploadPath, int size) {
path = fileToUploadPath;
imageSize = size;
//uploadLayout.setVisibility(View.VISIBLE);
//textLayout.setVisibility(View.GONE);
progressDialog = new ProgressDialog(context);
progressDialog.setIndeterminate(true);
progressDialog.setMessage(getString(R.string.processing_image));
@ -909,128 +915,37 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
byte[] byteArray = stream.toByteArray();
return byteArray;
}
@Override
protected void onPostExecute(byte[] result) {
if (progressDialog != null && progressDialog.isShowing()) {
progressDialog.dismiss();
}
mUploadingImageStream = new ByteArrayInputStream(result);
LinphoneContent content = LinphoneCoreFactory.instance().createLinphoneContent("image", "jpeg", result, null);
String fileName = path.substring(path.lastIndexOf("/") + 1);
content.setName(fileName);
LinphoneChatMessage message = chatRoom.createFileTransferMessage(content);
message.setListener(LinphoneManager.getInstance());
message.setAppData(path);
LinphoneManager.getInstance().setUploadPendingFileMessage(message);
LinphoneManager.getInstance().setUploadPendingFileMessage(message);
LinphoneManager.getInstance().setUploadingImageStream(mUploadingImageStream);
chatRoom.sendChatMessage(message);
currentMessageInFileTransferUploadState = message;
displayBubbleChat(message);
}
}
private LinphoneChatMessage getMessageForId(int id) {
for (LinphoneChatMessage message : chatRoom.getHistory()) {
if (message.getStorageId() == id) {
return message;
}
}
return null;
}
private void invalidate() {
adapter.refreshHistory();
adapter.notifyDataSetChanged();
chatRoom.markAsRead();
}
private void resendMessage(int id) {
LinphoneChatMessage message = getMessageForId(id);
if (message == null)
return;
chatRoom.deleteMessage(getMessageForId(id));
invalidate();
if (message.getText() != null && message.getText().length() > 0) {
sendTextMessage(message.getText());
} else {
sendImageMessage(message.getAppData(), 0);
}
}
private void copyTextMessageToClipboard(int id) {
String msg = LinphoneActivity.instance().getChatStorage().getTextMessageForId(chatRoom, id);
if (msg != null) {
Compatibility.copyTextToClipboard(getActivity(), msg);
LinphoneActivity.instance().displayCustomToast(getString(R.string.text_copied_to_clipboard), Toast.LENGTH_SHORT);
}
}
public String getSipUri() {
return sipUri;
}
private void pickImage() {
List<Intent> cameraIntents = new ArrayList<Intent>();
Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
File file = new File(Environment.getExternalStorageDirectory(), getString(R.string.temp_photo_name_with_date).replace("%s", String.valueOf(System.currentTimeMillis())));
imageToUploadUri = Uri.fromFile(file);
captureIntent.putExtra(MediaStore.EXTRA_OUTPUT, imageToUploadUri);
cameraIntents.add(captureIntent);
Intent galleryIntent = new Intent();
galleryIntent.setType("image/*");
galleryIntent.setAction(Intent.ACTION_PICK);
Intent chooserIntent = Intent.createChooser(galleryIntent, getString(R.string.image_picker_title));
chooserIntent.putExtra(Intent.EXTRA_INITIAL_INTENTS, cameraIntents.toArray(new Parcelable[]{}));
startActivityForResult(chooserIntent, ADD_PHOTO);
}
public String getRealPathFromURI(Uri contentUri) {
String[] proj = {MediaStore.Images.Media.DATA};
CursorLoader loader = new CursorLoader(getActivity(), contentUri, proj, null, null, null);
Cursor cursor = loader.loadInBackground();
if (cursor != null && cursor.moveToFirst()) {
int column_index = cursor.getColumnIndexOrThrow(MediaStore.Images.Media.DATA);
String result = cursor.getString(column_index);
cursor.close();
return result;
}
return null;
}
private void exitNewConversationMode(String address, String username){
searchContactField.setVisibility(View.GONE);
sipUri = address;
messagesList.setVisibility(View.VISIBLE);
contactName.setVisibility(View.VISIBLE);
edit.setVisibility(View.VISIBLE);
back.setVisibility(View.VISIBLE);
startCall.setVisibility(View.VISIBLE);
newChatConversation = false;
chatRoom = LinphoneManager.getLc().getOrCreateChatRoom(address);
changeDisplayedChat(address,username,null);
dispayMessageList();
}
private void showPopupMenuAskingImageSize(final String filePath) {
filePathToUpload = filePath;
try {
sendImage.showContextMenu();
} catch (Exception e) {
e.printStackTrace();
};
}
}
@Override
@ -1053,28 +968,20 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
}
}
@Override
public void onLinphoneChatMessageStateChanged(LinphoneChatMessage msg, State state) {
if (state == State.FileTransferDone || state == State.FileTransferError) {
currentMessageInFileTransferUploadState = null;
}
invalidate();
//New conversation
private void exitNewConversationMode(Contact c, String address, String username){
sipUri = address;
searchContactField.setVisibility(View.GONE);
messagesList.setVisibility(View.VISIBLE);
contactName.setVisibility(View.VISIBLE);
edit.setVisibility(View.VISIBLE);
back.setVisibility(View.VISIBLE);
startCall.setVisibility(View.VISIBLE);
newChatConversation = false;
initChatRoom(sipUri);
}
@Override
public void onLinphoneChatMessageFileTransferReceived(LinphoneChatMessage msg, LinphoneContent content, LinphoneBuffer buffer) {
}
@Override
public void onLinphoneChatMessageFileTransferSent(LinphoneChatMessage msg, LinphoneContent content, int offset, int size, LinphoneBuffer bufferToFill) {
}
@Override
public void onLinphoneChatMessageFileTransferProgressChanged(LinphoneChatMessage msg, LinphoneContent content, int offset, int total) {
//progressBar.setProgress(offset * 100 / total);
}
class ContactAddress {
private class ContactAddress {
Contact contact;
String address;
@ -1086,11 +993,9 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
class SearchContactsListAdapter extends BaseAdapter implements Filterable {
private List<LinphoneFriend> contactList;
private Cursor cursor;
private LayoutInflater mInflater;
SearchContactsListAdapter(List<LinphoneFriend> list, Cursor c, LayoutInflater inflater) {
cursor = c;
SearchContactsListAdapter(LayoutInflater inflater) {
mInflater = inflater;
contactList = new ArrayList<LinphoneFriend>();
contactList = getContactsList();
@ -1100,17 +1005,10 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
public Filter getFilter() {
return new Filter() {
@Override
protected void publishResults(CharSequence constraint,
FilterResults results) {
if (results.count > 0) {
contactList = new ArrayList<LinphoneFriend>();
contactList = (List<LinphoneFriend>) results.values;
notifyDataSetChanged();
} else {
contactList = new ArrayList<LinphoneFriend>();
contactList = getContactsList();
notifyDataSetInvalidated();
}
protected void publishResults(CharSequence constraint, FilterResults results) {
contactList = new ArrayList<LinphoneFriend>();
contactList = getContactsList();
notifyDataSetInvalidated();
}
@Override
@ -1165,9 +1063,6 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
view = mInflater.inflate(R.layout.search_contact_cell, parent, false);
}
final String a = contact.address;
final Contact c = contact.contact;
TextView name = (TextView) view.findViewById(R.id.Contact_name);
name.setText(LinphoneUtils.getAddressDisplayName(f.getAddress()));
@ -1179,7 +1074,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
view.setOnClickListener(new OnClickListener() {
@Override
public void onClick(View view) {
exitNewConversationMode(laddress.asStringUriOnly(),LinphoneUtils.getAddressDisplayName(laddress));
exitNewConversationMode(null,laddress.asStringUriOnly(),LinphoneUtils.getAddressDisplayName(laddress));
}
});
@ -1188,5 +1083,18 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
}
}
//LinphoneChatMessage Listener
@Override
public void onLinphoneChatMessageStateChanged(LinphoneChatMessage msg, State state) {
invalidate();
}
@Override
public void onLinphoneChatMessageFileTransferReceived(LinphoneChatMessage msg, LinphoneContent content, LinphoneBuffer buffer) {}
@Override
public void onLinphoneChatMessageFileTransferSent(LinphoneChatMessage msg, LinphoneContent content, int offset, int size, LinphoneBuffer bufferToFill) {}
@Override
public void onLinphoneChatMessageFileTransferProgressChanged(LinphoneChatMessage msg, LinphoneContent content, int offset, int total) {}
}

View file

@ -241,7 +241,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);
}

View file

@ -27,7 +27,6 @@ import java.util.ArrayList;
import java.util.List;
import org.linphone.compatibility.Compatibility;
import org.linphone.core.LinphoneProxyConfig;
import org.linphone.mediastream.Log;
import org.linphone.mediastream.Version;
import android.annotation.SuppressLint;
import android.app.Activity;
@ -109,7 +108,7 @@ public class ContactEditorFragment extends Fragment {
contactsManager = ContactsManager.getInstance();
view = inflater.inflate(R.layout.edit_contact, container, false);
view = inflater.inflate(R.layout.contact_edit, container, false);
ImageView back = (ImageView) view.findViewById(R.id.back);
back.setOnClickListener(new OnClickListener() {
@ -736,7 +735,7 @@ public class ContactEditorFragment extends Fragment {
newNumberOrAddress = newN;
}
public void save() {;
public void save() {
if (newNumberOrAddress == null || newNumberOrAddress.equals(oldNumberOrAddress))
return;

View file

@ -283,18 +283,17 @@ public class ContactsListFragment extends Fragment implements OnClickListener, O
public void onResume() {
instance = this;
super.onResume();
if (editConsumed) {
editOnClick = false;
sipAddressToAdd = null;
}
if (LinphoneActivity.isInstanciated()) {
LinphoneActivity.instance().selectMenu(FragmentsAvailable.CONTACTS_LIST);
LinphoneActivity.instance().hideTabBar(false);
onlyDisplayLinphoneContacts = ContactsManager.getInstance().isLinphoneContactsPrefered();
}
invalidate();
}

View file

@ -97,7 +97,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());
@ -483,11 +483,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;
}

View file

@ -183,6 +183,7 @@ public class DialerFragment extends Fragment {
mCancel.setEnabled(true);
mCancel.setImageResource(R.drawable.call_alt_back);
mCancel.setOnClickListener(cancelListener);
} else {
mCall.setImageResource(R.drawable.call_audio_start);
mCancel.setVisibility(View.GONE);

View file

@ -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;

View file

@ -306,66 +306,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);

View file

@ -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;
@ -103,7 +102,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
private RelativeLayout history, chat;
private FragmentsAvailable currentFragment, nextFragment;
private List<FragmentsAvailable> fragmentsHistory;
private Fragment dialerFragment, messageListFragment, friendStatusListenerFragment;
private Fragment dialerFragment, messageListFragment;
private ChatFragment chatFragment;
private Fragment.SavedState dialerSavedState;
private boolean newProxyConfig;
@ -118,7 +117,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 +133,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) {
} else if (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 +158,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 +170,7 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
fragmentsHistory = new ArrayList<FragmentsAvailable>();
initButtons();
createSideMenu();
initSideMenu();
currentFragment = nextFragment = FragmentsAvailable.DIALER;
fragmentsHistory.add(currentFragment);
@ -226,7 +224,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 +276,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);
@ -308,9 +293,8 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
chat = (RelativeLayout) findViewById(R.id.chat);
chat.setOnClickListener(this);
chatImage = (ImageView) findViewById(R.id.chat_image);
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() {
@ -332,12 +316,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(){
@ -372,7 +353,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();
@ -396,7 +376,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;
@ -426,11 +406,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()) {
@ -449,7 +424,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());
}
@ -461,16 +436,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);
@ -498,7 +470,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();
@ -508,7 +479,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);
@ -525,6 +496,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);
@ -534,12 +506,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);
}
}
@ -599,7 +571,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) {
@ -611,7 +583,6 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
public void displayAbout() {
changeCurrentFragment(FragmentsAvailable.ABOUT, null);
//settings.setSelected(true);
}
public void displayAssistant() {
@ -647,8 +618,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;
}
@ -662,7 +634,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;
@ -711,7 +683,10 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
} else if (id == R.id.dialer) {
changeCurrentFragment(FragmentsAvailable.DIALER, null);
} else if (id == R.id.chat) {
changeCurrentFragment(FragmentsAvailable.CHATLIST, null);
changeCurrentFragment(FragmentsAvailable.CHAT_LIST, null);
} else if (id == R.id.cancel){
hideTopBar();
displayDialer();
}
}
@ -723,6 +698,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;
@ -747,9 +726,10 @@ public class LinphoneActivity extends Activity implements OnClickListener, Conta
break;
case SETTINGS:
case ACCOUNT_SETTINGS:
//settings.setSelected(true);
hideTabBar(true);
//mTopBar.setVisibility(View.VISIBLE);
break;
case CHATLIST:
case CHAT_LIST:
case CHAT:
chatImage.setImageResource(R.drawable.footer_chat_selected);
break;
@ -784,10 +764,15 @@ 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);
changeCurrentFragment(FragmentsAvailable.ACCOUNT_SETTINGS, bundle);
mTabBar.setVisibility(View.VISIBLE);
//settings.setSelected(true);
}
@ -1202,8 +1187,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);
}
}
@ -1228,7 +1214,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));
@ -1243,16 +1229,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);
@ -1261,14 +1242,14 @@ 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);
sideMenuItemList = (ListView)findViewById(R.id.item_list);
menu = (ImageView) findViewById(R.id.side_menu_button);
sideMenuItemList.setAdapter(new ArrayAdapter<String>(this, R.layout.side_menu_item, sideMenuItems));
sideMenuItemList.setAdapter(new ArrayAdapter<String>(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) {
@ -1309,7 +1290,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) {
@ -1328,9 +1308,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();
@ -1385,8 +1365,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();
}
@ -1429,11 +1407,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);

View file

@ -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();

View file

@ -280,10 +280,9 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
this.mUploadingImageStream = array;
}
@Override
public void onLinphoneChatMessageStateChanged(LinphoneChatMessage msg, LinphoneChatMessage.State state) {
if (state == LinphoneChatMessage.State.FileTransferDone || state == LinphoneChatMessage.State.FileTransferError) {
if (state == LinphoneChatMessage.State.FileTransferDone) {
if(msg.isOutgoing() && mUploadingImageStream != null){
mUploadPendingFileMessage = null;
mUploadingImageStream = null;
@ -300,6 +299,10 @@ public class LinphoneManager implements LinphoneCoreListener, LinphoneChatMessag
}
}
if(state == LinphoneChatMessage.State.FileTransferError) {
//TODO
}
for (LinphoneChatMessage.LinphoneChatMessageListener l: simpleListeners) {
l.onLinphoneChatMessageStateChanged(msg, state);
}
@ -649,6 +652,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 +662,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);
}

View file

@ -79,7 +79,7 @@ public final class LinphoneService extends Service {
public static final int IC_LEVEL_ORANGE=0;
/*private static final int IC_LEVEL_GREEN=1;
private static final int IC_LEVEL_RED=2;*/
public static final int IC_LEVEL_OFFLINE=3;
//public static final int IC_LEVEL_OFFLINE=3;
private static LinphoneService instance;
@ -155,8 +155,10 @@ 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_secure_phone, bm, mNotifContentIntent, true,notifcationsPriority);
LinphoneManager.createAndStart(LinphoneService.this);
instance = this; // instance is ready once linphone manager has been created
@ -534,7 +536,7 @@ public final class LinphoneService extends Service {
bm = BitmapFactory.decodeResource(getResources(), R.drawable.linphone_logo);
} catch (Exception e) {
}
mNotif = Compatibility.createNotification(this, mNotificationTitle, text, R.drawable.status_level, level, bm, mNotifContentIntent, true,notifcationsPriority);
mNotif = Compatibility.createNotification(this, mNotificationTitle, text, R.drawable.status_level, 0, bm, mNotifContentIntent, true,notifcationsPriority);
notifyWrapper(NOTIF_ID, mNotif);
}

View file

@ -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) {

View file

@ -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<CharSequence> entries = new ArrayList<CharSequence>();
List<CharSequence> values = new ArrayList<CharSequence>();
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<CharSequence> entries = new ArrayList<CharSequence>();
List<CharSequence> values = new ArrayList<CharSequence>();
@ -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) {
@ -885,7 +848,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 +974,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 +994,10 @@ public class SettingsFragment extends PreferencesListFragment {
}
}
@Override
public void onPause() {
LinphoneActivity.instance().hideTopBar();
super.onPause();
}
}

View file

@ -71,10 +71,12 @@ public class AssistantActivity extends Activity implements OnClickListener {
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
if (getResources().getBoolean(R.bool.isTablet) && getRequestedOrientation() != ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
}
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
} else if (getResources().getBoolean(R.bool.orientation_portrait_only)) {
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
}
setContentView(R.layout.assistant);
initUI();
@ -108,8 +110,8 @@ public class AssistantActivity extends Activity implements OnClickListener {
}
};
instance = this;
};
}
@Override
protected void onResume() {
super.onResume();

View file

@ -102,16 +102,6 @@ public class ApiFivePlus {
Uri uri = Data.CONTENT_URI;
String[] projection = {ContactsContract.CommonDataKinds.Im.DATA};
// Phone Numbers
Cursor c = cr.query(Phone.CONTENT_URI, new String[] { Phone.NUMBER }, Phone.CONTACT_ID + " = " + id, null, null);
if (c != null) {
while (c.moveToNext()) {
String number = c.getString(c.getColumnIndex(Phone.NUMBER));
list.add(number);
}
c.close();
}
// IM addresses
String selection = new StringBuilder()
@ -122,7 +112,7 @@ public class ApiFivePlus {
.append(ContactsContract.CommonDataKinds.Im.CUSTOM_PROTOCOL)
.append(") = 'sip'")
.toString();
c = cr.query(uri, projection, selection, new String[]{id}, null);
Cursor c = cr.query(uri, projection, selection, new String[]{id}, null);
if (c != null) {
int nbId = c.getColumnIndex(ContactsContract.CommonDataKinds.Im.DATA);
while (c.moveToNext()) {
@ -131,6 +121,16 @@ public class ApiFivePlus {
c.close();
}
// Phone Numbers
c = cr.query(Phone.CONTENT_URI, new String[]{Phone.NUMBER}, Phone.CONTACT_ID + " = " + id, null, null);
if (c != null) {
while (c.moveToNext()) {
String number = c.getString(c.getColumnIndex(Phone.NUMBER));
list.add(number);
}
c.close();
}
return list;
}

View file

@ -99,16 +99,6 @@ public class ApiNinePlus {
Uri uri = Data.CONTENT_URI;
String[] projection;
// Phone Numbers
Cursor c = cr.query(Phone.CONTENT_URI, new String[] { Phone.NUMBER }, Phone.CONTACT_ID + " = " + id, null, null);
if (c != null) {
while (c.moveToNext()) {
String number = c.getString(c.getColumnIndex(Phone.NUMBER));
list.add(number);
}
c.close();
}
// SIP addresses
String selection2 = new StringBuilder()
.append(Data.CONTACT_ID)
@ -119,7 +109,7 @@ public class ApiNinePlus {
.append("'")
.toString();
projection = new String[] {ContactsContract.CommonDataKinds.SipAddress.SIP_ADDRESS};
c = cr.query(uri, projection, selection2, new String[]{id}, null);
Cursor c = cr.query(uri, projection, selection2, new String[]{id}, null);
if (c != null) {
int nbid = c.getColumnIndex(ContactsContract.CommonDataKinds.SipAddress.SIP_ADDRESS);
while (c.moveToNext()) {
@ -128,6 +118,16 @@ public class ApiNinePlus {
c.close();
}
// Phone Numbers
c = cr.query(Phone.CONTENT_URI, new String[] { Phone.NUMBER }, Phone.CONTACT_ID + " = " + id, null, null);
if (c != null) {
while (c.moveToNext()) {
String number = c.getString(c.getColumnIndex(Phone.NUMBER));
list.add(number);
}
c.close();
}
return list;
}

View file

@ -27,7 +27,6 @@ import java.util.HashMap;
import java.util.Map.Entry;
import org.linphone.Contact;
import org.linphone.ContactsManager;
import org.linphone.LinphoneManager;
import org.linphone.LinphoneUtils;
import org.linphone.R;
@ -45,7 +44,6 @@ import android.graphics.Bitmap;
import android.graphics.BitmapFactory;
import android.graphics.drawable.BitmapDrawable;
import android.graphics.drawable.Drawable;
import android.media.Image;
import android.media.ThumbnailUtils;
import android.net.Uri;
import android.os.AsyncTask;
@ -62,7 +60,6 @@ import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.ProgressBar;
import android.widget.RelativeLayout;
import android.widget.TextView;
@ -96,12 +93,10 @@ public class BubbleChat implements LinphoneChatMessage.LinphoneChatMessageListen
} else {
view = LayoutInflater.from(context).inflate(R.layout.chat_bubble_incoming, null);
}
view.setId(message.getStorageId());
defaultBitmap = BitmapFactory.decodeResource(mContext.getResources(), R.drawable.chat_picture_over);
inprogress = (ProgressBar) view.findViewById(R.id.inprogress);
view.setId(message.getStorageId());
progressBar = (ProgressBar) view.findViewById(R.id.progress_bar);
LinphoneChatMessage.State status = message.getStatus();
@ -120,6 +115,9 @@ public class BubbleChat implements LinphoneChatMessage.LinphoneChatMessageListen
}
}
String externalBodyUrl = message.getExternalBodyUrl();
LinphoneContent fileTransferContent = message.getFileTransferInformation();
if(nativeMessage.isOutgoing()){
cancelUpload = (Button) view.findViewById(R.id.cancel_upload);
cancelUpload.setOnClickListener(new View.OnClickListener() {
@ -127,8 +125,6 @@ public class BubbleChat implements LinphoneChatMessage.LinphoneChatMessageListen
public void onClick(View v) {
if (LinphoneManager.getInstance().getMessageUploadPending() != null) {
progressBar.setVisibility(View.GONE);
//tex.setVisibility(View.VISIBLE);
progressBar.setProgress(0);
nativeMessage.cancelFileTransfer();
LinphoneManager.getInstance().setUploadPendingFileMessage(null);
@ -137,9 +133,6 @@ public class BubbleChat implements LinphoneChatMessage.LinphoneChatMessageListen
});
}
String externalBodyUrl = message.getExternalBodyUrl();
LinphoneContent fileTransferContent = message.getFileTransferInformation();
if(LinphoneManager.getInstance().getMessageUploadPending() != null){
progressBar.setVisibility(View.VISIBLE);
LinphoneManager.addListener(this);
@ -153,7 +146,7 @@ public class BubbleChat implements LinphoneChatMessage.LinphoneChatMessageListen
imageView.setVisibility(View.VISIBLE);
loadBitmap(appData, imageView);
RelativeLayout imageLayout = (RelativeLayout) view.findViewById(R.id.imageLayout);
RelativeLayout imageLayout = (RelativeLayout) view.findViewById(R.id.file_transfer_layout);
if(LinphoneManager.getInstance().getMessageUploadPending() != null && LinphoneManager.getInstance().getMessageUploadPending().getStorageId() == nativeMessage.getStorageId()){
inprogress.setVisibility(View.INVISIBLE);
imageLayout.setVisibility(View.VISIBLE);
@ -165,8 +158,8 @@ public class BubbleChat implements LinphoneChatMessage.LinphoneChatMessageListen
appData = null;
}
RelativeLayout imageLayout = (RelativeLayout) view.findViewById(R.id.imageLayout);
Button acceptDownload = (Button) view.findViewById(R.id.accept_download);
RelativeLayout imageLayout = (RelativeLayout) view.findViewById(R.id.file_transfer_layout);
acceptDownload = (Button) view.findViewById(R.id.accept_download);
if (appData == null) {
LinphoneManager.addListener(this);

View file

@ -81,7 +81,7 @@ public class CallButton extends ImageView implements OnClickListener, AddressAwa
} catch (LinphoneCoreException e) {
LinphoneManager.getInstance().terminateCall();
onWrongDestinationAddress();
};
}
}
protected void onWrongDestinationAddress() {

View file

@ -215,7 +215,7 @@ public class Digit extends Button implements AddressAware {
}
return true;
}
};
}
}

@ -1 +1 @@
Subproject commit 91ea725ebd9ce931de6356235bf1b500aeaa86fa
Subproject commit 5ecb508253f7f19d5c0b40d598fc9bec8ef6a447

View file

@ -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)

View file

@ -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)

View file

@ -1,16 +0,0 @@
MY_WEBRTC_COMMON_DEFS := \
-DWEBRTC_ANDROID \
-DWEBRTC_LINUX \
-DWEBRTC_CLOCK_TYPE_REALTIME
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

View file

@ -1,125 +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/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 \
spl_version.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)/../..
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.s \
downsample_fast_neon.s \
min_max_operations_neon.s \
vector_scaling_operations_neon.s
# Flags passed to both C and C++ files.
LOCAL_CFLAGS := \
$(MY_WEBRTC_COMMON_DEFS) \
$(MY_ARM_CFLAGS_NEON)
LOCAL_C_INCLUDES := \
$(LOCAL_PATH)/include \
$(LOCAL_PATH)/../..
ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)
endif # ifeq ($(WEBRTC_BUILD_NEON_LIBS),true)

View file

@ -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

View file

@ -1,87 +0,0 @@
#############################
# Build the non-neon library.
MY_WEBRTC_PATH := $(call my-dir)/../../../
LOCAL_PATH := $(MY_WEBRTC_PATH)/../../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
# 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_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.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)/include \
$(LOCAL_PATH)/../../.. \
$(LOCAL_PATH)/../../../common_audio/signal_processing/include \
$(MY_WEBRTC_PATH)/modules/audio_processing/aecm
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)

View file

@ -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

View file

@ -1,43 +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/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 := \
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_SHARED_LIBRARIES := \
libcutils \
libdl \
libstlport
ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)

View file

@ -1,39 +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/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
ifndef NDK_ROOT
include external/stlport/libstlport.mk
endif
include $(BUILD_STATIC_LIBRARY)

Some files were not shown because too many files have changed in this diff Show more