Commit 54f04601 authored by Sylvain Berfini's avatar Sylvain Berfini 🎩
Browse files

Pause all calls when audio focus is lost on Android

parent 5cf68816
...@@ -26,6 +26,7 @@ This changelog file was started on October 2019. Previous changes were more or l ...@@ -26,6 +26,7 @@ This changelog file was started on October 2019. Previous changes were more or l
use linphone_event_unref() when the LinphoneEvent is no longer used, otherwise it will create a memory leak. use linphone_event_unref() when the LinphoneEvent is no longer used, otherwise it will create a memory leak.
- Real time text related function linphone_chat_message_get_char() now will always return the new line character, - Real time text related function linphone_chat_message_get_char() now will always return the new line character,
which wasn't the case before if the getChar() was done after the composing callback was triggered for this character. which wasn't the case before if the getChar() was done after the composing callback was triggered for this character.
- linphone_core_interpret_url() will unescape characters first if possible if only a username is given as input parameter.
### Fixed ### Fixed
- Internal refactoring of management of locally played tones, in order to fix race conditions. - Internal refactoring of management of locally played tones, in order to fix race conditions.
......
...@@ -1137,8 +1137,13 @@ LINPHONE_PUBLIC void linphone_core_remove_callbacks(LinphoneCore *core, const Li ...@@ -1137,8 +1137,13 @@ LINPHONE_PUBLIC void linphone_core_remove_callbacks(LinphoneCore *core, const Li
LINPHONE_PUBLIC void linphone_core_set_user_agent(LinphoneCore *core, const char *name, const char *version); LINPHONE_PUBLIC void linphone_core_set_user_agent(LinphoneCore *core, const char *name, const char *version);
/** /**
* See linphone_proxy_config_normalize_sip_uri for documentation. Default proxy config is used to parse * Constructs a #LinphoneAddress from the given string if possible.
* the address. *
* In case of just a username, characters will be unescaped.
* If a phone number is detected, it will be flattened.
* sip: or sips: prefix will be added if not present.
* Finally, @domain will be added if not present using default proxy config.
* @see linphone_proxy_config_normalize_sip_uri() for documentation.
* @param core The core @notnil * @param core The core @notnil
* @param url the url to parse @notnil * @param url the url to parse @notnil
* @return the #LinphoneAddress matching the url or NULL in case of failure. @maybenil * @return the #LinphoneAddress matching the url or NULL in case of failure. @maybenil
......
...@@ -252,12 +252,9 @@ public class CoreManager { ...@@ -252,12 +252,9 @@ public class CoreManager {
} }
public void onAudioFocusLost() { public void onAudioFocusLost() {
Log.i("[Core Manager] App has lost audio focus, pause current call if any"); Log.i("[Core Manager] App has lost audio focus, pausing all calls");
if (mCore != null) { if (mCore != null) {
Call call = mCore.getCurrentCall(); mCore.pauseAllCalls();
if (call != null) {
call.pause();
}
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment