Some Views block all events going to their descendants, and
then synthesize new events themselves. Gtk doesn't allow event
synthesization, which makes this quite annoying to deal with.
This initial implementation definiely has some problems,
for example it seems to cause infinite loops in some cases,
however it surprisingly works well enough.
This reverts commit b33a470c7b.
This commit was added as fix for layout recreation loops, but this is no
longer a problem, since ViewGroup.detachViewFromParent() has been
improved. The first fix is no longer needed and it seems to cause some
minor regressions, so we revert it.
Some ViewGroups like ViewPager2 call attachViewToParent() without
calling detachViewFromParent() first. This is not allowed according to
the Android API spec, but we need to handle it.
This field is directly accessed by androidx and some androidx version
expect it to be a Map while other expect a ThemedResourceCache. This
mess is probably caused by reporting an age old Build.SDK_INT.
Temporarily detaching a View from its parent should not call any
callbacks, which was the case with the old implementation. This was
causing infinite recreation loops in some cases.
These classes are needed for WhatsApp, but having them available makes
NewPipe try to generate PoTokens in the WebView, which does not work yet,
so we just throw an Exception in NewPipe based on the package name.