commit | 12147e699dcfb93fd1b419322449f903ef329233 | [log] [tgz] |
---|---|---|
author | George Lin <giolin@google.com> | Tue Apr 18 23:06:17 2023 +0000 |
committer | George Lin <giolin@google.com> | Wed Apr 19 16:27:46 2023 +0000 |
tree | 428e05edfeafa4626439d0cb7d2084b20404124e | |
parent | cd6f960604d2c31a034a1b69a34188093ff33342 [diff] |
Fix race condition for clock carousel Carousel.mMotionLayout is only ready after attachedToWindow. We can only bind the view after attachedToWindow; otherwise, whenever the flow emits any events before attachedToWindow and triggers calls to Carousel.mMotionLayout, there will be a null pointer exception. Test: Manually tested the app does not crash when emits early Fixes: 278784117 Change-Id: Id65ed932b1526062063e453e910d16e01e1508dd