Loading
Revert^2 "Reduce extra invocation of ThreadLocal in AnimationHandler"
It can return the non-null obtained instance directly. Unfortunately, ThreadLocal.withInitial and override initialValue may not be suitable to use, because getAnimationCount may not want to create the instance. Some special builds may insert generated code in constructor to evaluate code coverage. And it may perform I/O operations that violate StrictMode, and then StrictMode invokes getCurrentAnimationsCount for dump, which accesses the ThreadLocal and triggers initialization again. That leads to endless recursion. Bug: 163976519 Flag: EXEMPT simple refactor Test: atest ValueAnimatorTests Change-Id: Id6e30e28279df8ac68b906afd2f59609e2568730