Skip to content

Commit

Permalink
Wrap hidePicker dismiss call in ISE catch.
Browse files Browse the repository at this point in the history
  • Loading branch information
alex-signal committed Apr 6, 2023
1 parent 73a7063 commit 9d4e13c
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 9d4e13c

Please sign in to comment.