From e5f9a95ae2a1f6a58c7999bd25f4bbf34267544d Mon Sep 17 00:00:00 2001 From: Darrell Shi Date: Wed, 23 Nov 2022 17:18:37 +0000 Subject: [PATCH] Constraint smartspace width. This change adds a new attribute in the complication layout params to allow constraint on width or height, depending on its direction. Smartspace is added a constraint width so not to overflow. Bug: 258455314 Fix: 258455314 Test: atest ComplicationEngineTest Test: atest ComplicationLayoutParamsTest Test: on device create a meeting with a long title and see that smartspace does not overflow Change-Id: Ie5a1278810ac77a8aa3f0046970642919c46f7ed --- packages/SystemUI/res/values/dimens.xml | 1 + .../ComplicationLayoutEngine.java | 13 ++ .../ComplicationLayoutParams.java | 54 +++++++- .../dagger/RegisteredComplicationsModule.java | 6 +- .../ComplicationLayoutEngineTest.java | 127 ++++++++++++++++++ .../ComplicationLayoutParamsTest.java | 31 ++++- 6 files changed, 225 insertions(+), 7 deletions(-) diff --git a/packages/SystemUI/res/values/dimens.xml b/packages/SystemUI/res/values/dimens.xml index 738981db68232..89cc56d828363 100644 --- a/packages/SystemUI/res/values/dimens.xml +++ b/packages/SystemUI/res/values/dimens.xml @@ -1507,6 +1507,7 @@ 28dp 2dp 24dp + 408dp