Wrap hidePicker dismiss call in ISE catch.

This commit is contained in:
Alex Hart
2023-04-06 10:46:11 -03:00
parent 73a7063867
commit 9d4e13cd08

View File

@@ -206,7 +206,12 @@ class WebRtcAudioOutputToggleButton @JvmOverloads constructor(context: Context,
}
private fun hidePicker() {
picker?.dismiss()
try {
picker?.dismiss()
} catch (e: IllegalStateException) {
Log.w(TAG, "Picker is not attached to a window.")
}
picker = null
}