sxmo_modemaudio.sh: fail exit if it actually failed to setup audio
Do not fire sxmo_hook_call_audio if we fails to enable call mode correctly, and actually exit 1 when it does. Plus check everything is actually right at the end of the hack hook.
This commit is contained in:
@@ -21,6 +21,7 @@ if [ "$1" = "enable" ]; then
|
||||
|
||||
# Add other things here, e.g., volume boosters
|
||||
|
||||
sxmo_modemaudio.sh is_disabled_speaker && sxmo_modemaudio.sh is_unmuted_mic
|
||||
# Phonecall ended
|
||||
elif [ "$1" = "disable" ]; then
|
||||
sxmo_log "Attempting hack to get things just right."
|
||||
@@ -30,4 +31,5 @@ elif [ "$1" = "disable" ]; then
|
||||
|
||||
# Add other things here, e.g., volume boosters
|
||||
|
||||
sxmo_modemaudio.sh is_enabled_speaker
|
||||
fi
|
||||
|
@@ -17,12 +17,16 @@ ca_dbus_set_prop() {
|
||||
}
|
||||
|
||||
setup_audio() {
|
||||
enable_call_audio_mode
|
||||
if ! enable_call_audio_mode; then
|
||||
return 1
|
||||
fi
|
||||
sxmo_hook_call_audio.sh "enable"
|
||||
}
|
||||
|
||||
reset_audio() {
|
||||
sxmo_hook_call_audio.sh "disable"
|
||||
if ! sxmo_hook_call_audio.sh "disable"; then
|
||||
return 1
|
||||
fi
|
||||
disable_call_audio_mode
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user