Fix crash in RecyclerView if it's view is animated by Transitions
When it is happening: a) Disappear Visibility transition is applied to the recyclerview(and it's children) b) Transition added the View to the ViewOverlay for an animation c) Transition is first paused before being canceled (for example when the new reversed transition wants to start after user click) d) In Visibility.onPause() we call suppressLayout(false) for RecyclerView e) RecyclerView starts layouting and tries to use our view, but it is currently added to the overlay f) So it crashes on attempt to call addView Fix: Detach a view from overlay in Visibility transition while it is paused. Attach it back in onTransitionResume if the view is still not used by someone else like RecyclerView. Bug: 33609996 Fix in AndroidX: I18d8327b338be442ec30b15fe53a99d1a2974888 Test: cts tests for Transitions Change-Id: I74f138617c8afbac9f6efa4ee9a1f4e961306c9e
Loading
Please register or sign in to comment