mirror of
https://gitlab.linphone.org/BC/public/linphone-android.git
synced 2026-01-19 12:38:07 +00:00
Fix Galaxy S audio issue
This commit is contained in:
parent
2b84cf2f5c
commit
171bd2cae2
2 changed files with 11 additions and 2 deletions
|
|
@ -868,6 +868,14 @@ public class InCallActivity extends FragmentActivity implements
|
|||
if (isVideoEnabledInCall != isVideoEnabled) {
|
||||
isVideoEnabled = isVideoEnabledInCall;
|
||||
switchVideo(isVideoEnabled);
|
||||
} else {
|
||||
//Hack to fix Galaxy S issue
|
||||
if (isSpeakerEnabled) {
|
||||
LinphoneManager.getInstance().routeAudioToSpeaker();
|
||||
} else {
|
||||
LinphoneManager.getInstance().routeAudioToReceiver();
|
||||
}
|
||||
LinphoneManager.getLc().enableSpeaker(isSpeakerEnabled);
|
||||
}
|
||||
|
||||
isMicMuted = LinphoneManager.getLc().isMicMuted();
|
||||
|
|
|
|||
|
|
@ -204,7 +204,7 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
@SuppressWarnings("deprecation")
|
||||
private void routeAudioToSpeakerHelperHelper(boolean speakerOn) {
|
||||
boolean different = isSpeakerOn() ^ speakerOn;
|
||||
if (!different) {
|
||||
if (!different && !Hacks.needGalaxySAudioHack()) {
|
||||
Log.d("Skipping change audio route by the same route ",
|
||||
speakerOn ? "speaker" : "earpiece");
|
||||
return;
|
||||
|
|
@ -227,7 +227,8 @@ public final class LinphoneManager implements LinphoneCoreListener {
|
|||
listener.onAudioStateChanged(speakerOn ? AudioState.SPEAKER : AudioState.EARPIECE);
|
||||
}
|
||||
}
|
||||
private synchronized void routeAudioToSpeakerHelper(boolean speakerOn) {
|
||||
|
||||
public synchronized void routeAudioToSpeakerHelper(boolean speakerOn) {
|
||||
final LinphoneCall call = mLc.getCurrentCall();
|
||||
if (call != null && call.getState() == State.StreamsRunning && Hacks.needPausingCallForSpeakers()) {
|
||||
Log.d("Hack to have speaker=",speakerOn," while on call");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue