Closed Slion closed 8 months ago
This is a massive bug in Android where the motion event processing can't deal with changes in the view hierarchy. That means you just cant safely remove views past the creation of your activity.
The crash above can be worked around by doing something like that in a custom ViewGroup
:
override fun onResolvePointerIcon(event: MotionEvent?, pointerIndex: Int): PointerIcon? {
var icon: PointerIcon? = null
try {
icon = super.onResolvePointerIcon(event, pointerIndex)
}
catch (ex: Exception) {
Timber.w(ex,"Pointer icon exception")
}
return icon
}
Unfortunately it then crashes the same way down from ViewRootImpl.maybeUpdateTooltip
and we can't override ViewGroup.dispatchTooltipHoverEvent
cause the dickheads at Android think so big of themselves they need to lock every freaking APIs you should not be using. I would need to be able to override those APIs to workaround Android bugs but I can't because they decided it would be unsafe for you to do that 😭
If you mouse hover the WebView during tab change animation you can get the following crash. For instance on a device with a keyboard and mouse just do Ctrl+Tab while moving the mouse of the web page. This is related to #579.