Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit d2d5cdff authored by Andrey Kulikov's avatar Andrey Kulikov
Browse files

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
parent c83ed073
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment