[SB] Remove fillMaxSize in StatusBarRoot's top-level Box.
Because the status bar mixes Compose views with old android Views, the measurement of items can be wonky. If a child view doesn't get measured until Compose's *placement* pass, Compose believes that the child view's size cannot affect the size of the parent because the parent has already been measured. This causes b/433578931, where the stacked mobile icon is ellipsizing even though it has enough room to show. During the transition from airplane mode -> non-airplane mode, the stacked mobile icon changes from having no size to having non-zero size. But, that size change happens too late. That means the system status icons container on the right side does not re-measure, so the container doesn't re-size to be wide enough for the stacked icon. Then, the stacked mobile icon thinks it doesn't have enough space to render fully so it renders as an ellipsized dot instead. Removing the `Box(Modifier.fillMaxSize())` means that the AndroidView has complete control over the measuring, so the container is correctly re-measured when the stacked mobile icon changes size. Note: This is probably fixed with the system_status_icons_in_compose flag, because then the right side of the status bar is 100% in Compose and this problem only arises when mixing Compose and non-Compose. Bug: 433578931 Bug: 406832105 Flag: EXEMPT bug fix Test: With 2 SIMs that stack: Turn on airplane mode, then turn off airplane mode and quickly open the shade. Once the two SIMs have re-connected, close the shade. Verify the stack icon correctly shows (i.e. no ellipsizing dot is shown) Test: Smoke test of the status bar layout in landscape+portrait, various font & display sizes Change-Id: Ibdc0a61f402bf7b515a333ff1b738533f1b50268
Loading
Please register or sign in to comment