Fix Galaxy S audio issue
This commit is contained in:
parent
63c5cf01f5
commit
9313994e38
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…
Reference in a new issue