Skip to content
Snippets Groups Projects
Unverified Commit e9804ecc authored by Rashad Sookram's avatar Rashad Sookram Committed by GitHub
Browse files

Disable audio level indicator in calls.

parent d62d0efb
No related branches found
No related tags found
No related merge requests found
......@@ -50,6 +50,12 @@ class AudioIndicatorView(context: Context, attrs: AttributeSet) : FrameLayout(co
fun bind(microphoneEnabled: Boolean, level: CallParticipant.AudioLevel?) {
micMuted.visible = !microphoneEnabled
if (WebRtcActionProcessor.AUDIO_LEVELS_INTERVAL != null) {
bindAudioLevel(microphoneEnabled, level)
}
}
private fun bindAudioLevel(microphoneEnabled: Boolean, level: CallParticipant.AudioLevel?) {
val wasShowingAudioLevel = showAudioLevel
showAudioLevel = microphoneEnabled && level != null
......@@ -89,7 +95,7 @@ class AudioIndicatorView(context: Context, attrs: AttributeSet) : FrameLayout(co
val currentHeight = current?.animatedValue as? Float ?: 0f
return ValueAnimator.ofFloat(currentHeight, finalHeight).apply {
duration = WebRtcActionProcessor.AUDIO_LEVELS_INTERVAL.toLong()
duration = WebRtcActionProcessor.AUDIO_LEVELS_INTERVAL?.toLong() ?: 0
interpolator = DecelerateInterpolator()
}
}
......
......
......@@ -78,7 +78,7 @@ import static org.thoughtcrime.securesms.service.webrtc.WebRtcData.ReceivedAnswe
*/
public abstract class WebRtcActionProcessor {
public static final int AUDIO_LEVELS_INTERVAL = 200;
@Nullable public static final Integer AUDIO_LEVELS_INTERVAL = null;
protected final Context context;
protected final WebRtcInteractor webRtcInteractor;
......
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment