fix(android): Make FirstDrawDoneListener cleanup OnGlobalLayoutListener after use (#5567)
* fix(android): Make FirstDrawDoneListener cleanup OnGlobalLayoutListener after use The OnGlobalLayoutListener registered in onDraw() to defer removal of the OnDrawListener was never itself removed. In single-Activity apps (e.g. React Native), this caused an unbounded per-navigation leak on the ViewTreeObserver, accumulating one listener per registerForNextDraw call. Make the OnGlobalLayoutListener remove itself after firing. Fixes JAVA-545 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com> * changelog --------- Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
R
Roman Zavarnitsyn committed
8da852cc8e39d8246ba5a712c88d38b64618b074
Parent: 9c501bb
Committed by GitHub <noreply@github.com>
on 6/19/2026, 9:11:14 AM