Merge remote-tracking branch 'master/master' into bellesip

Conflicts:
	.classpath
	res/values/non_localizable_custom.xml
	res/values/strings.xml
	src/org/linphone/HistoryDetailFragment.java
	submodules/linphone
This commit is contained in:
Sylvain Berfini 2013-06-12 10:59:39 +02:00
commit 42e4cdc671
41 changed files with 641 additions and 281 deletions

View file

@ -1,16 +1,17 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<classpath> <classpath>
<classpathentry kind="src" path="gen"/>
<classpathentry excluding="org/linphone/mediastream/MediastreamerActivity.java" kind="src" path="submodules/linphone/mediastreamer2/java/src"/> <classpathentry excluding="org/linphone/mediastream/MediastreamerActivity.java" kind="src" path="submodules/linphone/mediastreamer2/java/src"/>
<classpathentry kind="src" path="submodules/linphone/java/j2se"/> <classpathentry kind="src" path="submodules/linphone/java/j2se"/>
<classpathentry kind="src" path="submodules/linphone/java/common"/> <classpathentry kind="src" path="submodules/linphone/java/common"/>
<classpathentry kind="src" path="submodules/linphone/java/impl"/> <classpathentry kind="src" path="submodules/linphone/java/impl"/>
<classpathentry kind="src" path="submodules/externals/axmlrpc/src/main/java"/> <classpathentry kind="src" path="submodules/externals/axmlrpc/src/main/java"/>
<classpathentry kind="src" path="src"/>
<classpathentry kind="src" path="submodules/linphone/coreapi/help/java"/> <classpathentry kind="src" path="submodules/linphone/coreapi/help/java"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/> <classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
<classpathentry kind="lib" path="libs/android-support-v4.jar"/> <classpathentry kind="lib" path="libs/android-support-v4.jar"/>
<classpathentry kind="lib" path="libs/gcm.jar"/> <classpathentry exported="true" kind="lib" path="libs/gcm.jar"/>
<classpathentry kind="src" path="src"/> <classpathentry exported="true" kind="con" path="com.android.ide.eclipse.adt.DEPENDENCIES"/>
<classpathentry kind="src" path="gen"/>
<classpathentry kind="output" path="bin/classes"/> <classpathentry kind="output" path="bin/classes"/>
</classpath> </classpath>

View file

@ -163,7 +163,7 @@ run-tests:
$(SDK_PATH)/android update test-project --path . -m ../ && \ $(SDK_PATH)/android update test-project --path . -m ../ && \
ant debug && \ ant debug && \
ant installd && \ ant installd && \
ant test adb shell am instrument -w -e size small org.linphone.test/android.test.InstrumentationTestRunner
clean: clean:
$(NDK_PATH)/ndk-build clean $(LIBLINPHONE_OPTIONS) $(NDK_PATH)/ndk-build clean $(LIBLINPHONE_OPTIONS)

View file

@ -11,12 +11,12 @@ ifeq ($(BUILD_G729),)
BUILD_G729=0 BUILD_G729=0
endif endif
BUILD_SRTP=1 BUILD_SRTP=1
BUILD_X264=0
LINPHONE_VIDEO=0
ifeq ($(TARGET_ARCH_ABI),armeabi-v7a) ifeq ($(TARGET_ARCH_ABI),armeabi-v7a)
BUILD_X264=1 BUILD_X264=1
LINPHONE_VIDEO=1 LINPHONE_VIDEO=1
else
LINPHONE_VIDEO=0
BUILD_X264=0
endif endif
include $(linphone-root-dir)/submodules/linphone/mediastreamer2/src/android/libneon/Android.mk include $(linphone-root-dir)/submodules/linphone/mediastreamer2/src/android/libneon/Android.mk

View file

@ -0,0 +1,51 @@
<?xml version="1.0" encoding="utf-8"?>
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="match_parent"
android:layout_height="match_parent">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical"
android:background="@drawable/background"
android:gravity="center">
<ImageView
android:contentDescription="@string/content_description_welcome"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:src="@drawable/logo_linphone_57x57" />
<TextView
android:id="@+id/textView1"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:paddingTop="5dp"
android:text="@string/app_name"
android:textAppearance="?android:attr/textAppearanceLarge"
android:textColor="@color/text_default"
android:textSize="30dp"
android:textStyle="bold" />
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/about_text"
android:autoLink="web"
android:gravity="center"
android:paddingTop="50sp"
android:textStyle="bold"
android:textColor="@android:color/black"
android:id="@+id/AboutText"/>
<Button android:id="@+id/exit"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/menu_exit"
android:visibility="visible"
android:layout_marginTop="30sp"/>
</LinearLayout>
</ScrollView>

View file

@ -57,6 +57,7 @@
android:background="@drawable/setup_field_background" /> android:background="@drawable/setup_field_background" />
<RelativeLayout <RelativeLayout
android:id="@+id/setup_apply_button"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">

View file

@ -217,18 +217,6 @@
android:visibility="gone" android:visibility="gone"
android:layout_alignParentRight="true" /> android:layout_alignParentRight="true" />
<TextView
android:id="@+id/exit"
android:text="@string/menu_exit"
android:textColor="@android:color/white"
android:textSize="14dp"
android:layout_centerVertical="true"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:gravity="center_vertical"
android:layout_alignParentRight="true"
android:paddingRight="10dp" />
</RelativeLayout> </RelativeLayout>
</org.linphone.ui.SlidingDrawer> </org.linphone.ui.SlidingDrawer>

View file

@ -19,6 +19,14 @@
android:layout_height="wrap_content" android:layout_height="wrap_content"
android:layout_weight="1" /> android:layout_weight="1" />
<Button
android:id="@+id/download"
android:text="@string/download_image"
android:visibility="gone"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_weight="1" />
<TextView <TextView
android:id="@+id/time" android:id="@+id/time"
android:textColor="@android:color/darker_gray" android:textColor="@android:color/darker_gray"

View file

@ -19,6 +19,13 @@
android:layout_width="wrap_content" android:layout_width="wrap_content"
android:layout_height="wrap_content" /> android:layout_height="wrap_content" />
<Button
android:id="@+id/download"
android:visibility="gone"
android:text="@string/download_image"
android:layout_width="wrap_content"
android:layout_height="wrap_content" />
<TextView <TextView
android:id="@+id/time" android:id="@+id/time"
android:textColor="@android:color/darker_gray" android:textColor="@android:color/darker_gray"

View file

@ -56,6 +56,7 @@
android:background="@drawable/setup_field_background" /> android:background="@drawable/setup_field_background" />
<RelativeLayout <RelativeLayout
android:id="@+id/setup_apply_button"
android:layout_marginTop="10dp" android:layout_marginTop="10dp"
android:layout_width="match_parent" android:layout_width="match_parent"
android:layout_height="wrap_content"> android:layout_height="wrap_content">

View file

@ -10,6 +10,15 @@
<string name="notification_register_failure">Erreur lors de l\'enregistrement en tant que %s</string> <string name="notification_register_failure">Erreur lors de l\'enregistrement en tant que %s</string>
<string name="about_text">Linphone %s téléphone compatible SIP (rfc 3261) sous licence GPL V2\n http://www.linphone.org\n\nInstructions\nhttp://www.linphone.org/m/help\n\n© 2011 Belledonne Communications</string> <string name="about_text">Linphone %s téléphone compatible SIP (rfc 3261) sous licence GPL V2\n http://www.linphone.org\n\nInstructions\nhttp://www.linphone.org/m/help\n\n© 2011 Belledonne Communications</string>
<string name="setup_welcome">Cet assistant va vous aider à configurer un compte SIP pour vos appels.</string>
<string name="setup_create_account">Créer un compte linphone.org</string>
<string name="setup_login_linphone">J\'ai déjà un compte linphone.org</string>
<string name="setup_login_generic">J\'ai déjà un compte SIP</string>
<string name="setup_linphone_account_hint">Entrez votre nom d\'utilisateur et votre mot de passe linphone.org</string>
<string name="setup_general_account_hint">Entrez votre nom d\'utilisateur, votre mot de passe et le domaine de votre compte SIP</string>
<string name="setup_username_hint">nom d\'utilisateur</string>
<string name="tunnel_host"></string> <string name="tunnel_host"></string>
<string name="default_tunnel_mode_entry_value">@string/tunnel_mode_entry_value_disabled</string> <string name="default_tunnel_mode_entry_value">@string/tunnel_mode_entry_value_disabled</string>
</resources> </resources>

View file

@ -152,8 +152,6 @@
<string name="cont">Continuer</string> <string name="cont">Continuer</string>
<string name="never_remind">Ne plus me le rapeller</string> <string name="never_remind">Ne plus me le rapeller</string>
<string name="config_error">%s, voulez-vous aller dans les paramètres ?</string> <string name="config_error">%s, voulez-vous aller dans les paramètres ?</string>
<string name="initial_config_error">&lt;P ALIGN=CENTER&gt;Aucun compte SIP configuré, voulez-vous aller dans les paramètres ?&lt;br/&gt;&lt;br/&gt; Besoin d\'aide ?&lt;br/&gt; &quot;http://www.linphone.org/m/help&quot;&lt;/p&gt;</string>
<string name="first_launch_message">&lt;P ALIGN=CENTER&gt;Bienvenue dans le téléphone SIP Linphone&lt;br/&gt;&lt;br/&gt; Si vous êtes nouveau, jetez un oeil à &lt;br/&gt; &quot;http://www.linphone.org/m/help&quot;&lt;/p&gt; </string>
<string name="ec_calibration_launch_message">Démarrage de la calibration de l\'annulateur d\'écho</string> <string name="ec_calibration_launch_message">Démarrage de la calibration de l\'annulateur d\'écho</string>
<string name="warning_already_incall">Impossible de démarrer un nouvel appel, un appel est en cours</string> <string name="warning_already_incall">Impossible de démarrer un nouvel appel, un appel est en cours</string>
<string name="tab_history">Historique</string> <string name="tab_history">Historique</string>
@ -271,14 +269,7 @@
<string name="content_description_mark"></string> <string name="content_description_mark"></string>
<string name="setup_title">Assistant de configuration des comptes</string> <string name="setup_title">Assistant de configuration des comptes</string>
<string name="setup_welcome">Cet assistant va vous aider à configurer un compte SIP pour vos appels.</string>
<string name="setup_create_account">Créer un compte linphone.org</string>
<string name="setup_login_linphone">J\'ai déjà un compte linphone.org</string>
<string name="setup_login_generic">J\'ai déjà un compte SIP</string>
<string name="setup_linphone_account_hint">Entrez votre nom d\'utilisateur et votre mot de passe linphone.org</string>
<string name="setup_general_account_hint">Entrez votre nom d\'utilisateur, votre mot de passe et le domaine de votre compte SIP</string>
<string name="setup_apply">Appliquer</string> <string name="setup_apply">Appliquer</string>
<string name="setup_username_hint">nom d\'utilisateur</string>
<string name="setup_password_hint">mot de passe</string> <string name="setup_password_hint">mot de passe</string>
<string name="setup_domain_hint">domaine</string> <string name="setup_domain_hint">domaine</string>
<string name="setup_password_confirm_hint">confirmez le mot de passe</string> <string name="setup_password_confirm_hint">confirmez le mot de passe</string>
@ -377,4 +368,7 @@
<string name="call_state_incoming">Reçu</string> <string name="call_state_incoming">Reçu</string>
<string name="pref_background_mode">Actif en arrière plan</string> <string name="pref_background_mode">Actif en arrière plan</string>
<string name="download_image">Télécharger</string>
<string name="download_image_failed">Téléchargement échoué. Vérifiez votre connexion internet ou reéssayez plus tard.</string>
</resources> </resources>

View file

@ -10,6 +10,13 @@
<string name="notification_register_failure">Ошибка регистрации в %s</string> <string name="notification_register_failure">Ошибка регистрации в %s</string>
<string name="about_text">Linphone %s SIP (rfc 3261) совместимый телефон под GPL V2 лицензией\n http://www.linphone.org\n\nИнструкции\nhttp://www.linphone.org/m/help\n\n© 2011 Belledonne Communications</string> <string name="about_text">Linphone %s SIP (rfc 3261) совместимый телефон под GPL V2 лицензией\n http://www.linphone.org\n\nИнструкции\nhttp://www.linphone.org/m/help\n\n© 2011 Belledonne Communications</string>
<string name="setup_welcome">Этот помощник поможет Вам настроить учётную запись SIP для звонков.</string>
<string name="setup_create_account">Создать учётную запись на linphone.org</string>
<string name="setup_login_linphone">Уже есть учётная запись на linphone.org</string>
<string name="setup_login_generic">Уже есть учётная запись SIP</string>
<string name="setup_linphone_account_hint">Введите имя пользователя и пароль учётной записи linphone.org</string>
<string name="setup_general_account_hint">Введите имя пользователя, пароль и сервер учётной записи SIP</string>
<string name="tunnel_host"></string> <string name="tunnel_host"></string>
<string name="default_tunnel_mode_entry_value">@string/tunnel_mode_entry_value_disabled</string> <string name="default_tunnel_mode_entry_value">@string/tunnel_mode_entry_value_disabled</string>
</resources> </resources>

View file

@ -197,8 +197,6 @@
<string name="cont">Продолжить</string> <string name="cont">Продолжить</string>
<string name="never_remind">Больше не напоминать</string> <string name="never_remind">Больше не напоминать</string>
<string name="config_error">%s, хотите ли вы перейти к настройкам ?</string> <string name="config_error">%s, хотите ли вы перейти к настройкам ?</string>
<string name="initial_config_error">&lt;P ALIGN=CENTER&gt;Учётная запись SIP не настроена, хотите ли вы перейти к настройкам page ?&lt;br/&gt;&lt;br/&gt; Нужна помощь ?&lt;br/&gt; &quot;http://www.linphone.org/m/help&quot;&lt;/p&gt;</string>
<string name="first_launch_message">&lt;P ALIGN=CENTER&gt;Добро пожаловать в SIP телефон Linphone&lt;br/&gt;&lt;br/&gt; Если Вы новичок SIP, посетите&lt;br/&gt; &quot;http://www.linphone.org/m/help&quot;&lt;/p&gt; </string>
<string name="ec_calibration_launch_message">Начинаем автоматическую настройку шумоподавления</string> <string name="ec_calibration_launch_message">Начинаем автоматическую настройку шумоподавления</string>
<string name="warning_already_incall">Невозможно начать новый звонок, звонок уже идёт</string> <string name="warning_already_incall">Невозможно начать новый звонок, звонок уже идёт</string>
<string name="tab_history">История</string> <string name="tab_history">История</string>
@ -319,12 +317,6 @@
<string name="content_description_mark"></string> <string name="content_description_mark"></string>
<string name="setup_title">Помощник Настройки учётной записи</string> <string name="setup_title">Помощник Настройки учётной записи</string>
<string name="setup_welcome">Этот помощник поможет Вам настроить учётную запись SIP для звонков.</string>
<string name="setup_create_account">Создать учётную запись на linphone.org</string>
<string name="setup_login_linphone">Уже есть учётная запись на linphone.org</string>
<string name="setup_login_generic">Уже есть учётная запись SIP</string>
<string name="setup_linphone_account_hint">Введите имя пользователя и пароль учётной записи linphone.org</string>
<string name="setup_general_account_hint">Введите имя пользователя, пароль и сервер учётной записи SIP</string>
<string name="setup_apply">Применить</string> <string name="setup_apply">Применить</string>
<string name="setup_username_hint">имя пользователя</string> <string name="setup_username_hint">имя пользователя</string>
<string name="setup_password_hint">пароль</string> <string name="setup_password_hint">пароль</string>

View file

@ -15,6 +15,15 @@
<string name="notification_register_failure">Fails to register to %s</string> <string name="notification_register_failure">Fails to register to %s</string>
<string name="about_text">Linphone %s SIP (rfc 3261) compatible phone under GNU Public License V2\n http://www.linphone.org\n\nInstructions\nhttp://www.linphone.org/m/help\n\n© 2011 Belledonne Communications</string> <string name="about_text">Linphone %s SIP (rfc 3261) compatible phone under GNU Public License V2\n http://www.linphone.org\n\nInstructions\nhttp://www.linphone.org/m/help\n\n© 2011 Belledonne Communications</string>
<string name="setup_welcome">This assistant will help you to use a SIP account for your calls.</string>
<string name="setup_create_account">Create an account on linphone.org</string>
<string name="setup_login_linphone">I already have a linphone.org account</string>
<string name="setup_login_generic">I already have a SIP account</string>
<string name="setup_linphone_account_hint">Enter your linphone.org username and password</string>
<string name="setup_general_account_hint">Enter your SIP account username, password and domain</string>
<string name="setup_username_hint">username</string>
<string name="tunnel_host"></string> <string name="tunnel_host"></string>
</resources> </resources>

View file

@ -8,6 +8,7 @@
<string name="push_sender_id">622464153529</string> <string name="push_sender_id">622464153529</string>
<string name="default_domain">sip.linphone.org</string> <string name="default_domain">sip.linphone.org</string>
<bool name="override_domain_using_default_one">false</bool> <!-- Replace the domain for outgoing calls by the one above -->
<string name="wizard_url">https://www.linphone.org/wizard.php</string> <string name="wizard_url">https://www.linphone.org/wizard.php</string>
<!-- Interface settings --> <!-- Interface settings -->
@ -19,10 +20,14 @@
<bool name="hide_camera_settings">false</bool> <bool name="hide_camera_settings">false</bool>
<bool name="replace_wizard_with_old_interface">false</bool> <bool name="replace_wizard_with_old_interface">false</bool>
<bool name="hide_wizard">false</bool> <bool name="hide_wizard">false</bool>
<string name="setup_forced_proxy"></string>
<bool name="setup_cancel_move_to_back">false</bool>
<bool name="setup_use_linphone_as_first_fragment">false</bool>
<bool name="setup_account_validation_mandatory">false</bool>
<bool name="hide_linphone_accounts_wizard">false</bool> <bool name="hide_linphone_accounts_wizard">false</bool>
<bool name="hide_generic_accounts_wizard">false</bool> <bool name="hide_generic_accounts_wizard">false</bool>
<bool name="hide_accounts">false</bool> <bool name="hide_accounts">false</bool>
<bool name="use_first_login_activity">true</bool> <bool name="display_account_wizard_at_first_start">true</bool>
<bool name="use_android_native_contact_edit_interface">false</bool> <bool name="use_android_native_contact_edit_interface">false</bool>
<!-- The following settings are only usefull if use_android_native_contact_edit_interface = false --> <!-- The following settings are only usefull if use_android_native_contact_edit_interface = false -->
@ -35,14 +40,15 @@
<bool name="lock_statusbar">false</bool> <bool name="lock_statusbar">false</bool>
<bool name="emoticons_in_messages">true</bool> <bool name="emoticons_in_messages">true</bool>
<bool name="only_display_username_if_unknown">true</bool> <!-- Display username for all sip addresses (if not in contact and display name empty) --> <bool name="only_display_username_if_unknown">true</bool> <!-- Display username for all sip addresses (if not in contact and display name empty) -->
<bool name="never_display_sip_addresses">false</bool> <!-- To use only with the above setting set to true -->
<bool name="display_messages_time_and_status">true</bool> <!-- Used to show the time of each message arrival --> <bool name="display_messages_time_and_status">true</bool> <!-- Used to show the time of each message arrival -->
<bool name="display_time_aside">false</bool> <!-- if display_messages_time = true, display time on the side of the message instead of below --> <bool name="display_time_aside">false</bool> <!-- if display_messages_time = true, display time on the side of the message instead of below -->
<bool name="display_call_stats">true</bool>
<bool name="enable_linphone_friends">false</bool> <bool name="enable_linphone_friends">false</bool>
<bool name="display_call_stats">true</bool>
<bool name="show_current_calls_above_video">false</bool> <bool name="show_current_calls_above_video">false</bool>
<bool name="disable_options_in_call">false</bool>
<!-- Behavior Settings --> <!-- Behavior Settings -->
<bool name="allow_chat_multiline">false</bool> <bool name="allow_chat_multiline">false</bool>
@ -52,11 +58,11 @@
<bool name="allow_edit_in_dialer">true</bool> <bool name="allow_edit_in_dialer">true</bool>
<bool name="forbid_self_call">false</bool> <bool name="forbid_self_call">false</bool>
<bool name="disable_chat">false</bool> <bool name="disable_chat">false</bool>
<bool name="disable_chat_send_file">false</bool>
<bool name="hash_images_as_name_before_upload">true</bool> <bool name="hash_images_as_name_before_upload">true</bool>
<bool name="route_audio_to_bluetooth_if_available">true</bool> <bool name="enable_log_collect">false</bool>
<bool name="disable_every_log">false</bool> <bool name="disable_every_log">false</bool>
<bool name="disable_all_security_features_for_markets">false</bool> <!-- Disable TLS/SRTP/ZRTP --> <bool name="disable_all_security_features_for_markets">false</bool> <!-- Disable TLS/SRTP/ZRTP -->
<bool name="disable_all_patented_codecs_for_markets">false</bool> <!-- Disable MPEG4/H264 --> <bool name="disable_all_patented_codecs_for_markets">false</bool> <!-- Disable MPEG4/H264 -->

View file

@ -197,8 +197,6 @@
<string name="cont">Continue</string> <string name="cont">Continue</string>
<string name="never_remind">Never remind me</string> <string name="never_remind">Never remind me</string>
<string name="config_error">%s, do you want to go to the settings page ?</string> <string name="config_error">%s, do you want to go to the settings page ?</string>
<string name="initial_config_error">&lt;P ALIGN=CENTER&gt;No SIP account has been configured yet, do you want to go to the settings page ?&lt;br/&gt;&lt;br/&gt; Need help ?&lt;br/&gt; &quot;http://www.linphone.org/m/help&quot;&lt;/p&gt;</string>
<string name="first_launch_message">&lt;P ALIGN=CENTER&gt;Welcome to Linphone SIP phone&lt;br/&gt;&lt;br/&gt; If you are new to SIP, have a look at&lt;br/&gt; &quot;http://www.linphone.org/m/help&quot;&lt;/p&gt; </string>
<string name="ec_calibration_launch_message">Starting echo cancelation audio calibration </string> <string name="ec_calibration_launch_message">Starting echo cancelation audio calibration </string>
<string name="warning_already_incall">Cannot initiate a new call because a call is already engaged</string> <string name="warning_already_incall">Cannot initiate a new call because a call is already engaged</string>
<string name="tab_history">History</string> <string name="tab_history">History</string>
@ -319,14 +317,7 @@
<string name="content_description_mark"></string> <string name="content_description_mark"></string>
<string name="setup_title">Account Setup Assistant</string> <string name="setup_title">Account Setup Assistant</string>
<string name="setup_welcome">This assistant will help you to use a SIP account for your calls.</string>
<string name="setup_create_account">Create an account on linphone.org</string>
<string name="setup_login_linphone">I already have a linphone.org account</string>
<string name="setup_login_generic">I already have a SIP account</string>
<string name="setup_linphone_account_hint">Enter your linphone.org username and password</string>
<string name="setup_general_account_hint">Enter your SIP account username, password and domain</string>
<string name="setup_apply">Apply</string> <string name="setup_apply">Apply</string>
<string name="setup_username_hint">username</string>
<string name="setup_password_hint">password</string> <string name="setup_password_hint">password</string>
<string name="setup_domain_hint">domain</string> <string name="setup_domain_hint">domain</string>
<string name="setup_password_confirm_hint">confirm password</string> <string name="setup_password_confirm_hint">confirm password</string>
@ -426,6 +417,9 @@
<string name="pref_background_mode">Background mode</string> <string name="pref_background_mode">Background mode</string>
<string name="download_image">Download</string>
<string name="download_image_failed">Download failed. Please check your internet access or try again later.</string>
<string name="pref_auth_userid">Auth userid*</string> <string name="pref_auth_userid">Auth userid*</string>
<string name="pref_help_auth_userid">Enter authentication userid (optionnal)</string> <string name="pref_help_auth_userid">Enter authentication userid (optionnal)</string>

View file

@ -226,7 +226,9 @@
<CheckBoxPreference <CheckBoxPreference
android:title="@string/pref_ice_enable" android:title="@string/pref_ice_enable"
android:key="@string/pref_ice_enable_key" android:key="@string/pref_ice_enable_key"
android:defaultValue="@bool/pref_ice_enabled_default"/><CheckBoxPreference android:defaultValue="@bool/pref_ice_enabled_default"/>
<CheckBoxPreference
android:title="@string/pref_upnp_enable" android:title="@string/pref_upnp_enable"
android:key="@string/pref_upnp_enable_key" android:key="@string/pref_upnp_enable_key"
android:defaultValue="@bool/pref_upnp_enabled_default"/> android:defaultValue="@bool/pref_upnp_enabled_default"/>

View file

@ -69,7 +69,12 @@ public class AboutFragment extends Fragment implements OnClickListener {
@Override @Override
public void onClick(View v) { public void onClick(View v) {
if (LinphoneActivity.isInstanciated()) { if (LinphoneActivity.isInstanciated()) {
if (getResources().getBoolean(R.bool.enable_log_collect)) {
LinphoneUtils.collectLogs(getString(R.string.app_name), getString(R.string.about_bugreport_email));
} else {
LinphoneActivity.instance().exit(); LinphoneActivity.instance().exit();
} }
} }
} }
}

View file

@ -1,5 +1,22 @@
package org.linphone; package org.linphone;
/*
BluetoothManager.java
Copyright (C) 2012 Belledonne Communications, Grenoble, France
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
import org.linphone.mediastream.Log; import org.linphone.mediastream.Log;
import android.annotation.TargetApi; import android.annotation.TargetApi;
@ -10,14 +27,19 @@ import android.content.Intent;
import android.media.AudioManager; import android.media.AudioManager;
import android.os.Build; import android.os.Build;
/**
* @author Sylvain Berfini
*/
@TargetApi(Build.VERSION_CODES.HONEYCOMB) @TargetApi(Build.VERSION_CODES.HONEYCOMB)
public class BluetoothManager extends BroadcastReceiver { public class BluetoothManager extends BroadcastReceiver {
@SuppressWarnings("deprecation") @SuppressWarnings("deprecation")
public void onReceive(Context context, Intent intent) { public void onReceive(Context context, Intent intent) {
if (!LinphoneManager.isInstanciated())
return;
String action = intent.getAction(); String action = intent.getAction();
LinphoneManager lm = LinphoneManager.getInstance(); LinphoneManager lm = LinphoneManager.getInstance();
String actionScoConnected = AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED;
if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)) { if (BluetoothDevice.ACTION_ACL_DISCONNECTED.equals(action)) {
Log.e("Bluetooth Received Event" + " ACTION_ACL_DISCONNECTED" ); Log.e("Bluetooth Received Event" + " ACTION_ACL_DISCONNECTED" );
@ -33,7 +55,7 @@ public class BluetoothManager extends BroadcastReceiver {
lm.scoConnected(); lm.scoConnected();
} }
} }
else if (actionScoConnected.equals(action)) { else if (AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED.equals(action)) {
int state = intent.getIntExtra(AudioManager.EXTRA_SCO_AUDIO_STATE, 0); int state = intent.getIntExtra(AudioManager.EXTRA_SCO_AUDIO_STATE, 0);
Log.e("Bluetooth sco state changed : " + state); Log.e("Bluetooth sco state changed : " + state);
if (state == AudioManager.SCO_AUDIO_STATE_CONNECTED) { if (state == AudioManager.SCO_AUDIO_STATE_CONNECTED) {

View file

@ -49,7 +49,7 @@ public class CallManager {
void inviteAddress(LinphoneAddress lAddress, boolean videoEnabled, boolean lowBandwidth) throws LinphoneCoreException { public void inviteAddress(LinphoneAddress lAddress, boolean videoEnabled, boolean lowBandwidth) throws LinphoneCoreException {
LinphoneCore lc = LinphoneManager.getLc(); LinphoneCore lc = LinphoneManager.getLc();
LinphoneCallParams params = lc.createDefaultCallParameters(); LinphoneCallParams params = lc.createDefaultCallParameters();

View file

@ -156,6 +156,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
progressBar = (ProgressBar) view.findViewById(R.id.progressbar); progressBar = (ProgressBar) view.findViewById(R.id.progressbar);
sendImage = (TextView) view.findViewById(R.id.sendPicture); sendImage = (TextView) view.findViewById(R.id.sendPicture);
if (!getResources().getBoolean(R.bool.disable_chat_send_file)) {
registerForContextMenu(sendImage); registerForContextMenu(sendImage);
sendImage.setOnClickListener(new OnClickListener() { sendImage.setOnClickListener(new OnClickListener() {
@Override @Override
@ -163,6 +164,9 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
pickImage(); pickImage();
} }
}); });
} else {
sendImage.setEnabled(false);
}
cancelUpload = (ImageView) view.findViewById(R.id.cancelUpload); cancelUpload = (ImageView) view.findViewById(R.id.cancelUpload);
cancelUpload.setOnClickListener(new OnClickListener() { cancelUpload.setOnClickListener(new OnClickListener() {
@ -308,10 +312,10 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
if (msg.getMessage() != null) { if (msg.getMessage() != null) {
displayMessage(msg.getId(), msg.getMessage(), msg.getTimestamp(), msg.isIncoming(), msg.getStatus(), messagesLayout); displayMessage(msg.getId(), msg.getMessage(), msg.getTimestamp(), msg.isIncoming(), msg.getStatus(), messagesLayout);
} else { } else {
displayImageMessage(msg.getId(), msg.getImage(), msg.getTimestamp(), msg.isIncoming(), msg.getStatus(), messagesLayout); displayImageMessage(msg.getId(), msg.getImage(), msg.getTimestamp(), msg.isIncoming(), msg.getStatus(), messagesLayout, msg.getUrl());
} }
if (!msg.isRed()) if (!msg.isRead())
chatStorage.markMessageAsRead(msg.getId()); chatStorage.markMessageAsRead(msg.getId());
} }
LinphoneActivity.instance().updateMissedChatCount(); LinphoneActivity.instance().updateMissedChatCount();
@ -373,13 +377,43 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
registerForContextMenu(v); registerForContextMenu(v);
} }
private void displayImageMessage(int id, Bitmap image, String time, boolean isIncoming, LinphoneChatMessage.State status, RelativeLayout layout) { private void displayImageMessage(final int id, Bitmap image, String time, boolean isIncoming, LinphoneChatMessage.State status, RelativeLayout layout, final String url) {
BubbleChat bubble = new BubbleChat(layout.getContext(), id, null, image, time, isIncoming, status, previousMessageID); BubbleChat bubble = new BubbleChat(layout.getContext(), id, null, image, time, isIncoming, status, previousMessageID);
if (!isIncoming) { if (!isIncoming) {
lastSentMessageBubble = bubble; lastSentMessageBubble = bubble;
} }
View v = bubble.getView(); final View v = bubble.getView();
bubble.setDownloadImageButtonListener(new OnClickListener() {
@Override
public void onClick(View view) {
new Thread(new Runnable() {
@Override
public void run() {
final Bitmap bm = ChatFragment.downloadImage(url);
if (bm != null) {
LinphoneActivity.instance().getChatStorage().saveImage(id, bm);
mHandler.post(new Runnable() {
@Override
public void run() {
((ImageView)v.findViewById(R.id.image)).setImageBitmap(bm);
v.findViewById(R.id.image).setVisibility(View.VISIBLE);
v.findViewById(R.id.download).setVisibility(View.GONE);
}
});
} else {
mHandler.post(new Runnable() {
@Override
public void run() {
LinphoneActivity.instance().displayCustomToast(getString(R.string.download_image_failed), Toast.LENGTH_LONG);
}
});
}
}
}).start();
}
});
previousMessageID = id; previousMessageID = id;
layout.addView(v); layout.addView(v);
registerForContextMenu(v); registerForContextMenu(v);
@ -541,7 +575,7 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
} }
latestImageMessages.put(newId, url); latestImageMessages.put(newId, url);
displayImageMessage(newId, bitmap, String.valueOf(System.currentTimeMillis()), false, State.InProgress, messagesLayout); displayImageMessage(newId, bitmap, String.valueOf(System.currentTimeMillis()), false, State.InProgress, messagesLayout, url);
scrollToEnd(); scrollToEnd();
} else if (!isNetworkReachable && LinphoneActivity.isInstanciated()) { } else if (!isNetworkReachable && LinphoneActivity.isInstanciated()) {
LinphoneActivity.instance().displayCustomToast(getString(R.string.error_network_unreachable), Toast.LENGTH_LONG); LinphoneActivity.instance().displayCustomToast(getString(R.string.error_network_unreachable), Toast.LENGTH_LONG);
@ -576,14 +610,23 @@ public class ChatFragment extends Fragment implements OnClickListener, LinphoneC
}); });
} else if (message.getExternalBodyUrl() != null) { } else if (message.getExternalBodyUrl() != null) {
byte[] rawImage = LinphoneActivity.instance().getChatStorage().getRawImageFromMessage(id); byte[] rawImage = LinphoneActivity.instance().getChatStorage().getRawImageFromMessage(id);
if (rawImage == null) {
mHandler.post(new Runnable() {
@Override
public void run() {
displayImageMessage(id, null, String.valueOf(message.getTime()), true, null, messagesLayout, message.getExternalBodyUrl());
}
});
} else {
final Bitmap bm = BitmapFactory.decodeByteArray(rawImage, 0, rawImage.length); final Bitmap bm = BitmapFactory.decodeByteArray(rawImage, 0, rawImage.length);
mHandler.post(new Runnable() { mHandler.post(new Runnable() {
@Override @Override
public void run() { public void run() {
displayImageMessage(id, bm, String.valueOf(message.getTime()), true, null, messagesLayout); displayImageMessage(id, bm, String.valueOf(message.getTime()), true, null, messagesLayout, "");
} }
}); });
} }
}
scrollToEnd(); scrollToEnd();
} }
} }

View file

@ -29,13 +29,14 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
public class ChatMessage { public class ChatMessage {
private String message; private String message;
private String timestamp; private String timestamp;
private String url;
private boolean incoming; private boolean incoming;
private int status; private int status;
private int id; private int id;
private Bitmap image; private Bitmap image;
private boolean isRed; private boolean isRead;
public ChatMessage(int id, String message, byte[] rawImage, String timestamp, boolean incoming, int status, boolean red) { public ChatMessage(int id, String message, byte[] rawImage, String timestamp, boolean incoming, int status, boolean read) {
super(); super();
this.id = id; this.id = id;
this.message = message; this.message = message;
@ -43,7 +44,7 @@ public class ChatMessage {
this.incoming = incoming; this.incoming = incoming;
this.status = status; this.status = status;
this.image = rawImage != null ? BitmapFactory.decodeByteArray(rawImage, 0, rawImage.length) : null; this.image = rawImage != null ? BitmapFactory.decodeByteArray(rawImage, 0, rawImage.length) : null;
this.isRed = red; this.isRead = read;
} }
public int getId() { public int getId() {
@ -86,7 +87,15 @@ public class ChatMessage {
return image; return image;
} }
public boolean isRed() { public boolean isRead() {
return isRed; return isRead;
}
public String getUrl() {
return url;
}
public void setUrl(String url) {
this.url = url;
} }
} }

View file

@ -81,7 +81,7 @@ public class ChatStorage {
db.update(TABLE_NAME, values, "id LIKE " + id, null); db.update(TABLE_NAME, values, "id LIKE " + id, null);
} }
public int saveMessage(String from, String to, String message, long time) { public int saveTextMessage(String from, String to, String message, long time) {
ContentValues values = new ContentValues(); ContentValues values = new ContentValues();
if (from.equals("")) { if (from.equals("")) {
values.put("localContact", from); values.put("localContact", from);
@ -101,10 +101,7 @@ public class ChatStorage {
return (int) db.insert(TABLE_NAME, null, values); return (int) db.insert(TABLE_NAME, null, values);
} }
public int saveMessage(String from, String to, Bitmap image, long time) { public int saveImageMessage(String from, String to, Bitmap image, String url, long time) {
if (image == null)
return -1;
ContentValues values = new ContentValues(); ContentValues values = new ContentValues();
if (from.equals("")) { if (from.equals("")) {
values.put("localContact", from); values.put("localContact", from);
@ -119,13 +116,28 @@ public class ChatStorage {
values.put("read", NOT_READ); values.put("read", NOT_READ);
values.put("status", LinphoneChatMessage.State.Idle.toInt()); values.put("status", LinphoneChatMessage.State.Idle.toInt());
} }
values.put("url", url);
if (image != null) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
image.compress(CompressFormat.JPEG, 100, baos);
values.put("image", baos.toByteArray());
}
values.put("time", time);
return (int) db.insert(TABLE_NAME, null, values);
}
public void saveImage(int id, Bitmap image) {
if (image == null)
return;
ContentValues values = new ContentValues();
ByteArrayOutputStream baos = new ByteArrayOutputStream(); ByteArrayOutputStream baos = new ByteArrayOutputStream();
image.compress(CompressFormat.JPEG, 100, baos); image.compress(CompressFormat.JPEG, 100, baos);
values.put("image", baos.toByteArray()); values.put("image", baos.toByteArray());
values.put("time", time); db.update(TABLE_NAME, values, "id LIKE " + id, null);
return (int) db.insert(TABLE_NAME, null, values);
} }
public int saveDraft(String to, String message) { public int saveDraft(String to, String message) {
@ -186,7 +198,7 @@ public class ChatStorage {
while (c.moveToNext()) { while (c.moveToNext()) {
try { try {
String message, timestamp; String message, timestamp, url;
int id = c.getInt(c.getColumnIndex("id")); int id = c.getInt(c.getColumnIndex("id"));
int direction = c.getInt(c.getColumnIndex("direction")); int direction = c.getInt(c.getColumnIndex("direction"));
message = c.getString(c.getColumnIndex("message")); message = c.getString(c.getColumnIndex("message"));
@ -194,8 +206,10 @@ public class ChatStorage {
int status = c.getInt(c.getColumnIndex("status")); int status = c.getInt(c.getColumnIndex("status"));
byte[] rawImage = c.getBlob(c.getColumnIndex("image")); byte[] rawImage = c.getBlob(c.getColumnIndex("image"));
int read = c.getInt(c.getColumnIndex("read")); int read = c.getInt(c.getColumnIndex("read"));
url = c.getString(c.getColumnIndex("url"));
ChatMessage chatMessage = new ChatMessage(id, message, rawImage, timestamp, direction == INCOMING, status, read == READ); ChatMessage chatMessage = new ChatMessage(id, message, rawImage, timestamp, direction == INCOMING, status, read == READ);
chatMessage.setUrl(url);
chatMessages.add(chatMessage); chatMessages.add(chatMessage);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
@ -253,11 +267,18 @@ public class ChatStorage {
} }
public int getUnreadMessageCount() { public int getUnreadMessageCount() {
return db.query(TABLE_NAME, null, "read LIKE " + NOT_READ, null, null, null, null).getCount(); Cursor c = db.query(TABLE_NAME, null, "read LIKE " + NOT_READ, null, null, null, null);
int count = c.getCount();
c.close();
return count;
} }
public int getUnreadMessageCount(String contact) { public int getUnreadMessageCount(String contact) {
return db.query(TABLE_NAME, null, "remoteContact LIKE \"" + contact + "\" AND read LIKE " + NOT_READ, null, null, null, null).getCount(); Cursor c = db.query(TABLE_NAME, null, "remoteContact LIKE \"" + contact + "\" AND read LIKE " + NOT_READ, null, null, null, null);
int count = c.getCount();
c.close();
return count;
} }
public byte[] getRawImageFromMessage(int id) { public byte[] getRawImageFromMessage(int id) {
@ -267,7 +288,7 @@ public class ChatStorage {
if (c.moveToFirst()) { if (c.moveToFirst()) {
byte[] rawImage = c.getBlob(c.getColumnIndex("image")); byte[] rawImage = c.getBlob(c.getColumnIndex("image"));
c.close(); c.close();
return rawImage; return (rawImage == null || rawImage.length == 0) ? null : rawImage;
} }
c.close(); c.close();
@ -276,7 +297,7 @@ public class ChatStorage {
class ChatHelper extends SQLiteOpenHelper { class ChatHelper extends SQLiteOpenHelper {
private static final int DATABASE_VERSION = 14; private static final int DATABASE_VERSION = 15;
private static final String DATABASE_NAME = "linphone-android"; private static final String DATABASE_NAME = "linphone-android";
ChatHelper(Context context) { ChatHelper(Context context) {
@ -285,7 +306,7 @@ public class ChatStorage {
@Override @Override
public void onCreate(SQLiteDatabase db) { public void onCreate(SQLiteDatabase db) {
db.execSQL("CREATE TABLE " + TABLE_NAME + " (id INTEGER PRIMARY KEY AUTOINCREMENT, localContact TEXT NOT NULL, remoteContact TEXT NOT NULL, direction INTEGER, message TEXT, image BLOB, time NUMERIC, read INTEGER, status INTEGER);"); db.execSQL("CREATE TABLE " + TABLE_NAME + " (id INTEGER PRIMARY KEY AUTOINCREMENT, localContact TEXT NOT NULL, remoteContact TEXT NOT NULL, direction INTEGER, message TEXT, image BLOB, url TEXT, time NUMERIC, read INTEGER, status INTEGER);");
db.execSQL("CREATE TABLE " + DRAFT_TABLE_NAME + " (id INTEGER PRIMARY KEY AUTOINCREMENT, remoteContact TEXT NOT NULL, message TEXT);"); db.execSQL("CREATE TABLE " + DRAFT_TABLE_NAME + " (id INTEGER PRIMARY KEY AUTOINCREMENT, remoteContact TEXT NOT NULL, message TEXT);");
} }

View file

@ -101,7 +101,7 @@ public class ContactFragment extends Fragment implements OnClickListener {
String displayednumberOrAddress = numberOrAddress; String displayednumberOrAddress = numberOrAddress;
if (numberOrAddress.startsWith("sip:")) { if (numberOrAddress.startsWith("sip:")) {
displayednumberOrAddress = displayednumberOrAddress.substring(4); displayednumberOrAddress = displayednumberOrAddress.replace("sip:", "");
} }
TextView tv = (TextView) v.findViewById(R.id.numeroOrAddress); TextView tv = (TextView) v.findViewById(R.id.numeroOrAddress);
@ -116,16 +116,19 @@ public class ContactFragment extends Fragment implements OnClickListener {
} }
v.findViewById(R.id.chat).setOnClickListener(chatListener); v.findViewById(R.id.chat).setOnClickListener(chatListener);
if (LinphoneUtils.isSipAddress(numberOrAddress)) {
v.findViewById(R.id.chat).setTag(numberOrAddress);
} else {
LinphoneProxyConfig lpc = LinphoneManager.getLc().getDefaultProxyConfig(); LinphoneProxyConfig lpc = LinphoneManager.getLc().getDefaultProxyConfig();
if (lpc != null) { if (lpc != null) {
if (!numberOrAddress.startsWith("sip:")) { if (!displayednumberOrAddress.startsWith("sip:")) {
numberOrAddress = "sip:" + numberOrAddress; numberOrAddress = "sip:" + displayednumberOrAddress;
} }
v.findViewById(R.id.chat).setTag(numberOrAddress + "@" + lpc.getDomain());
String tag = numberOrAddress;
if (!numberOrAddress.contains("@")) {
tag = numberOrAddress + "@" + lpc.getDomain();
} }
v.findViewById(R.id.chat).setTag(tag);
} else {
v.findViewById(R.id.chat).setTag(numberOrAddress);
} }
final String finalNumberOrAddress = numberOrAddress; final String finalNumberOrAddress = numberOrAddress;

View file

@ -99,10 +99,7 @@ public class EditContactFragment extends Fragment {
try { try {
getActivity().getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops); getActivity().getContentResolver().applyBatch(ContactsContract.AUTHORITY, ops);
if (isNewContact) {
LinphoneActivity.instance().prepareContactsInBackground(); LinphoneActivity.instance().prepareContactsInBackground();
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }

View file

@ -23,8 +23,6 @@ import java.util.Calendar;
import org.linphone.core.LinphoneAddress; import org.linphone.core.LinphoneAddress;
import org.linphone.core.LinphoneCoreException; import org.linphone.core.LinphoneCoreException;
import org.linphone.core.LinphoneCoreFactory; import org.linphone.core.LinphoneCoreFactory;
import org.linphone.mediastream.Log;
import org.linphone.ui.AvatarWithShadow;
import android.annotation.SuppressLint; import android.annotation.SuppressLint;
import android.net.Uri; import android.net.Uri;
@ -42,7 +40,6 @@ import android.widget.TextView;
*/ */
public class HistoryDetailFragment extends Fragment implements OnClickListener { public class HistoryDetailFragment extends Fragment implements OnClickListener {
private ImageView dialBack, chat, addToContacts; private ImageView dialBack, chat, addToContacts;
private AvatarWithShadow contactPicture;
private View view; private View view;
private TextView contactName, contactAddress, callDirection, time, date; private TextView contactName, contactAddress, callDirection, time, date;
private String sipUri, displayName, pictureUri; private String sipUri, displayName, pictureUri;
@ -59,8 +56,6 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
view = inflater.inflate(R.layout.history_detail, container, false); view = inflater.inflate(R.layout.history_detail, container, false);
contactPicture = (AvatarWithShadow) view.findViewById(R.id.contactPicture);
dialBack = (ImageView) view.findViewById(R.id.dialBack); dialBack = (ImageView) view.findViewById(R.id.dialBack);
dialBack.setOnClickListener(this); dialBack.setOnClickListener(this);
@ -91,7 +86,11 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
private void displayHistory(String status, String callTime, String callDate) { private void displayHistory(String status, String callTime, String callDate) {
contactName.setText(displayName == null ? sipUri : displayName); contactName.setText(displayName == null ? sipUri : displayName);
if (getResources().getBoolean(R.bool.never_display_sip_addresses)) {
contactAddress.setText(LinphoneUtils.getUsernameFromAddress(sipUri));
} else {
contactAddress.setText(sipUri); contactAddress.setText(sipUri);
}
if (status.equals("Missed")) { if (status.equals("Missed")) {
callDirection.setText(getString(R.string.call_state_missed)); callDirection.setText(getString(R.string.call_state_missed));
@ -109,15 +108,14 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
LinphoneAddress lAddress; LinphoneAddress lAddress;
try { try {
lAddress = LinphoneCoreFactory.instance().createLinphoneAddress(sipUri); lAddress = LinphoneCoreFactory.instance().createLinphoneAddress(sipUri);
} catch (LinphoneCoreException e) {
Log.e("History details error",e);
return;
}
LinphoneUtils.findUriPictureOfContactAndSetDisplayName(lAddress, view.getContext().getContentResolver()); LinphoneUtils.findUriPictureOfContactAndSetDisplayName(lAddress, view.getContext().getContentResolver());
String displayName = lAddress.getDisplayName(); String displayName = lAddress.getDisplayName();
if (displayName != null) { if (displayName != null) {
view.findViewById(R.id.addContactRow).setVisibility(View.GONE); view.findViewById(R.id.addContactRow).setVisibility(View.GONE);
} }
} catch (LinphoneCoreException e) {
e.printStackTrace();
}
} }
public void changeDisplayedHistory(String sipUri, String displayName, String pictureUri, String status, String callTime, String callDate) { public void changeDisplayedHistory(String sipUri, String displayName, String pictureUri, String status, String callTime, String callDate) {
@ -148,7 +146,11 @@ public class HistoryDetailFragment extends Fragment implements OnClickListener {
} else if (id == R.id.chat) { } else if (id == R.id.chat) {
LinphoneActivity.instance().displayChat(sipUri); LinphoneActivity.instance().displayChat(sipUri);
} else if (id == R.id.addToContacts) { } else if (id == R.id.addToContacts) {
LinphoneActivity.instance().displayContactsForEdition(sipUri); String uriToAdd = sipUri;
if (getResources().getBoolean(R.bool.never_display_sip_addresses)) {
uriToAdd = LinphoneUtils.getUsernameFromAddress(sipUri);
}
LinphoneActivity.instance().displayContactsForEdition(uriToAdd);
} }
} }

View file

@ -248,6 +248,20 @@ public class InCallActivity extends FragmentActivity implements
slideOutBottomToTop = AnimationUtils.loadAnimation(this, R.anim.slide_out_bottom_to_top); slideOutBottomToTop = AnimationUtils.loadAnimation(this, R.anim.slide_out_bottom_to_top);
slideOutTopToBottom = AnimationUtils.loadAnimation(this, R.anim.slide_out_top_to_bottom); slideOutTopToBottom = AnimationUtils.loadAnimation(this, R.anim.slide_out_top_to_bottom);
} }
if (LinphoneManager.getInstance().isBluetoothScoConnected) {
try {
routeLayout.setVisibility(View.VISIBLE);
} catch (NullPointerException npe) {}
audioRoute.setVisibility(View.VISIBLE);
speaker.setVisibility(View.GONE);
} else {
try {
routeLayout.setVisibility(View.GONE);
} catch (NullPointerException npe) {}
audioRoute.setVisibility(View.GONE);
speaker.setVisibility(View.VISIBLE);
}
} }
private void refreshInCallActions() { private void refreshInCallActions() {
@ -267,20 +281,6 @@ public class InCallActivity extends FragmentActivity implements
} }
} }
if (LinphoneManager.getInstance().isBluetoothScoConnected) {
try {
routeLayout.setVisibility(View.VISIBLE);
} catch (NullPointerException npe) {}
audioRoute.setVisibility(View.VISIBLE);
speaker.setVisibility(View.GONE);
} else {
try {
routeLayout.setVisibility(View.GONE);
} catch (NullPointerException npe) {}
audioRoute.setVisibility(View.GONE);
speaker.setVisibility(View.VISIBLE);
}
try { try {
if (isSpeakerEnabled) { if (isSpeakerEnabled) {
speaker.setBackgroundResource(R.drawable.speaker_on); speaker.setBackgroundResource(R.drawable.speaker_on);
@ -333,11 +333,13 @@ public class InCallActivity extends FragmentActivity implements
mHandler.post(new Runnable() { mHandler.post(new Runnable() {
@Override @Override
public void run() { public void run() {
options.setEnabled(true); addCall.setEnabled(LinphoneManager.getLc().getCallsNb() < LinphoneManager.getLc().getMaxCalls());
transfer.setEnabled(getResources().getBoolean(R.bool.allow_transfers));
options.setEnabled(!getResources().getBoolean(R.bool.disable_options_in_call) && (addCall.isEnabled() || transfer.isEnabled()));
video.setEnabled(true); video.setEnabled(true);
micro.setEnabled(true); micro.setEnabled(true);
speaker.setEnabled(true); speaker.setEnabled(true);
addCall.setEnabled(true);
transfer.setEnabled(true); transfer.setEnabled(true);
pause.setEnabled(true); pause.setEnabled(true);
dialer.setEnabled(true); dialer.setEnabled(true);

View file

@ -138,7 +138,7 @@ public class LinphoneActivity extends FragmentActivity implements
return; return;
} }
boolean useFirstLoginActivity = getResources().getBoolean(R.bool.use_first_login_activity); boolean useFirstLoginActivity = getResources().getBoolean(R.bool.display_account_wizard_at_first_start);
SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this); SharedPreferences pref = PreferenceManager.getDefaultSharedPreferences(this);
if (useFirstLoginActivity && !pref.getBoolean(getString(R.string.first_launch_suceeded_once_key), false)) { if (useFirstLoginActivity && !pref.getBoolean(getString(R.string.first_launch_suceeded_once_key), false)) {
if (pref.getInt(getString(R.string.pref_extra_accounts), -1) > -1) { if (pref.getInt(getString(R.string.pref_extra_accounts), -1) > -1) {
@ -157,7 +157,7 @@ public class LinphoneActivity extends FragmentActivity implements
if (findViewById(R.id.fragmentContainer) != null) { if (findViewById(R.id.fragmentContainer) != null) {
dialerFragment = new DialerFragment(); dialerFragment = new DialerFragment();
dialerFragment.setArguments(getIntent().getExtras()); dialerFragment.setArguments(getIntent().getExtras());
getSupportFragmentManager().beginTransaction().add(R.id.fragmentContainer, dialerFragment).commit(); getSupportFragmentManager().beginTransaction().add(R.id.fragmentContainer, dialerFragment, currentFragment.toString()).commit();
selectMenu(FragmentsAvailable.DIALER); selectMenu(FragmentsAvailable.DIALER);
} }
} }
@ -367,7 +367,7 @@ public class LinphoneActivity extends FragmentActivity implements
} }
transaction.addToBackStack(newFragmentType.toString()); transaction.addToBackStack(newFragmentType.toString());
transaction.replace(R.id.fragmentContainer, newFragment); transaction.replace(R.id.fragmentContainer, newFragment, newFragmentType.toString());
transaction.commitAllowingStateLoss(); transaction.commitAllowingStateLoss();
getSupportFragmentManager().executePendingTransactions(); getSupportFragmentManager().executePendingTransactions();
@ -751,12 +751,12 @@ public class LinphoneActivity extends FragmentActivity implements
public int onMessageSent(String to, String message) { public int onMessageSent(String to, String message) {
getChatStorage().deleteDraft(to); getChatStorage().deleteDraft(to);
return getChatStorage().saveMessage("", to, message, System.currentTimeMillis()); return getChatStorage().saveTextMessage("", to, message, System.currentTimeMillis());
} }
public int onMessageSent(String to, Bitmap image, String imageURL) { public int onMessageSent(String to, Bitmap image, String imageURL) {
getChatStorage().deleteDraft(to); getChatStorage().deleteDraft(to);
return getChatStorage().saveMessage("", to, image, System.currentTimeMillis()); return getChatStorage().saveImageMessage("", to, image, imageURL, System.currentTimeMillis());
} }
public void onMessageStateChanged(String to, String message, int newState) { public void onMessageStateChanged(String to, String message, int newState) {
@ -1375,7 +1375,8 @@ public class LinphoneActivity extends FragmentActivity implements
} else if (LinphoneUtils.onKeyBackGoHome(this, keyCode, event)) { } else if (LinphoneUtils.onKeyBackGoHome(this, keyCode, event)) {
return true; return true;
} }
} else if (!isTablet()) { } else {
if (!isTablet()) {
int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount(); int backStackEntryCount = getSupportFragmentManager().getBackStackEntryCount();
if (backStackEntryCount <= 1) { if (backStackEntryCount <= 1) {
showStatusBar(); showStatusBar();
@ -1389,6 +1390,12 @@ public class LinphoneActivity extends FragmentActivity implements
//Hack to ensure display the status bar on some devices //Hack to ensure display the status bar on some devices
showStatusBar(); showStatusBar();
} }
} else {
if (currentFragment == FragmentsAvailable.SETTINGS) {
reloadConfig();
updateAnimationsState();
}
}
} }
} else if (keyCode == KeyEvent.KEYCODE_MENU && statusFragment != null) { } else if (keyCode == KeyEvent.KEYCODE_MENU && statusFragment != null) {
if (event.getRepeatCount() < 1) { if (event.getRepeatCount() < 1) {

View file

@ -18,7 +18,6 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
package org.linphone; package org.linphone;
import static android.media.AudioManager.MODE_NORMAL;
import static android.media.AudioManager.MODE_RINGTONE; import static android.media.AudioManager.MODE_RINGTONE;
import static android.media.AudioManager.STREAM_RING; import static android.media.AudioManager.STREAM_RING;
import static android.media.AudioManager.STREAM_VOICE_CALL; import static android.media.AudioManager.STREAM_VOICE_CALL;
@ -98,7 +97,6 @@ import android.content.SharedPreferences;
import android.content.SharedPreferences.Editor; import android.content.SharedPreferences.Editor;
import android.content.pm.PackageManager.NameNotFoundException; import android.content.pm.PackageManager.NameNotFoundException;
import android.content.res.Resources; import android.content.res.Resources;
import android.graphics.Bitmap;
import android.hardware.Sensor; import android.hardware.Sensor;
import android.hardware.SensorEvent; import android.hardware.SensorEvent;
import android.hardware.SensorEventListener; import android.hardware.SensorEventListener;
@ -136,7 +134,7 @@ import android.widget.Toast;
* @author Guillaume Beraudo * @author Guillaume Beraudo
* *
*/ */
public final class LinphoneManager implements LinphoneCoreListener { public class LinphoneManager implements LinphoneCoreListener {
private static LinphoneManager instance; private static LinphoneManager instance;
private Context mServiceContext; private Context mServiceContext;
@ -174,7 +172,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
simpleListeners.remove(listener); simpleListeners.remove(listener);
} }
private LinphoneManager(final Context c, LinphoneServiceListener listener) { protected LinphoneManager(final Context c, LinphoneServiceListener listener) {
sExited=false; sExited=false;
mServiceContext = c; mServiceContext = c;
mListenerDispatcher = new ListenerDispatcher(listener); mListenerDispatcher = new ListenerDispatcher(listener);
@ -216,7 +214,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
private void routeAudioToSpeakerHelper(boolean speakerOn) { private void routeAudioToSpeakerHelper(boolean speakerOn) {
isUsingBluetoothAudioRoute = false; isUsingBluetoothAudioRoute = false;
if (mAudioManager != null) { if (mAudioManager != null) {
mAudioManager.setMode(AudioManager.MODE_NORMAL); Compatibility.setAudioManagerInCallMode(mAudioManager);
mAudioManager.stopBluetoothSco(); mAudioManager.stopBluetoothSco();
mAudioManager.setBluetoothScoOn(false); mAudioManager.setBluetoothScoOn(false);
} }
@ -253,6 +251,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
} }
@TargetApi(Build.VERSION_CODES.HONEYCOMB) @TargetApi(Build.VERSION_CODES.HONEYCOMB)
@SuppressWarnings("deprecation")
public void startBluetooth() { public void startBluetooth() {
mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter(); mBluetoothAdapter = BluetoothAdapter.getDefaultAdapter();
if (mBluetoothAdapter.isEnabled()) { if (mBluetoothAdapter.isEnabled()) {
@ -263,7 +262,6 @@ public final class LinphoneManager implements LinphoneCoreListener {
if (profile == BluetoothProfile.HEADSET) { if (profile == BluetoothProfile.HEADSET) {
mBluetoothHeadset = (BluetoothHeadset) proxy; mBluetoothHeadset = (BluetoothHeadset) proxy;
Log.d("Bluetooth headset connected"); Log.d("Bluetooth headset connected");
isBluetoothScoConnected = true;
} }
} }
@TargetApi(Build.VERSION_CODES.HONEYCOMB) @TargetApi(Build.VERSION_CODES.HONEYCOMB)
@ -278,9 +276,11 @@ public final class LinphoneManager implements LinphoneCoreListener {
}; };
mBluetoothAdapter.getProfileProxy(mServiceContext, mProfileListener, BluetoothProfile.HEADSET); mBluetoothAdapter.getProfileProxy(mServiceContext, mProfileListener, BluetoothProfile.HEADSET);
} else { } else {
@SuppressWarnings("deprecation") try {
String actionScoConnected = AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED; mServiceContext.unregisterReceiver(bluetoothReiceiver);
Intent currentValue = mServiceContext.registerReceiver(bluetoothReiceiver, new IntentFilter(actionScoConnected)); } catch (Exception e) {}
Intent currentValue = mServiceContext.registerReceiver(bluetoothReiceiver, new IntentFilter(AudioManager.ACTION_SCO_AUDIO_STATE_CHANGED));
int state = currentValue == null ? 0 : currentValue.getIntExtra(AudioManager.EXTRA_SCO_AUDIO_STATE, 0); int state = currentValue == null ? 0 : currentValue.getIntExtra(AudioManager.EXTRA_SCO_AUDIO_STATE, 0);
if (state == AudioManager.SCO_AUDIO_STATE_CONNECTED) { if (state == AudioManager.SCO_AUDIO_STATE_CONNECTED) {
isBluetoothScoConnected = true; isBluetoothScoConnected = true;
@ -386,6 +386,9 @@ public final class LinphoneManager implements LinphoneCoreListener {
LinphoneAddress lAddress; LinphoneAddress lAddress;
try { try {
lAddress = mLc.interpretUrl(to); lAddress = mLc.interpretUrl(to);
if (mServiceContext.getResources().getBoolean(R.bool.override_domain_using_default_one)) {
lAddress.setDomain(mServiceContext.getString(R.string.default_domain));
}
LinphoneProxyConfig lpc = mLc.getDefaultProxyConfig(); LinphoneProxyConfig lpc = mLc.getDefaultProxyConfig();
if (mR.getBoolean(R.bool.forbid_self_call) && lpc!=null && lAddress.asStringUriOnly().equals(lpc.getIdentity())) { if (mR.getBoolean(R.bool.forbid_self_call) && lpc!=null && lAddress.asStringUriOnly().equals(lpc.getIdentity())) {
@ -540,7 +543,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
copyAssetsFromPackage(); copyAssetsFromPackage();
//traces alway start with traces enable to not missed first initialization //traces alway start with traces enable to not missed first initialization
boolean isDebugLogEnabled = true;//!(mR.getBoolean(R.bool.disable_every_log)) && getPrefBoolean(R.string.pref_debug_key, mR.getBoolean(R.bool.pref_debug_default)); boolean isDebugLogEnabled = !(mR.getBoolean(R.bool.disable_every_log)) && getPrefBoolean(R.string.pref_debug_key, mR.getBoolean(R.bool.pref_debug_default));
LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name)); LinphoneCoreFactory.instance().setDebugMode(isDebugLogEnabled, getString(R.string.app_name));
// Try to get remote provisioning // Try to get remote provisioning
@ -578,10 +581,6 @@ public final class LinphoneManager implements LinphoneCoreListener {
} catch (LinphoneException e) { } catch (LinphoneException e) {
Log.w("no config ready yet"); Log.w("no config ready yet");
} }
boolean routeToBT = mServiceContext.getResources().getBoolean(R.bool.route_audio_to_bluetooth_if_available);
if (routeToBT) {
startBluetooth();
}
TimerTask lTask = new TimerTask() { TimerTask lTask = new TimerTask() {
@Override @Override
@ -596,6 +595,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
lFilter.addAction(Intent.ACTION_SCREEN_OFF); lFilter.addAction(Intent.ACTION_SCREEN_OFF);
mServiceContext.registerReceiver(mKeepAliveReceiver, lFilter); mServiceContext.registerReceiver(mKeepAliveReceiver, lFilter);
startBluetooth();
resetCameraFromPreferences(); resetCameraFromPreferences();
} }
catch (Exception e) { catch (Exception e) {
@ -988,6 +988,10 @@ public final class LinphoneManager implements LinphoneCoreListener {
chatStorage = null; chatStorage = null;
} }
try {
mServiceContext.unregisterReceiver(bluetoothReiceiver);
} catch (Exception e) {}
try { try {
if (Version.sdkAboveOrEqual(Version.API11_HONEYCOMB_30)) if (Version.sdkAboveOrEqual(Version.API11_HONEYCOMB_30))
mBluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET, mBluetoothHeadset); mBluetoothAdapter.closeProfileProxy(BluetoothProfile.HEADSET, mBluetoothHeadset);
@ -1134,11 +1138,11 @@ public final class LinphoneManager implements LinphoneCoreListener {
String notificationText = null; String notificationText = null;
int id = -1; int id = -1;
if (textMessage != null && textMessage.length() > 0) { if (textMessage != null && textMessage.length() > 0) {
id = chatStorage.saveMessage(from.asStringUriOnly(), "", textMessage, message.getTime()); id = chatStorage.saveTextMessage(from.asStringUriOnly(), "", textMessage, message.getTime());
notificationText = textMessage; notificationText = textMessage;
} else if (url != null && url.length() > 0) { } else if (url != null && url.length() > 0) {
Bitmap bm = ChatFragment.downloadImage(url); //Bitmap bm = ChatFragment.downloadImage(url);
id = chatStorage.saveMessage(from.asStringUriOnly(), "", bm, message.getTime()); id = chatStorage.saveImageMessage(from.asStringUriOnly(), "", null, message.getExternalBodyUrl(), message.getTime());
notificationText = url; notificationText = url;
} }
@ -1226,6 +1230,12 @@ public final class LinphoneManager implements LinphoneCoreListener {
} }
} }
if (state == LinphoneCall.State.Connected) {
if (mLc.getCallsNb() == 1) {
Log.d("Audio focus requested: " + (mAudioManager.requestAudioFocus(null, AudioManager.STREAM_VOICE_CALL, AudioManager.AUDIOFOCUS_GAIN) == AudioManager.AUDIOFOCUS_REQUEST_GRANTED ? "Granted" : "Denied"));
}
}
if (state == IncomingReceived || (state == State.CallIncomingEarlyMedia && mR.getBoolean(R.bool.allow_ringing_while_early_media))) { if (state == IncomingReceived || (state == State.CallIncomingEarlyMedia && mR.getBoolean(R.bool.allow_ringing_while_early_media))) {
// Brighten screen for at least 10 seconds // Brighten screen for at least 10 seconds
if (mLc.getCallsNb() == 1) { if (mLc.getCallsNb() == 1) {
@ -1239,11 +1249,15 @@ public final class LinphoneManager implements LinphoneCoreListener {
} }
if (state == CallEnd || state == Error) { if (state == CallEnd || state == Error) {
if (mLc.getCallsNb() == 0) {
Log.d("Audio focus released: " + (mAudioManager.abandonAudioFocus(null) == AudioManager.AUDIOFOCUS_REQUEST_GRANTED ? "Granted" : "Denied"));
mAudioManager.setMode(AudioManager.MODE_NORMAL);
}
Context activity = getContext(); Context activity = getContext();
if (activity != null) { if (activity != null) {
TelephonyManager tm = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); TelephonyManager tm = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE);
if (tm.getCallState() == TelephonyManager.CALL_STATE_IDLE) { if (tm.getCallState() == TelephonyManager.CALL_STATE_IDLE) {
mAudioManager.setMode(MODE_NORMAL); mAudioManager.setMode(AudioManager.MODE_NORMAL);
} }
} }
} }
@ -1273,6 +1287,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
} else { } else {
Log.i("New call active while incall (CPU only) wake lock already active"); Log.i("New call active while incall (CPU only) wake lock already active");
} }
Compatibility.setAudioManagerInCallMode(mAudioManager);
} }
mListenerDispatcher.onCallStateChanged(call, state, message); mListenerDispatcher.onCallStateChanged(call, state, message);
} }
@ -1641,7 +1656,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
public void onRegistrationStateChanged(RegistrationState state, public void onRegistrationStateChanged(RegistrationState state,
String message) { String message) {
if (serviceListener != null) serviceListener.onRegistrationStateChanged(state, message); if (serviceListener != null) serviceListener.onRegistrationStateChanged(state, message);
for (LinphoneOnRegistrationStateChangedListener listener : getSimpleListeners(LinphoneActivity.class)) { for (LinphoneOnRegistrationStateChangedListener listener : getSimpleListeners(LinphoneOnRegistrationStateChangedListener.class)) {
listener.onRegistrationStateChanged(state); listener.onRegistrationStateChanged(state);
} }
} }

View file

@ -82,7 +82,7 @@ public final class LinphoneService extends Service implements LinphoneServiceLis
* setLatestEventInfo and startActivity() which needs a context. * setLatestEventInfo and startActivity() which needs a context.
*/ */
private Handler mHandler = new Handler(); public Handler mHandler = new Handler();
private static LinphoneService instance; private static LinphoneService instance;
// private boolean mTestDelayElapsed; // add a timer for testing // private boolean mTestDelayElapsed; // add a timer for testing

View file

@ -21,8 +21,10 @@ package org.linphone;
import static android.view.View.GONE; import static android.view.View.GONE;
import static android.view.View.VISIBLE; import static android.view.View.VISIBLE;
import java.io.BufferedReader;
import java.io.IOException; import java.io.IOException;
import java.io.InputStream; import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException; import java.net.MalformedURLException;
import java.net.URL; import java.net.URL;
import java.util.ArrayList; import java.util.ArrayList;
@ -331,5 +333,42 @@ public final class LinphoneUtils {
return false; return false;
} }
} }
public static void clearLogs() {
try {
Runtime.getRuntime().exec(new String[] { "logcat", "-c" });
} catch (IOException e) {
e.printStackTrace();
}
}
public static void collectLogs(String logTag, String email) {
BufferedReader br = null;
Process p = null;
StringBuilder sb = new StringBuilder();
try {
p = Runtime.getRuntime().exec(new String[] { "logcat", "-d", "|", "grep", "`adb shell ps | grep org.linphone | cut -c10-15`" });
br = new BufferedReader(new InputStreamReader(p.getInputStream()), 2048);
String line;
while ((line = br.readLine()) != null) {
sb.append(line);
sb.append("\r\n");
}
Intent i = new Intent(Intent.ACTION_SEND);
i.setType("message/rfc822");
i.putExtra(Intent.EXTRA_EMAIL, new String[]{email});
i.putExtra(Intent.EXTRA_SUBJECT, "Linphone Logs");
i.putExtra(Intent.EXTRA_TEXT, sb.toString());
try {
LinphoneActivity.instance().startActivity(Intent.createChooser(i, "Send mail..."));
} catch (android.content.ActivityNotFoundException ex) {
}
} catch (IOException e) {
e.printStackTrace();
}
}
} }

View file

@ -20,6 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
import org.linphone.compatibility.Compatibility; import org.linphone.compatibility.Compatibility;
import org.linphone.compatibility.CompatibilityScaleGestureDetector; import org.linphone.compatibility.CompatibilityScaleGestureDetector;
import org.linphone.compatibility.CompatibilityScaleGestureListener; import org.linphone.compatibility.CompatibilityScaleGestureListener;
import org.linphone.core.LinphoneCall;
import org.linphone.core.LinphoneCore; import org.linphone.core.LinphoneCore;
import org.linphone.mediastream.Log; import org.linphone.mediastream.Log;
import org.linphone.mediastream.video.AndroidVideoWindowImpl; import org.linphone.mediastream.video.AndroidVideoWindowImpl;
@ -177,9 +178,13 @@ public class VideoCallFragment extends Fragment implements OnGestureListener, On
float landscapeZoomFactor = ((float) mVideoView.getWidth()) / (float) ((3 * mVideoView.getHeight()) / 4); float landscapeZoomFactor = ((float) mVideoView.getWidth()) / (float) ((3 * mVideoView.getHeight()) / 4);
mZoomFactor = Math.max(0.1f, Math.min(mZoomFactor, Math.max(portraitZoomFactor, landscapeZoomFactor))); mZoomFactor = Math.max(0.1f, Math.min(mZoomFactor, Math.max(portraitZoomFactor, landscapeZoomFactor)));
LinphoneManager.getLc().getCurrentCall().zoomVideo(mZoomFactor, mZoomCenterX, mZoomCenterY); LinphoneCall currentCall = LinphoneManager.getLc().getCurrentCall();
if (currentCall != null) {
currentCall.zoomVideo(mZoomFactor, mZoomCenterX, mZoomCenterY);
return true; return true;
} }
return false;
}
@Override @Override
public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) { public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY) {

View file

@ -9,6 +9,7 @@ import android.content.ClipData;
import android.content.ClipboardManager; import android.content.ClipboardManager;
import android.content.Context; import android.content.Context;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.media.AudioManager;
/* /*
ApiElevenPlus.java ApiElevenPlus.java
@ -88,4 +89,8 @@ public class ApiElevenPlus {
ClipData clip = android.content.ClipData.newPlainText("Message", msg); ClipData clip = android.content.ClipData.newPlainText("Message", msg);
clipboard.setPrimaryClip(clip); clipboard.setPrimaryClip(clip);
} }
public static void setAudioManagerInCallMode(AudioManager manager) {
manager.setMode(AudioManager.MODE_IN_COMMUNICATION);
}
} }

View file

@ -25,6 +25,7 @@ import android.database.Cursor;
import android.database.MatrixCursor; import android.database.MatrixCursor;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.BitmapFactory; import android.graphics.BitmapFactory;
import android.media.AudioManager;
import android.net.Uri; import android.net.Uri;
import android.preference.CheckBoxPreference; import android.preference.CheckBoxPreference;
import android.preference.Preference; import android.preference.Preference;
@ -227,7 +228,7 @@ public class ApiFivePlus {
String[] projection = new String[] { Data.CONTACT_ID, Data.DISPLAY_NAME }; String[] projection = new String[] { Data.CONTACT_ID, Data.DISPLAY_NAME };
String query = Data.DISPLAY_NAME + " IS NOT NULL AND (" + select + ")"; String query = Data.DISPLAY_NAME + " IS NOT NULL AND (" + select + ")";
Cursor cursor = cr.query(Data.CONTENT_URI, projection, query, null, Data.DISPLAY_NAME + " ASC"); Cursor cursor = cr.query(Data.CONTENT_URI, projection, query, null, Data.DISPLAY_NAME + " COLLATE NOCASE ASC");
if (!shouldGroupBy || cursor == null) { if (!shouldGroupBy || cursor == null) {
return cursor; return cursor;
@ -432,4 +433,8 @@ public class ApiFivePlus {
public static void removeGlobalLayoutListener(ViewTreeObserver viewTreeObserver, OnGlobalLayoutListener keyboardListener) { public static void removeGlobalLayoutListener(ViewTreeObserver viewTreeObserver, OnGlobalLayoutListener keyboardListener) {
viewTreeObserver.removeGlobalOnLayoutListener(keyboardListener); viewTreeObserver.removeGlobalOnLayoutListener(keyboardListener);
} }
public static void setAudioManagerInCallMode(AudioManager manager) {
manager.setMode(AudioManager.MODE_IN_CALL);
}
} }

View file

@ -34,6 +34,7 @@ import android.content.Context;
import android.content.Intent; import android.content.Intent;
import android.database.Cursor; import android.database.Cursor;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.media.AudioManager;
import android.net.Uri; import android.net.Uri;
import android.preference.Preference; import android.preference.Preference;
import android.view.Display; import android.view.Display;
@ -268,4 +269,12 @@ public class Compatibility {
ApiFourteenPlus.showNavigationBar(activity); ApiFourteenPlus.showNavigationBar(activity);
} }
} }
public static void setAudioManagerInCallMode(AudioManager manager) {
if (Version.sdkAboveOrEqual(Version.API11_HONEYCOMB_30)) {
ApiElevenPlus.setAudioManagerInCallMode(manager);
} else {
ApiFivePlus.setAudioManagerInCallMode(manager);
}
}
} }

View file

@ -45,20 +45,28 @@ public class LinphoneLoginFragment extends Fragment implements OnClickListener {
apply = (ImageView) view.findViewById(R.id.setup_apply); apply = (ImageView) view.findViewById(R.id.setup_apply);
apply.setOnClickListener(this); apply.setOnClickListener(this);
if (getResources().getBoolean(R.bool.setup_use_linphone_as_first_fragment)) {
view.findViewById(R.id.setup_apply_button).setVisibility(View.GONE);
}
return view; return view;
} }
public void linphoneLogIn() {
if (login.getText() == null || login.length() == 0 || password.getText() == null || password.length() == 0) {
Toast.makeText(getActivity(), getString(R.string.first_launch_no_login_password), Toast.LENGTH_LONG).show();
return;
}
SetupActivity.instance().linphoneLogIn(login.getText().toString(), password.getText().toString(), getResources().getBoolean(R.bool.setup_account_validation_mandatory));
}
@Override @Override
public void onClick(View v) { public void onClick(View v) {
int id = v.getId(); int id = v.getId();
if (id == R.id.setup_apply) { if (id == R.id.setup_apply) {
if (login.getText() == null || login.length() == 0 || password.getText() == null || password.length() == 0) { linphoneLogIn();
Toast.makeText(getActivity(), getString(R.string.first_launch_no_login_password), Toast.LENGTH_LONG).show();
return;
}
SetupActivity.instance().linphoneLogIn(login.getText().toString(), password.getText().toString());
} }
} }
} }

View file

@ -18,7 +18,9 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/ */
import org.linphone.LinphoneManager; import org.linphone.LinphoneManager;
import org.linphone.LinphoneSimpleListener.LinphoneOnRegistrationStateChangedListener;
import org.linphone.R; import org.linphone.R;
import org.linphone.core.LinphoneCore.RegistrationState;
import org.linphone.mediastream.Log; import org.linphone.mediastream.Log;
import android.app.Activity; import android.app.Activity;
@ -26,11 +28,12 @@ import android.content.Context;
import android.content.SharedPreferences; import android.content.SharedPreferences;
import android.content.pm.ActivityInfo; import android.content.pm.ActivityInfo;
import android.os.Bundle; import android.os.Bundle;
import android.os.Handler;
import android.preference.PreferenceManager; import android.preference.PreferenceManager;
import android.support.v4.app.Fragment; import android.support.v4.app.Fragment;
import android.support.v4.app.FragmentActivity; import android.support.v4.app.FragmentActivity;
import android.support.v4.app.FragmentTransaction; import android.support.v4.app.FragmentTransaction;
import android.view.KeyEvent; import android.text.TextUtils;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener; import android.view.View.OnClickListener;
import android.view.inputmethod.InputMethodManager; import android.view.inputmethod.InputMethodManager;
@ -42,8 +45,12 @@ import android.widget.Toast;
public class SetupActivity extends FragmentActivity implements OnClickListener { public class SetupActivity extends FragmentActivity implements OnClickListener {
private static SetupActivity instance; private static SetupActivity instance;
private RelativeLayout back, next, cancel; private RelativeLayout back, next, cancel;
private SetupFragments currentFragment; private SetupFragmentsEnum currentFragment;
private SharedPreferences mPref; private SharedPreferences mPref;
private SetupFragmentsEnum firstFragment;
private Fragment fragment;
private boolean accountCreated = false;
private Handler mHandler = new Handler();
protected void onCreate(Bundle savedInstanceState) { protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState); super.onCreate(savedInstanceState);
@ -53,14 +60,13 @@ public class SetupActivity extends FragmentActivity implements OnClickListener {
} }
setContentView(R.layout.setup); setContentView(R.layout.setup);
firstFragment = getResources().getBoolean(R.bool.setup_use_linphone_as_first_fragment) ?
SetupFragmentsEnum.LINPHONE_LOGIN : SetupFragmentsEnum.WELCOME;
if (findViewById(R.id.fragmentContainer) != null) { if (findViewById(R.id.fragmentContainer) != null) {
if (savedInstanceState == null) { if (savedInstanceState == null) {
WelcomeFragment welcomeFragment = new WelcomeFragment(); display(firstFragment);
getSupportFragmentManager().beginTransaction().add(R.id.fragmentContainer, welcomeFragment).commit();
currentFragment = SetupFragments.WELCOME;
} else { } else {
currentFragment = (SetupFragments) savedInstanceState.getSerializable("CurrentFragment"); currentFragment = (SetupFragmentsEnum) savedInstanceState.getSerializable("CurrentFragment");
} }
} }
@ -103,36 +109,53 @@ public class SetupActivity extends FragmentActivity implements OnClickListener {
int id = v.getId(); int id = v.getId();
if (id == R.id.setup_cancel) { if (id == R.id.setup_cancel) {
if (getResources().getBoolean(R.bool.setup_cancel_move_to_back)) {
moveTaskToBack(true);
} else {
finish(); finish();
}
} else if (id == R.id.setup_next) { } else if (id == R.id.setup_next) {
if (currentFragment == SetupFragments.WELCOME) { if (firstFragment == SetupFragmentsEnum.LINPHONE_LOGIN) {
LinphoneLoginFragment linphoneFragment = (LinphoneLoginFragment) fragment;
linphoneFragment.linphoneLogIn();
} else {
if (currentFragment == SetupFragmentsEnum.WELCOME) {
MenuFragment fragment = new MenuFragment(); MenuFragment fragment = new MenuFragment();
changeFragment(fragment); changeFragment(fragment);
currentFragment = SetupFragments.MENU; currentFragment = SetupFragmentsEnum.MENU;
next.setVisibility(View.GONE); next.setVisibility(View.GONE);
back.setVisibility(View.VISIBLE); back.setVisibility(View.VISIBLE);
} else if (currentFragment == SetupFragments.WIZARD_CONFIRM) { } else if (currentFragment == SetupFragmentsEnum.WIZARD_CONFIRM) {
finish(); finish();
} }
}
} else if (id == R.id.setup_back) { } else if (id == R.id.setup_back) {
handleBackEvent(); onBackPressed();
} }
} }
private void handleBackEvent() { @Override
if (currentFragment == SetupFragments.MENU) { public void onBackPressed() {
if (currentFragment == firstFragment) {
if (getResources().getBoolean(R.bool.setup_cancel_move_to_back)) {
moveTaskToBack(true);
} else {
finish();
}
}
if (currentFragment == SetupFragmentsEnum.MENU) {
WelcomeFragment fragment = new WelcomeFragment(); WelcomeFragment fragment = new WelcomeFragment();
changeFragment(fragment); changeFragment(fragment);
currentFragment = SetupFragments.WELCOME; currentFragment = SetupFragmentsEnum.WELCOME;
next.setVisibility(View.VISIBLE); next.setVisibility(View.VISIBLE);
back.setVisibility(View.GONE); back.setVisibility(View.GONE);
} else if (currentFragment == SetupFragments.GENERIC_LOGIN || currentFragment == SetupFragments.LINPHONE_LOGIN || currentFragment == SetupFragments.WIZARD) { } else if (currentFragment == SetupFragmentsEnum.GENERIC_LOGIN || currentFragment == SetupFragmentsEnum.LINPHONE_LOGIN || currentFragment == SetupFragmentsEnum.WIZARD) {
MenuFragment fragment = new MenuFragment(); MenuFragment fragment = new MenuFragment();
changeFragment(fragment); changeFragment(fragment);
currentFragment = SetupFragments.MENU; currentFragment = SetupFragmentsEnum.MENU;
} else if (currentFragment == SetupFragments.WELCOME) { } else if (currentFragment == SetupFragmentsEnum.WELCOME) {
finish(); finish();
} }
} }
@ -142,7 +165,7 @@ public class SetupActivity extends FragmentActivity implements OnClickListener {
EchoCancellerCalibrationFragment fragment = new EchoCancellerCalibrationFragment(); EchoCancellerCalibrationFragment fragment = new EchoCancellerCalibrationFragment();
fragment.enableEcCalibrationResultSending(sendEcCalibrationResult); fragment.enableEcCalibrationResultSending(sendEcCalibrationResult);
changeFragment(fragment); changeFragment(fragment);
currentFragment = SetupFragments.ECHO_CANCELLER_CALIBRATION; currentFragment = SetupFragmentsEnum.ECHO_CANCELLER_CALIBRATION;
back.setVisibility(View.VISIBLE); back.setVisibility(View.VISIBLE);
next.setVisibility(View.GONE); next.setVisibility(View.GONE);
next.setEnabled(false); next.setEnabled(false);
@ -173,9 +196,55 @@ public class SetupActivity extends FragmentActivity implements OnClickListener {
} }
} }
public void linphoneLogIn(String username, String password) {
private LinphoneOnRegistrationStateChangedListener registrationListener = new LinphoneOnRegistrationStateChangedListener() {
public void onRegistrationStateChanged(RegistrationState state) {
if (state == RegistrationState.RegistrationOk) {
LinphoneManager.removeListener(registrationListener);
if (LinphoneManager.getLc().getDefaultProxyConfig() != null) {
mHandler .post(new Runnable () {
public void run() {
launchEchoCancellerCalibration(true);
}
});
}
} else if (state == RegistrationState.RegistrationFailed) {
LinphoneManager.removeListener(registrationListener);
deleteCreatedAccount();
mHandler.post(new Runnable () {
public void run() {
Toast.makeText(SetupActivity.this, getString(R.string.first_launch_bad_login_password), Toast.LENGTH_LONG).show();
}
});
}
}
};
public void checkAccount(String username, String password, String domain) {
LinphoneManager.removeListener(registrationListener);
LinphoneManager.addListener(registrationListener);
saveCreatedAccount(username, password, domain);
LinphoneManager.getInstance().initializePayloads();
try {
LinphoneManager.getInstance().initFromConf();
} catch (Throwable e) {
LinphoneManager.removeListener(registrationListener);
deleteCreatedAccount();
Log.e(e, "Error while initializing from config in first login activity");
Toast.makeText(this, getString(R.string.error), Toast.LENGTH_LONG).show();
}
}
public void linphoneLogIn(String username, String password, boolean validate) {
if (validate) {
checkAccount(username, password, getString(R.string.default_domain));
} else {
logIn(username, password, getString(R.string.default_domain), true); logIn(username, password, getString(R.string.default_domain), true);
} }
}
public void genericLogIn(String username, String password, String domain) { public void genericLogIn(String username, String password, String domain) {
logIn(username, password, domain, false); logIn(username, password, domain, false);
@ -197,25 +266,55 @@ public class SetupActivity extends FragmentActivity implements OnClickListener {
mPref.edit().putBoolean(getString(key), value).commit(); mPref.edit().putBoolean(getString(key), value).commit();
} }
public void displayLoginGeneric() { private void display(SetupFragmentsEnum fragment) {
GenericLoginFragment fragment = new GenericLoginFragment(); switch (fragment) {
case WELCOME:
displayWelcome();
break;
case LINPHONE_LOGIN:
displayLoginLinphone();
break;
default:
throw new IllegalStateException("Can't handle " + fragment);
}
}
public void displayWelcome() {
fragment = new WelcomeFragment();
changeFragment(fragment); changeFragment(fragment);
currentFragment = SetupFragments.GENERIC_LOGIN; currentFragment = SetupFragmentsEnum.WELCOME;
}
public void displayLoginGeneric() {
fragment = new GenericLoginFragment();
changeFragment(fragment);
currentFragment = SetupFragmentsEnum.GENERIC_LOGIN;
} }
public void displayLoginLinphone() { public void displayLoginLinphone() {
LinphoneLoginFragment fragment = new LinphoneLoginFragment(); fragment = new LinphoneLoginFragment();
changeFragment(fragment); changeFragment(fragment);
currentFragment = SetupFragments.LINPHONE_LOGIN; currentFragment = SetupFragmentsEnum.LINPHONE_LOGIN;
} }
public void displayWizard() { public void displayWizard() {
WizardFragment fragment = new WizardFragment(); fragment = new WizardFragment();
changeFragment(fragment); changeFragment(fragment);
currentFragment = SetupFragments.WIZARD; currentFragment = SetupFragmentsEnum.WIZARD;
}
public void deleteCreatedAccount() {
if (!accountCreated)
return;
writePreference(R.string.pref_extra_accounts, 0);
accountCreated = false;
} }
public void saveCreatedAccount(String username, String password, String domain) { public void saveCreatedAccount(String username, String password, String domain) {
if (accountCreated)
return;
int newAccountId = mPref.getInt(getString(R.string.pref_extra_accounts), 0); int newAccountId = mPref.getInt(getString(R.string.pref_extra_accounts), 0);
if (newAccountId == -1) if (newAccountId == -1)
newAccountId = 0; newAccountId = 0;
@ -248,6 +347,12 @@ public class SetupActivity extends FragmentActivity implements OnClickListener {
writePreference(getString(R.string.pref_passwd_key) + newAccountId, password); writePreference(getString(R.string.pref_passwd_key) + newAccountId, password);
writePreference(getString(R.string.pref_domain_key) + newAccountId, domain); writePreference(getString(R.string.pref_domain_key) + newAccountId, domain);
} }
String forcedProxy=getResources().getString(R.string.setup_forced_proxy);
if (!TextUtils.isEmpty(forcedProxy)) {
writePreference(R.string.pref_enable_outbound_proxy_key, true);
writePreference(R.string.pref_proxy_key, forcedProxy);
}
accountCreated = true;
} }
public void displayWizardConfirm(String username) { public void displayWizardConfirm(String username) {
@ -258,7 +363,7 @@ public class SetupActivity extends FragmentActivity implements OnClickListener {
fragment.setArguments(extras); fragment.setArguments(extras);
changeFragment(fragment); changeFragment(fragment);
currentFragment = SetupFragments.WIZARD_CONFIRM; currentFragment = SetupFragmentsEnum.WIZARD_CONFIRM;
next.setVisibility(View.VISIBLE); next.setVisibility(View.VISIBLE);
next.setEnabled(false); next.setEnabled(false);
@ -284,14 +389,6 @@ public class SetupActivity extends FragmentActivity implements OnClickListener {
success(); success();
} }
public boolean onKeyDown(int keyCode, KeyEvent event) {
if (keyCode == KeyEvent.KEYCODE_BACK) {
handleBackEvent();
return true;
}
return super.onKeyDown(keyCode, event);
}
public void success() { public void success() {
writePreference(R.string.first_launch_suceeded_once_key, true); writePreference(R.string.first_launch_suceeded_once_key, true);
setResult(Activity.RESULT_OK); setResult(Activity.RESULT_OK);

View file

@ -20,7 +20,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
/** /**
* @author Sylvain Berfini * @author Sylvain Berfini
*/ */
public enum SetupFragments { public enum SetupFragmentsEnum {
WELCOME, WELCOME,
MENU, MENU,
WIZARD, WIZARD,

View file

@ -26,6 +26,7 @@ import org.linphone.LinphoneUtils;
import org.linphone.R; import org.linphone.R;
import org.linphone.core.LinphoneChatMessage; import org.linphone.core.LinphoneChatMessage;
import android.annotation.SuppressLint;
import android.content.Context; import android.content.Context;
import android.graphics.Bitmap; import android.graphics.Bitmap;
import android.graphics.Color; import android.graphics.Color;
@ -37,6 +38,8 @@ import android.text.method.LinkMovementMethod;
import android.text.style.ImageSpan; import android.text.style.ImageSpan;
import android.view.LayoutInflater; import android.view.LayoutInflater;
import android.view.View; import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.ImageView; import android.widget.ImageView;
import android.widget.LinearLayout; import android.widget.LinearLayout;
import android.widget.RelativeLayout; import android.widget.RelativeLayout;
@ -46,6 +49,7 @@ import android.widget.TextView;
/** /**
* @author Sylvain Berfini * @author Sylvain Berfini
*/ */
@SuppressLint("SimpleDateFormat")
public class BubbleChat { public class BubbleChat {
private static final HashMap<String, Integer> emoticons = new HashMap<String, Integer>(); private static final HashMap<String, Integer> emoticons = new HashMap<String, Integer>();
static { static {
@ -81,6 +85,7 @@ public class BubbleChat {
private RelativeLayout view; private RelativeLayout view;
private ImageView statusView; private ImageView statusView;
private Button download;
public BubbleChat(Context context, int id, String message, Bitmap image, String time, boolean isIncoming, LinphoneChatMessage.State status, int previousID) { public BubbleChat(Context context, int id, String message, Bitmap image, String time, boolean isIncoming, LinphoneChatMessage.State status, int previousID) {
view = new RelativeLayout(context); view = new RelativeLayout(context);
@ -144,6 +149,11 @@ public class BubbleChat {
imageView.setVisibility(View.GONE); imageView.setVisibility(View.GONE);
} }
download = (Button) layout.findViewById(R.id.download);
if (download != null && image == null && message == null) {
download.setVisibility(View.VISIBLE);
}
TextView timeView = (TextView) layout.findViewById(R.id.time); TextView timeView = (TextView) layout.findViewById(R.id.time);
timeView.setText(timestampToHumanDate(context, time)); timeView.setText(timestampToHumanDate(context, time));
@ -261,4 +271,10 @@ public class BubbleChat {
return Html.fromHtml(text); return Html.fromHtml(text);
} }
public void setDownloadImageButtonListener(OnClickListener onClickListener) {
if (download != null) {
download.setOnClickListener(onClickListener);
}
}
} }

View file

@ -19,9 +19,6 @@ SCALE_SRCS += vpx_scale/generic/yv12config.c
SCALE_SRCS += vpx_scale/generic/yv12extend.c SCALE_SRCS += vpx_scale/generic/yv12extend.c
SCALE_SRCS += vpx_scale/generic/gen_scalers.c SCALE_SRCS += vpx_scale/generic/gen_scalers.c
#arm
SCALE_SRCS += vpx_scale/arm/scalesystemdependent.c
#neon #neon
SCALE_SRCS += vpx_scale/arm/neon/vp8_vpxyv12_copy_y_neon$(ASM).neon SCALE_SRCS += vpx_scale/arm/neon/vp8_vpxyv12_copy_y_neon$(ASM).neon
SCALE_SRCS += vpx_scale/arm/neon/vp8_vpxyv12_copyframe_func_neon$(ASM).neon SCALE_SRCS += vpx_scale/arm/neon/vp8_vpxyv12_copyframe_func_neon$(ASM).neon
@ -32,11 +29,8 @@ SCALE_SRCS += vpx_scale/arm/neon/yv12extend_arm.c
### vp8cx_arm ### vp8cx_arm
#File list for arm #File list for arm
# encoder # encoder
VP8_CX_SRCS = vp8/encoder/arm/arm_csystemdependent.c
VP8_CX_SRCS += vp8/encoder/arm/dct_arm.c VP8_CX_SRCS += vp8/encoder/arm/dct_arm.c
VP8_CX_SRCS += vp8/encoder/arm/quantize_arm.c VP8_CX_SRCS += vp8/encoder/arm/quantize_arm.c
VP8_CX_SRCS += vp8/encoder/arm/variance_arm.c
#File list for armv5te #File list for armv5te
# encoder # encoder
@ -51,28 +45,16 @@ VP8_CX_SRCS += vp8/encoder/arm/armv5te/vp8_packtokens_partitions_armv5$(ASM)
VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_subtract_armv6$(ASM) VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_subtract_armv6$(ASM)
VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_short_fdct4x4_armv6$(ASM) VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_short_fdct4x4_armv6$(ASM)
VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_fast_quantize_b_armv6$(ASM) VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_fast_quantize_b_armv6$(ASM)
VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_sad16x16_armv6$(ASM)
VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_variance16x16_armv6$(ASM)
VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_variance_halfpixvar16x16_h_armv6$(ASM)
VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_variance_halfpixvar16x16_v_armv6$(ASM)
VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_variance_halfpixvar16x16_hv_armv6$(ASM)
VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_mse16x16_armv6$(ASM) VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_mse16x16_armv6$(ASM)
VP8_CX_SRCS += vp8/encoder/arm/armv6/vp8_variance8x8_armv6$(ASM)
VP8_CX_SRCS += vp8/encoder/arm/armv6/walsh_v6$(ASM) VP8_CX_SRCS += vp8/encoder/arm/armv6/walsh_v6$(ASM)
#File list for neon #File list for neon
# encoder # encoder
VP8_CX_SRCS += vp8/encoder/arm/neon/fastquantizeb_neon$(ASM).neon VP8_CX_SRCS += vp8/encoder/arm/neon/fastquantizeb_neon$(ASM).neon
VP8_CX_SRCS += vp8/encoder/arm/neon/picklpf_arm.c.neon VP8_CX_SRCS += vp8/encoder/arm/neon/picklpf_arm.c.neon
VP8_CX_SRCS += vp8/encoder/arm/neon/sad8_neon$(ASM).neon
VP8_CX_SRCS += vp8/encoder/arm/neon/sad16_neon$(ASM).neon
VP8_CX_SRCS += vp8/encoder/arm/neon/shortfdct_neon$(ASM).neon VP8_CX_SRCS += vp8/encoder/arm/neon/shortfdct_neon$(ASM).neon
VP8_CX_SRCS += vp8/encoder/arm/neon/subtract_neon$(ASM).neon VP8_CX_SRCS += vp8/encoder/arm/neon/subtract_neon$(ASM).neon
VP8_CX_SRCS += vp8/encoder/arm/neon/variance_neon$(ASM).neon
VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_mse16x16_neon$(ASM).neon VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_mse16x16_neon$(ASM).neon
VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_subpixelvariance8x8_neon$(ASM).neon
VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_subpixelvariance16x16_neon$(ASM).neon
VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_subpixelvariance16x16s_neon$(ASM).neon
VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_memcpy_neon$(ASM).neon VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_memcpy_neon$(ASM).neon
VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon$(ASM).neon VP8_CX_SRCS += vp8/encoder/arm/neon/vp8_shortwalsh4x4_neon$(ASM).neon
@ -87,7 +69,7 @@ VP8_CX_SRCS += vp8/encoder/encodeintra.c
VP8_CX_SRCS += vp8/encoder/encodemb.c VP8_CX_SRCS += vp8/encoder/encodemb.c
VP8_CX_SRCS += vp8/encoder/encodemv.c VP8_CX_SRCS += vp8/encoder/encodemv.c
VP8_CX_SRCS += vp8/encoder/ethreading.c VP8_CX_SRCS += vp8/encoder/ethreading.c
VP8_CX_SRCS += vp8/encoder/generic/csystemdependent.c VP8_CX_SRCS += vp8/encoder/denoising.c
VP8_CX_SRCS += vp8/encoder/lookahead.c VP8_CX_SRCS += vp8/encoder/lookahead.c
VP8_CX_SRCS += vp8/encoder/mcomp.c VP8_CX_SRCS += vp8/encoder/mcomp.c
VP8_CX_SRCS += vp8/encoder/modecosts.c VP8_CX_SRCS += vp8/encoder/modecosts.c
@ -98,17 +80,16 @@ VP8_CX_SRCS += vp8/encoder/psnr.c
VP8_CX_SRCS += vp8/encoder/quantize.c VP8_CX_SRCS += vp8/encoder/quantize.c
VP8_CX_SRCS += vp8/encoder/ratectrl.c VP8_CX_SRCS += vp8/encoder/ratectrl.c
VP8_CX_SRCS += vp8/encoder/rdopt.c VP8_CX_SRCS += vp8/encoder/rdopt.c
VP8_CX_SRCS += vp8/encoder/sad_c.c
VP8_CX_SRCS += vp8/encoder/segmentation.c VP8_CX_SRCS += vp8/encoder/segmentation.c
VP8_CX_SRCS += vp8/encoder/tokenize.c VP8_CX_SRCS += vp8/encoder/tokenize.c
VP8_CX_SRCS += vp8/encoder/treewriter.c VP8_CX_SRCS += vp8/encoder/treewriter.c
VP8_CX_SRCS += vp8/encoder/variance_c.c
### vp8_common ### vp8_common
VP8_COMMON_SRCS = vp8/common/alloccommon.c VP8_COMMON_SRCS = vp8/common/alloccommon.c
VP8_COMMON_SRCS += vp8/common/asm_com_offsets.c VP8_COMMON_SRCS += vp8/common/asm_com_offsets.c
VP8_COMMON_SRCS += vp8/common/blockd.c VP8_COMMON_SRCS += vp8/common/blockd.c
VP8_COMMON_SRCS += vp8/common/debugmodes.c VP8_COMMON_SRCS += vp8/common/debugmodes.c
VP8_COMMON_SRCS += vp8/common/dequantize.c
VP8_COMMON_SRCS += vp8/common/entropy.c VP8_COMMON_SRCS += vp8/common/entropy.c
VP8_COMMON_SRCS += vp8/common/entropymode.c VP8_COMMON_SRCS += vp8/common/entropymode.c
VP8_COMMON_SRCS += vp8/common/entropymv.c VP8_COMMON_SRCS += vp8/common/entropymv.c
@ -116,34 +97,32 @@ VP8_COMMON_SRCS += vp8/common/extend.c
VP8_COMMON_SRCS += vp8/common/filter.c VP8_COMMON_SRCS += vp8/common/filter.c
VP8_COMMON_SRCS += vp8/common/findnearmv.c VP8_COMMON_SRCS += vp8/common/findnearmv.c
VP8_COMMON_SRCS += vp8/common/generic/systemdependent.c VP8_COMMON_SRCS += vp8/common/generic/systemdependent.c
VP8_COMMON_SRCS += vp8/common/idct_blk.c
VP8_COMMON_SRCS += vp8/common/idctllm.c VP8_COMMON_SRCS += vp8/common/idctllm.c
#VP8_COMMON_SRCS += vp8/common/invtrans.c VP8_COMMON_SRCS += vp8/common/rtcd.c
VP8_COMMON_SRCS += vp8/common/loopfilter.c VP8_COMMON_SRCS += vp8/common/loopfilter.c
VP8_COMMON_SRCS += vp8/common/loopfilter_filters.c VP8_COMMON_SRCS += vp8/common/loopfilter_filters.c
VP8_COMMON_SRCS += vp8/common/mbpitch.c VP8_COMMON_SRCS += vp8/common/mbpitch.c
VP8_COMMON_SRCS += vp8/common/modecont.c VP8_COMMON_SRCS += vp8/common/modecont.c
VP8_COMMON_SRCS += vp8/common/modecontext.c
VP8_COMMON_SRCS += vp8/common/quant_common.c VP8_COMMON_SRCS += vp8/common/quant_common.c
#VP8_COMMON_SRCS += vp8/common/recon.c
VP8_COMMON_SRCS += vp8/common/reconinter.c VP8_COMMON_SRCS += vp8/common/reconinter.c
VP8_COMMON_SRCS += vp8/common/reconintra.c VP8_COMMON_SRCS += vp8/common/reconintra.c
VP8_COMMON_SRCS += vp8/common/reconintra4x4.c VP8_COMMON_SRCS += vp8/common/reconintra4x4.c
VP8_COMMON_SRCS += vp8/common/sad_c.c
VP8_COMMON_SRCS += vp8/common/setupintrarecon.c VP8_COMMON_SRCS += vp8/common/setupintrarecon.c
VP8_COMMON_SRCS += vp8/common/swapyv12buffer.c VP8_COMMON_SRCS += vp8/common/swapyv12buffer.c
VP8_COMMON_SRCS += vp8/common/variance_c.c
VP8_COMMON_SRCS += vp8/common/treecoder.c VP8_COMMON_SRCS += vp8/common/treecoder.c
VP8_COMMON_SRCS += vp8/common/dequantize.c
VP8_COMMON_SRCS += vp8/common/idct_blk.c
# common (c) # common (c)
VP8_COMMON_SRCS += vp8/common/arm/dequantize_arm.c
VP8_COMMON_SRCS += vp8/common/arm/arm_systemdependent.c
VP8_COMMON_SRCS += vp8/common/arm/bilinearfilter_arm.c
VP8_COMMON_SRCS += vp8/common/arm/filter_arm.c VP8_COMMON_SRCS += vp8/common/arm/filter_arm.c
VP8_COMMON_SRCS += vp8/common/arm/loopfilter_arm.c VP8_COMMON_SRCS += vp8/common/arm/loopfilter_arm.c
VP8_COMMON_SRCS += vp8/common/arm/reconintra_arm.c VP8_COMMON_SRCS += vp8/common/arm/reconintra_arm.c
VP8_COMMON_SRCS += vp8/common/arm/dequantize_arm.c
VP8_COMMON_SRCS += vp8/common/arm/variance_arm.c
VP8_COMMON_SRCS += vp8/common/arm/bilinearfilter_arm.c
# common (armv6) # common (armv6)
VP8_COMMON_SRCS += vp8/common/arm/armv6/intra4x4_predict_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/bilinearfilter_v6$(ASM) VP8_COMMON_SRCS += vp8/common/arm/armv6/bilinearfilter_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/copymem8x4_v6$(ASM) VP8_COMMON_SRCS += vp8/common/arm/armv6/copymem8x4_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/copymem8x8_v6$(ASM) VP8_COMMON_SRCS += vp8/common/arm/armv6/copymem8x8_v6$(ASM)
@ -153,12 +132,18 @@ VP8_COMMON_SRCS += vp8/common/arm/armv6/iwalsh_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/filter_v6$(ASM) VP8_COMMON_SRCS += vp8/common/arm/armv6/filter_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/idct_v6$(ASM) VP8_COMMON_SRCS += vp8/common/arm/armv6/idct_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/loopfilter_v6$(ASM) VP8_COMMON_SRCS += vp8/common/arm/armv6/loopfilter_v6$(ASM)
#VP8_COMMON_SRCS += vp8/common/arm/armv6/recon_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/simpleloopfilter_v6$(ASM) VP8_COMMON_SRCS += vp8/common/arm/armv6/simpleloopfilter_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/sixtappredict8x4_v6$(ASM) VP8_COMMON_SRCS += vp8/common/arm/armv6/sixtappredict8x4_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/idct_blk_v6.c VP8_COMMON_SRCS += vp8/common/arm/armv6/intra4x4_predict_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/dequant_idct_v6$(ASM) VP8_COMMON_SRCS += vp8/common/arm/armv6/dequant_idct_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/dequantize_v6$(ASM) VP8_COMMON_SRCS += vp8/common/arm/armv6/dequantize_v6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/idct_blk_v6.c
VP8_COMMON_SRCS += vp8/common/arm/armv6/vp8_sad16x16_armv6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/vp8_variance8x8_armv6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/vp8_variance16x16_armv6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_h_armv6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_v_armv6$(ASM)
VP8_COMMON_SRCS += vp8/common/arm/armv6/vp8_variance_halfpixvar16x16_hv_armv6$(ASM)
# common (neon) # common (neon)
VP8_COMMON_SRCS += vp8/common/arm/neon/bilinearpredict4x4_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/bilinearpredict4x4_neon$(ASM).neon
@ -174,50 +159,45 @@ VP8_COMMON_SRCS += vp8/common/arm/neon/loopfilter_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/loopfiltersimplehorizontaledge_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/loopfiltersimplehorizontaledge_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/loopfiltersimpleverticaledge_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/loopfiltersimpleverticaledge_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/mbloopfilter_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/mbloopfilter_neon$(ASM).neon
#VP8_COMMON_SRCS += vp8/common/arm/neon/recon2b_neon$(ASM).neon
#VP8_COMMON_SRCS += vp8/common/arm/neon/recon4b_neon$(ASM).neon
#VP8_COMMON_SRCS += vp8/common/arm/neon/reconb_neon$(ASM).neon
#VP8_COMMON_SRCS += vp8/common/arm/neon/shortidct4x4llm_1_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/shortidct4x4llm_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/shortidct4x4llm_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/sad8_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/sad16_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict4x4_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict4x4_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict8x4_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict8x4_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict8x8_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict8x8_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict16x16_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/sixtappredict16x16_neon$(ASM).neon
#VP8_COMMON_SRCS += vp8/common/arm/neon/recon16x16mb_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/buildintrapredictorsmby_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/buildintrapredictorsmby_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/save_neon_reg$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/save_reg_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/dequant_idct_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/dequant_idct_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/idct_dequant_full_2x_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/idct_dequant_full_2x_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/idct_dequant_0_2x_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/idct_dequant_0_2x_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/dequantizeb_neon$(ASM).neon VP8_COMMON_SRCS += vp8/common/arm/neon/dequantizeb_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/idct_blk_neon.c.neon VP8_COMMON_SRCS += vp8/common/arm/neon/idct_blk_neon.c.neon
VP8_COMMON_SRCS += vp8/common/arm/neon/variance_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/vp8_subpixelvariance8x8_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/vp8_subpixelvariance16x16_neon$(ASM).neon
VP8_COMMON_SRCS += vp8/common/arm/neon/vp8_subpixelvariance16x16s_neon$(ASM).neon
### vp8dx_arm
VP8_DX_SRCS = vp8/decoder/arm/arm_dsystemdependent.c
#File list for armv6 #File list for armv6
### vp8dx ### vp8dx
VP8_DX_SRCS += vp8/vp8_dx_iface.c VP8_DX_SRCS = vp8/vp8_dx_iface.c
VP8_DX_SRCS += vp8/decoder/asm_dec_offsets.c VP8_DX_SRCS += vp8/decoder/asm_dec_offsets.c
VP8_DX_SRCS += vp8/decoder/dboolhuff.c VP8_DX_SRCS += vp8/decoder/dboolhuff.c
VP8_DX_SRCS += vp8/decoder/decodemv.c VP8_DX_SRCS += vp8/decoder/decodemv.c
VP8_DX_SRCS += vp8/decoder/decodframe.c VP8_DX_SRCS += vp8/decoder/decodframe.c
VP8_DX_SRCS += vp8/decoder/detokenize.c VP8_DX_SRCS += vp8/decoder/detokenize.c
VP8_DX_SRCS += vp8/decoder/error_concealment.c VP8_DX_SRCS += vp8/decoder/error_concealment.c
VP8_DX_SRCS += vp8/decoder/generic/dsystemdependent.c
VP8_DX_SRCS += vp8/decoder/reconintra_mt.c
VP8_DX_SRCS += vp8/decoder/threading.c
VP8_DX_SRCS += vp8/decoder/onyxd_if.c VP8_DX_SRCS += vp8/decoder/onyxd_if.c
VP8_DX_SRCS += vp8/decoder/threading.c
### vpx_codec ### vpx_codec
API_SRCS = vpx/src/vpx_decoder.c API_SRCS = vpx/src/vpx_decoder.c
API_SRCS += vpx/src/vpx_decoder_compat.c
API_SRCS += vpx/src/vpx_encoder.c API_SRCS += vpx/src/vpx_encoder.c
API_SRCS += vpx/src/vpx_codec.c API_SRCS += vpx/src/vpx_codec.c
API_SRCS += vpx/src/vpx_image.c API_SRCS += vpx/src/vpx_image.c
API_SRCS += vpx_scale/generic/scalesystemdependent.c
LOCAL_SRC_FILES = $(MEM_SRCS) LOCAL_SRC_FILES = $(MEM_SRCS)
LOCAL_SRC_FILES += $(SCALE_SRCS) LOCAL_SRC_FILES += $(SCALE_SRCS)

@ -1 +1 @@
Subproject commit 2b0aee4b5def280d4e27c11d1b95ecd8545eed34 Subproject commit b9ce43029298182668d4dcb0e0814189e4a63c2a