Loading
viewcapture: fix race condition
onTrimMemory() could modify mFrameTimesNanosBg and mNodesBg (set new arrays with length = 0) while they were being concurrently accessed by copyCleanViewsFromLastFrameBg(). This CL fixes the issues with: 1. AtomicReferences wrapping the mFrameTimeNanosBg and mNodesBg arrays. 2. A check in copyCleanViewsFromLastFrameBg() to make sure the arrays have size != 0 before using them. Fix: 409559758 Flag: EXEMPT bugfix Test: presubmit Change-Id: If7103e352883908351fddb2616ac69c5a2b5871a