Adjust clock element size when bounds change
While compose measures the appropriate view size, it doesn't recompose when the size of the underlying view changes. In order to signal to compose that it should recalculate the positions of views, we hook into the existing flow that tracks the size of the clock and use it to size the compose element directly. This is only enforced as a minimum size to avoid wrapping issues when the flow is at it's default value during first composition, or in case it becomes out of sync for a frame. This change also attempts to opportunistically fix a non-flexi bug, as I'm dividing the two clock bounds flows for flexiglass anyway. There is a latent edge-case where smartspace is incorrectly positioned for small clock because it is being placed based on the measurements of the large clock if a pending update to the isLargeClock flow is delayed and is desynchronized from the onClockBoundsChanged flow. This potential issue could be the root cause of b/436274234 but it has been difficult to confirm since I haven't been able to isolate a reproduction. Bug: 436274234 Bug: 438470065 Flag: com.android.systemui.scene_container Test: Checked that date / weather / alarms animates Change-Id: I96f7b7335f18c5adbb4ac7d2638b5e921a3dd440
Loading
Please register or sign in to comment