mirror of
https://github.com/oxen-io/session-android.git
synced 2025-10-23 17:48:50 +00:00
More intelligent default behavior with speakerphone and wired headset
When video is enabled, speakerphone is now enabled unless there's a wired headset. If speakerphone is enabled and a wired headset gets plugged in, speakerphone is disabled. If video is enabled and a wired headset is removed, speakerphone is enabled. Fixes #6153 // FREEBIE
This commit is contained in:
@@ -99,14 +99,14 @@ public class WebRtcCallControls extends LinearLayout {
|
||||
});
|
||||
}
|
||||
|
||||
public boolean isVideoMuted() {
|
||||
return !videoMuteButton.isChecked();
|
||||
}
|
||||
|
||||
public void setAudioButtonListener(final AudioButtonListener listener) {
|
||||
audioButton.setListener(listener);
|
||||
}
|
||||
|
||||
public boolean isVideoEnabled() {
|
||||
return videoMuteButton.isChecked();
|
||||
}
|
||||
|
||||
public void reset() {
|
||||
updateAudioButton();
|
||||
audioMuteButton.setChecked(false);
|
||||
|
@@ -179,6 +179,10 @@ public class WebRtcCallScreen extends FrameLayout implements Recipient.Recipient
|
||||
this.controls.updateAudioButton();
|
||||
}
|
||||
|
||||
public void notifyAudioRoutingChange() {
|
||||
this.controls.updateAudioButton();
|
||||
}
|
||||
|
||||
public void setLocalVideoEnabled(boolean enabled) {
|
||||
if (enabled && this.localRenderLayout.isHidden()) {
|
||||
this.localRenderLayout.setHidden(false);
|
||||
@@ -199,6 +203,10 @@ public class WebRtcCallScreen extends FrameLayout implements Recipient.Recipient
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isVideoEnabled() {
|
||||
return controls.isVideoEnabled();
|
||||
}
|
||||
|
||||
private void initialize() {
|
||||
LayoutInflater inflater = (LayoutInflater)getContext().getSystemService(Context.LAYOUT_INFLATER_SERVICE);
|
||||
inflater.inflate(R.layout.webrtc_call_screen, this, true);
|
||||
|
Reference in New Issue
Block a user