Disable audio level indicator in calls.

fork-5.53.8
Rashad Sookram 2022-04-15 15:45:50 -04:00 zatwierdzone przez GitHub
rodzic d62d0efb1d
commit e9804eccbb
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
2 zmienionych plików z 8 dodań i 2 usunięć

Wyświetl plik

@ -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()
}
}

Wyświetl plik

@ -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;