From c6f219e7b20ce8d4e12c1174abe43eca794543cd Mon Sep 17 00:00:00 2001 From: Johannes Gallmann Date: Wed, 31 May 2023 14:00:16 +0200 Subject: [PATCH] Fix carrier name animation during qqs expand The bug is a result of two recent changes: ag/20943168 and ag/22645423. The fix is very simple and sets the startPadding of the carrier group to the max width of the clock (when fully scaled) no matter the actual scale of the clock. As a result, the carrier group will never overlap the clock and it will also not move during the qqs expand animation. Since the collapsed state of the combined_qs_header is only there for animation purposes (as far as I understand) and is always faded out when collapsed, this change should not have any negative effects. Bug: 280016031 Test: atest ShadeHeaderControllerTest, Manual, i.e. testing the qqs expand and collapse animation with no carrier, one carrier, multiple carriers and rtl. Change-Id: Ie4745bd466fb1a24dcd47d6f85c545764d6c8662 --- packages/SystemUI/res/values/dimens.xml | 1 + packages/SystemUI/res/xml/qs_header.xml | 4 ++-- .../systemui/shade/ShadeHeaderController.kt | 14 +++++++++-- .../shade/ShadeHeaderControllerTest.kt | 24 ++++++++++--------- 4 files changed, 28 insertions(+), 15 deletions(-) diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 8d3ba364da06d..4f768cc39b407 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -572,6 +572,7 @@ 16dp 16dp 24dp + 2.57