Update TextAnimator to retry with updated layout when failed
The source of the underlying issue is that the text layout is a shared object between the TextView which creates it and the TextAnimator which consumes it and caches certain values internally. When the TextView mutates the layout, the TextAnimator must be notified via updateLayout. This change prevents that exception from crashing the application by updating the layout after the fact, and retyring the setTextStyle call. If it happens twice in a row, we let the exception escape and still crash. Ideally the callsites would always call updateLayout when the layout is mutated, but this has proved difficult to detect robustly. Flag: N/A Bug: 305221458 Test: Manual & Presubmits Change-Id: I3f030674636710c0dadfd133c2aa72530ab1be10
Loading
Please register or sign in to comment