mirror of
https://github.com/signalapp/Signal-Android.git
synced 2025-12-24 04:58:45 +00:00
Ensure parent window token is non-null before trying to display Wifi popup.
This commit is contained in:
committed by
Greyson Parrelli
parent
d3be5807b5
commit
7078ef5d2b
@@ -25,6 +25,10 @@ class WifiToCellularPopupWindow(private val parent: ViewGroup) : PopupWindow(
|
||||
}
|
||||
|
||||
fun show() {
|
||||
if (parent.windowToken == null) {
|
||||
return
|
||||
}
|
||||
|
||||
showAtLocation(parent, Gravity.TOP or Gravity.START, 0, 0)
|
||||
VibrateUtil.vibrate(parent.context, VIBRATE_DURATION_MS)
|
||||
contentView.postDelayed(DISPLAY_DURATION_MS) {
|
||||
|
||||
Reference in New Issue
Block a user