When requesting a blur, there no certitude that a new draw pass will be performed for the holding activity decor view. Therefore registering a onPreDrawListener was completly silly if the holding activity decor view was already displayed.
This was leading to several crashes due to registered onPreDrawListener triggered only once the dialog fragment was destroyed. HoldingActivity was at this time null and an NPE was fired.
62
A onPreDrawListener is still needed to handle a configuration change. In fact, dialogs fragments are attached again before activity UI is drawn. That's why we have to wait onPreDraw to ensure that blurred won't be performed on black pixels. But instead on registering the onPreDrawListener every times, we check now that the decor view isn't already shown. If it's the case, we directly launch the blur process.
Hope I won't release new critical bugs like this in the futur...
Blame myself on this.
When requesting a blur, there no certitude that a new draw pass will be performed for the holding activity decor view. Therefore registering a onPreDrawListener was completly silly if the holding activity decor view was already displayed.
This was leading to several crashes due to registered onPreDrawListener triggered only once the dialog fragment was destroyed. HoldingActivity was at this time null and an NPE was fired.
62
A onPreDrawListener is still needed to handle a configuration change. In fact, dialogs fragments are attached again before activity UI is drawn. That's why we have to wait onPreDraw to ensure that blurred won't be performed on black pixels. But instead on registering the onPreDrawListener every times, we check now that the decor view isn't already shown. If it's the case, we directly launch the blur process.
Hope I won't release new critical bugs like this in the futur...