Solve inflated view/cached view inconsistency
In a specific race condition where we free a view and clear its cached view while that view is reinflating, we get into a scenario where the view is null but we still have a cached view. This causes a crash if you then try to reinflate the view. This occurs because the reinflate updates the cache but does not update the view In this CL, we tightly couple updates to the view in inflation so that they always update the cache together. This way, it shouldn't be possible for the inflated view and cached view to get out of sync. Bug: 124387005 Test: Reproduced bug (via artificially increasing reapplyAsync latency) and it no longer crashes. Change-Id: Icfad13d00922d04213147fdaedb1229ab73b133c
Loading
Please register or sign in to comment