From 1f3a3e588bd1dbfcdfc870f78e90ef024280caf0 Mon Sep 17 00:00:00 2001 From: Caitlin Cassidy Date: Thu, 22 Apr 2021 14:56:41 +0000 Subject: [PATCH] [Ongoing Call Chip] UI tweaks: Don't have the chip width change each second, and hide the time if it's too large for the space available. Demo: b/185897063#comment2 Test: atest (including new OngoingCallChronometerTest) and manual Bug: 183229367 Fixes: 185897184, 185897063 Change-Id: I7fb129734cd1dc29f45e41e6e1775d44f1680d10 --- .../SystemUI/res/layout/ongoing_call_chip.xml | 7 +- .../ongoingcall/OngoingCallChronometer.kt | 87 ++++++++++ .../ongoingcall/OngoingCallChronometerTest.kt | 161 ++++++++++++++++++ 3 files changed, 251 insertions(+), 4 deletions(-) create mode 100644 packages/SystemUI/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallChronometer.kt create mode 100644 packages/SystemUI/tests/src/com/android/systemui/statusbar/phone/ongoingcall/OngoingCallChronometerTest.kt diff --git a/packages/SystemUI/res/layout/ongoing_call_chip.xml b/packages/SystemUI/res/layout/ongoing_call_chip.xml index a5e7f5d4cfe62..a146547d00839 100644 --- a/packages/SystemUI/res/layout/ongoing_call_chip.xml +++ b/packages/SystemUI/res/layout/ongoing_call_chip.xml @@ -29,18 +29,17 @@ android:src="@*android:drawable/ic_phone" android:layout_width="@dimen/ongoing_call_chip_icon_size" android:layout_height="@dimen/ongoing_call_chip_icon_size" - android:paddingEnd="@dimen/ongoing_call_chip_icon_text_padding" android:tint="?android:attr/colorPrimary" /> - -