mirror of
https://github.com/signalapp/Signal-Android.git
synced 2026-02-21 10:17:56 +00:00
Fix audio indicator when system piping call.
This commit is contained in:
committed by
jeffrey-signal
parent
e4ec538f13
commit
ec44b9aae7
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user