Fix audio indicator when system piping call.

This commit is contained in:
Alex Hart
2025-12-15 14:40:13 -04:00
committed by jeffrey-signal
parent e4ec538f13
commit ec44b9aae7

View File

@@ -40,6 +40,7 @@ class AudioIndicatorView(context: Context, attrs: AttributeSet?) : FrameLayout(c
private var sideBarAnimation: ValueAnimator? = null
private var showAudioLevel = false
private var lastMicrophoneEnabled: Boolean = true
private var lastAudioLevel: CallParticipant.AudioLevel? = null
init {
@@ -90,9 +91,17 @@ class AudioIndicatorView(context: Context, attrs: AttributeSet?) : FrameLayout(c
invalidate()
}
lastMicrophoneEnabled = microphoneEnabled
lastAudioLevel = level
}
override fun onSizeChanged(w: Int, h: Int, oldw: Int, oldh: Int) {
super.onSizeChanged(w, h, oldw, oldh)
if (h > 0 && oldh == 0) {
bind(lastMicrophoneEnabled, lastAudioLevel)
}
}
private fun createAnimation(current: ValueAnimator?, finalHeight: Float): ValueAnimator {
val currentHeight = current?.animatedValue as? Float ?: 0f