Merge "Merge "Build flag to API mapping files." into main am: 25783f370d am: 3458aab4cf am: 497dbe3b5e" into main
diff --git a/packages/SystemUI/communal/layout/Android.bp b/packages/SystemUI/communal/layout/Android.bp
deleted file mode 100644
index 88dad66..0000000
--- a/packages/SystemUI/communal/layout/Android.bp
+++ /dev/null
@@ -1,35 +0,0 @@
-// Copyright (C) 2023 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package {
- default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
-}
-
-android_library {
- name: "CommunalLayoutLib",
- srcs: [
- "src/**/*.kt",
- ],
- static_libs: [
- "androidx.arch.core_core-runtime",
- "androidx.compose.animation_animation-graphics",
- "androidx.compose.runtime_runtime",
- "androidx.compose.material3_material3",
- "jsr330",
- "kotlinx-coroutines-android",
- "kotlinx-coroutines-core",
- ],
- manifest: "AndroidManifest.xml",
- kotlincflags: ["-Xjvm-default=all"],
-}
diff --git a/packages/SystemUI/communal/layout/AndroidManifest.xml b/packages/SystemUI/communal/layout/AndroidManifest.xml
deleted file mode 100644
index 141be07..0000000
--- a/packages/SystemUI/communal/layout/AndroidManifest.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-
-<!-- Copyright (C) 2023 The Android Open Source Project
-
- Licensed under the Apache License, Version 2.0 (the "License");
- you may not use this file except in compliance with the License.
- You may obtain a copy of the License at
-
- http://www.apache.org/licenses/LICENSE-2.0
-
- Unless required by applicable law or agreed to in writing, software
- distributed under the License is distributed on an "AS IS" BASIS,
- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- See the License for the specific language governing permissions and
- limitations under the License.
--->
-
-<manifest package="com.android.systemui.communal.layout" />
diff --git a/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/CommunalLayoutEngine.kt b/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/CommunalLayoutEngine.kt
deleted file mode 100644
index 91fe33c..0000000
--- a/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/CommunalLayoutEngine.kt
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.communal.layout
-
-import com.android.systemui.communal.layout.ui.compose.config.CommunalGridLayoutCard
-
-/** Computes the arrangement of cards. */
-class CommunalLayoutEngine {
- companion object {
- /**
- * Determines the size that each card should be rendered in, and distributes the cards into
- * columns.
- *
- * Returns a nested list where the outer list contains columns, and the inner list contains
- * cards in each column.
- *
- * Currently treats the first supported size as the size to be rendered in, ignoring other
- * supported sizes.
- *
- * Cards are ordered by priority, from highest to lowest.
- */
- fun distributeCardsIntoColumns(
- cards: List<CommunalGridLayoutCard>,
- ): List<List<CommunalGridLayoutCardInfo>> {
- val result = ArrayList<ArrayList<CommunalGridLayoutCardInfo>>()
-
- var capacityOfLastColumn = 0
- val sorted = cards.sortedByDescending { it.priority }
- for (card in sorted) {
- val cardSize = card.supportedSizes.first()
- if (capacityOfLastColumn >= cardSize.value) {
- // Card fits in last column
- capacityOfLastColumn -= cardSize.value
- } else {
- // Create a new column
- result.add(arrayListOf())
- capacityOfLastColumn = CommunalGridLayoutCard.Size.FULL.value - cardSize.value
- }
-
- result.last().add(CommunalGridLayoutCardInfo(card, cardSize))
- }
-
- return result
- }
- }
-
- /**
- * A data class that wraps around a [CommunalGridLayoutCard] and also contains the size that the
- * card should be rendered in.
- */
- data class CommunalGridLayoutCardInfo(
- val card: CommunalGridLayoutCard,
- val size: CommunalGridLayoutCard.Size,
- )
-}
diff --git a/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/ui/compose/CommunalGridLayout.kt b/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/ui/compose/CommunalGridLayout.kt
deleted file mode 100644
index 33024f7..0000000
--- a/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/ui/compose/CommunalGridLayout.kt
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.communal.layout.ui.compose
-
-import android.util.SizeF
-import androidx.compose.foundation.layout.Arrangement
-import androidx.compose.foundation.layout.Column
-import androidx.compose.foundation.layout.Row
-import androidx.compose.foundation.layout.fillMaxSize
-import androidx.compose.foundation.layout.height
-import androidx.compose.foundation.layout.width
-import androidx.compose.foundation.lazy.LazyRow
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.Modifier
-import com.android.systemui.communal.layout.CommunalLayoutEngine
-import com.android.systemui.communal.layout.ui.compose.config.CommunalGridLayoutCard
-import com.android.systemui.communal.layout.ui.compose.config.CommunalGridLayoutConfig
-
-/**
- * An arrangement of cards with a horizontal scroll, where each card is displayed in the right size
- * and follows a specific order based on its priority, ensuring a seamless layout without any gaps.
- */
-@Composable
-fun CommunalGridLayout(
- modifier: Modifier,
- layoutConfig: CommunalGridLayoutConfig,
- communalCards: List<CommunalGridLayoutCard>,
-) {
- val columns = CommunalLayoutEngine.distributeCardsIntoColumns(communalCards)
- LazyRow(
- modifier = modifier.height(layoutConfig.gridHeight),
- horizontalArrangement = Arrangement.spacedBy(layoutConfig.gridGutter),
- ) {
- for (column in columns) {
- item {
- Column(
- modifier = Modifier.width(layoutConfig.cardWidth),
- verticalArrangement = Arrangement.spacedBy(layoutConfig.gridGutter),
- ) {
- for (cardInfo in column) {
- Row(
- modifier = Modifier.height(layoutConfig.cardHeight(cardInfo.size)),
- ) {
- cardInfo.card.Content(
- modifier = Modifier.fillMaxSize(),
- size =
- SizeF(
- layoutConfig.cardWidth.value,
- layoutConfig.cardHeight(cardInfo.size).value,
- ),
- )
- }
- }
- }
- }
- }
- }
-}
diff --git a/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/ui/compose/config/CommunalGridLayoutCard.kt b/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/ui/compose/config/CommunalGridLayoutCard.kt
deleted file mode 100644
index 4b2a156..0000000
--- a/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/ui/compose/config/CommunalGridLayoutCard.kt
+++ /dev/null
@@ -1,68 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.communal.layout.ui.compose.config
-
-import android.util.SizeF
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.Modifier
-
-/** A card that hosts content to be rendered in the communal grid layout. */
-abstract class CommunalGridLayoutCard {
- /**
- * Content to be hosted by the card.
- *
- * To host non-Compose views, see
- * https://developer.android.com/jetpack/compose/migrate/interoperability-apis/views-in-compose.
- *
- * @param size The size given to the card. Content of the card should fill all this space, given
- * that margins and paddings have been taken care of by the layout.
- */
- @Composable abstract fun Content(modifier: Modifier, size: SizeF)
-
- /**
- * Sizes supported by the card.
- *
- * If multiple sizes are available, they should be ranked in order of preference, from most to
- * least preferred.
- */
- abstract val supportedSizes: List<Size>
-
- /**
- * Priority of the content hosted by the card.
- *
- * The value of priority is relative to other cards. Cards with a higher priority are generally
- * ordered first.
- */
- open val priority: Int = 0
-
- /**
- * Size of the card.
- *
- * @param value A numeric value that represents the size. Must be less than or equal to
- * [Size.FULL].
- */
- enum class Size(val value: Int) {
- /** The card takes up full height of the grid layout. */
- FULL(value = 6),
-
- /** The card takes up half of the vertical space of the grid layout. */
- HALF(value = 3),
-
- /** The card takes up a third of the vertical space of the grid layout. */
- THIRD(value = 2),
- }
-}
diff --git a/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/ui/compose/config/CommunalGridLayoutConfig.kt b/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/ui/compose/config/CommunalGridLayoutConfig.kt
deleted file mode 100644
index 143df83..0000000
--- a/packages/SystemUI/communal/layout/src/com/android/systemui/communal/layout/ui/compose/config/CommunalGridLayoutConfig.kt
+++ /dev/null
@@ -1,82 +0,0 @@
-/*
- * Copyright (C) 2023 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package com.android.systemui.communal.layout.ui.compose.config
-
-import androidx.compose.ui.unit.Dp
-import androidx.compose.ui.unit.times
-
-/**
- * Configurations of the communal grid layout.
- *
- * The communal grid layout follows Material Design's responsive layout grid (see
- * https://m2.material.io/design/layout/responsive-layout-grid.html), in which the layout is divided
- * up by columns and gutters, and each card occupies one or multiple columns.
- */
-data class CommunalGridLayoutConfig(
- /**
- * Size in dp of each grid column.
- *
- * Every card occupies one or more grid columns, which means that the width of each card is
- * influenced by the size of the grid columns.
- */
- val gridColumnSize: Dp,
-
- /**
- * Size in dp of each grid gutter.
- *
- * A gutter is the space between columns that helps separate content. This is, therefore, also
- * the size of the gaps between cards, both horizontally and vertically.
- */
- val gridGutter: Dp,
-
- /**
- * Height in dp of the grid layout.
- *
- * Cards with a full size take up the entire height of the grid layout.
- */
- val gridHeight: Dp,
-
- /**
- * Number of grid columns that each card occupies.
- *
- * It's important to note that all the cards take up the same number of grid columns, or in
- * simpler terms, they all have the same width.
- */
- val gridColumnsPerCard: Int,
-) {
- /**
- * Width in dp of each card.
- *
- * It's important to note that all the cards take up the same number of grid columns, or in
- * simpler terms, they all have the same width.
- */
- val cardWidth = gridColumnSize * gridColumnsPerCard + gridGutter * (gridColumnsPerCard - 1)
-
- /** Returns the height of a card in dp, based on its size. */
- fun cardHeight(cardSize: CommunalGridLayoutCard.Size): Dp {
- return when (cardSize) {
- CommunalGridLayoutCard.Size.FULL -> cardHeightBy(denominator = 1)
- CommunalGridLayoutCard.Size.HALF -> cardHeightBy(denominator = 2)
- CommunalGridLayoutCard.Size.THIRD -> cardHeightBy(denominator = 3)
- }
- }
-
- /** Returns the height of a card in dp when the layout is evenly divided by [denominator]. */
- private fun cardHeightBy(denominator: Int): Dp {
- return (gridHeight - (denominator - 1) * gridGutter) / denominator
- }
-}
diff --git a/packages/SystemUI/communal/layout/tests/Android.bp b/packages/SystemUI/communal/layout/tests/Android.bp
deleted file mode 100644
index 9a05504..0000000
--- a/packages/SystemUI/communal/layout/tests/Android.bp
+++ /dev/null
@@ -1,47 +0,0 @@
-// Copyright (C) 2023 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-// http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-
-package {
- default_applicable_licenses: ["frameworks_base_packages_SystemUI_license"],
-}
-
-android_test {
- name: "CommunalLayoutLibTests",
- srcs: [
- "**/*.kt",
- ],
- static_libs: [
- "CommunalLayoutLib",
- "androidx.test.runner",
- "androidx.test.rules",
- "androidx.test.ext.junit",
- "frameworks-base-testutils",
- "junit",
- "kotlinx_coroutines_test",
- "mockito-target-extended-minus-junit4",
- "platform-test-annotations",
- "testables",
- "truth",
- ],
- libs: [
- "android.test.mock",
- "android.test.base",
- "android.test.runner",
- ],
- jni_libs: [
- "libdexmakerjvmtiagent",
- "libstaticjvmtiagent",
- ],
- manifest: "AndroidManifest.xml",
-}
diff --git a/packages/SystemUI/communal/layout/tests/AndroidManifest.xml b/packages/SystemUI/communal/layout/tests/AndroidManifest.xml
deleted file mode 100644
index b19007c..0000000
--- a/packages/SystemUI/communal/layout/tests/AndroidManifest.xml
+++ /dev/null
@@ -1,16 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<manifest
- xmlns:android="http://schemas.android.com/apk/res/android"
- package="com.android.systemui.communal.layout.tests">
-
- <application android:debuggable="true" android:largeHeap="true">
- <uses-library android:name="android.test.mock" />
- <uses-library android:name="android.test.runner" />
- </application>
-
- <instrumentation android:name="android.testing.TestableInstrumentation"
- android:targetPackage="com.android.systemui.communal.layout.tests"
- android:label="Tests for CommunalLayoutLib">
- </instrumentation>
-
-</manifest>
diff --git a/packages/SystemUI/communal/layout/tests/AndroidTest.xml b/packages/SystemUI/communal/layout/tests/AndroidTest.xml
deleted file mode 100644
index 1352b23..0000000
--- a/packages/SystemUI/communal/layout/tests/AndroidTest.xml
+++ /dev/null
@@ -1,20 +0,0 @@
-<?xml version="1.0" encoding="utf-8"?>
-<configuration description="Runs tests for CommunalLayoutLib">
-
- <target_preparer class="com.android.tradefed.targetprep.suite.SuiteApkInstaller">
- <option name="cleanup-apks" value="true" />
- <option name="install-arg" value="-t" />
- <option name="test-file-name" value="CommunalLayoutLibTests.apk" />
- </target_preparer>
-
- <option name="test-suite-tag" value="apct" />
- <option name="test-suite-tag" value="framework-base-presubmit" />
- <option name="test-tag" value="CommunalLayoutLibTests" />
-
- <test class="com.android.tradefed.testtype.AndroidJUnitTest" >
- <option name="package" value="com.android.systemui.communal.layout.tests" />
- <option name="runner" value="android.testing.TestableInstrumentation" />
- <option name="hidden-api-checks" value="false"/>
- </test>
-
-</configuration>
diff --git a/packages/SystemUI/communal/layout/tests/src/com/android/systemui/communal/layout/CommunalLayoutEngineTest.kt b/packages/SystemUI/communal/layout/tests/src/com/android/systemui/communal/layout/CommunalLayoutEngineTest.kt
deleted file mode 100644
index 50b7c5f..0000000
--- a/packages/SystemUI/communal/layout/tests/src/com/android/systemui/communal/layout/CommunalLayoutEngineTest.kt
+++ /dev/null
@@ -1,145 +0,0 @@
-package com.android.systemui.communal.layout
-
-import android.util.SizeF
-import androidx.compose.material3.Card
-import androidx.compose.runtime.Composable
-import androidx.compose.ui.Modifier
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.SmallTest
-import com.android.systemui.communal.layout.ui.compose.config.CommunalGridLayoutCard
-import com.google.common.truth.Truth.assertThat
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@SmallTest
-@RunWith(AndroidJUnit4::class)
-class CommunalLayoutEngineTest {
- @Test
- fun distribution_fullLayout() {
- val cards =
- listOf(
- generateCard(CommunalGridLayoutCard.Size.FULL),
- generateCard(CommunalGridLayoutCard.Size.HALF),
- generateCard(CommunalGridLayoutCard.Size.HALF),
- generateCard(CommunalGridLayoutCard.Size.THIRD),
- generateCard(CommunalGridLayoutCard.Size.THIRD),
- generateCard(CommunalGridLayoutCard.Size.THIRD),
- )
- val expected =
- listOf(
- listOf(
- CommunalGridLayoutCard.Size.FULL,
- ),
- listOf(
- CommunalGridLayoutCard.Size.HALF,
- CommunalGridLayoutCard.Size.HALF,
- ),
- listOf(
- CommunalGridLayoutCard.Size.THIRD,
- CommunalGridLayoutCard.Size.THIRD,
- CommunalGridLayoutCard.Size.THIRD,
- ),
- )
-
- assertDistributionBySize(cards, expected)
- }
-
- @Test
- fun distribution_layoutWithGaps() {
- val cards =
- listOf(
- generateCard(CommunalGridLayoutCard.Size.HALF),
- generateCard(CommunalGridLayoutCard.Size.THIRD),
- generateCard(CommunalGridLayoutCard.Size.HALF),
- generateCard(CommunalGridLayoutCard.Size.FULL),
- generateCard(CommunalGridLayoutCard.Size.THIRD),
- )
- val expected =
- listOf(
- listOf(
- CommunalGridLayoutCard.Size.HALF,
- CommunalGridLayoutCard.Size.THIRD,
- ),
- listOf(
- CommunalGridLayoutCard.Size.HALF,
- ),
- listOf(
- CommunalGridLayoutCard.Size.FULL,
- ),
- listOf(
- CommunalGridLayoutCard.Size.THIRD,
- ),
- )
-
- assertDistributionBySize(cards, expected)
- }
-
- @Test
- fun distribution_sortByPriority() {
- val cards =
- listOf(
- generateCard(priority = 2),
- generateCard(priority = 7),
- generateCard(priority = 10),
- generateCard(priority = 1),
- generateCard(priority = 5),
- )
- val expected =
- listOf(
- listOf(10, 7),
- listOf(5, 2),
- listOf(1),
- )
-
- assertDistributionByPriority(cards, expected)
- }
-
- private fun assertDistributionBySize(
- cards: List<CommunalGridLayoutCard>,
- expected: List<List<CommunalGridLayoutCard.Size>>,
- ) {
- val result = CommunalLayoutEngine.distributeCardsIntoColumns(cards)
-
- for (c in expected.indices) {
- for (r in expected[c].indices) {
- assertThat(result[c][r].size).isEqualTo(expected[c][r])
- }
- }
- }
-
- private fun assertDistributionByPriority(
- cards: List<CommunalGridLayoutCard>,
- expected: List<List<Int>>,
- ) {
- val result = CommunalLayoutEngine.distributeCardsIntoColumns(cards)
-
- for (c in expected.indices) {
- for (r in expected[c].indices) {
- assertThat(result[c][r].card.priority).isEqualTo(expected[c][r])
- }
- }
- }
-
- private fun generateCard(size: CommunalGridLayoutCard.Size): CommunalGridLayoutCard {
- return object : CommunalGridLayoutCard() {
- override val supportedSizes = listOf(size)
-
- @Composable
- override fun Content(modifier: Modifier, size: SizeF) {
- Card(modifier = modifier, content = {})
- }
- }
- }
-
- private fun generateCard(priority: Int): CommunalGridLayoutCard {
- return object : CommunalGridLayoutCard() {
- override val supportedSizes = listOf(Size.HALF)
- override val priority = priority
-
- @Composable
- override fun Content(modifier: Modifier, size: SizeF) {
- Card(modifier = modifier, content = {})
- }
- }
- }
-}
diff --git a/packages/SystemUI/communal/layout/tests/src/com/android/systemui/communal/layout/ui/compose/config/CommunalGridLayoutConfigTest.kt b/packages/SystemUI/communal/layout/tests/src/com/android/systemui/communal/layout/ui/compose/config/CommunalGridLayoutConfigTest.kt
deleted file mode 100644
index 946eeec..0000000
--- a/packages/SystemUI/communal/layout/tests/src/com/android/systemui/communal/layout/ui/compose/config/CommunalGridLayoutConfigTest.kt
+++ /dev/null
@@ -1,63 +0,0 @@
-package com.android.systemui.communal.layout.ui.compose.config
-
-import androidx.compose.ui.unit.dp
-import androidx.test.ext.junit.runners.AndroidJUnit4
-import androidx.test.filters.SmallTest
-import com.google.common.truth.Truth
-import org.junit.Test
-import org.junit.runner.RunWith
-
-@SmallTest
-@RunWith(AndroidJUnit4::class)
-class CommunalGridLayoutConfigTest {
- @Test
- fun cardWidth() {
- Truth.assertThat(
- CommunalGridLayoutConfig(
- gridColumnSize = 5.dp,
- gridGutter = 3.dp,
- gridHeight = 17.dp,
- gridColumnsPerCard = 1,
- )
- .cardWidth
- )
- .isEqualTo(5.dp)
-
- Truth.assertThat(
- CommunalGridLayoutConfig(
- gridColumnSize = 5.dp,
- gridGutter = 3.dp,
- gridHeight = 17.dp,
- gridColumnsPerCard = 2,
- )
- .cardWidth
- )
- .isEqualTo(13.dp)
-
- Truth.assertThat(
- CommunalGridLayoutConfig(
- gridColumnSize = 5.dp,
- gridGutter = 3.dp,
- gridHeight = 17.dp,
- gridColumnsPerCard = 3,
- )
- .cardWidth
- )
- .isEqualTo(21.dp)
- }
-
- @Test
- fun cardHeight() {
- val config =
- CommunalGridLayoutConfig(
- gridColumnSize = 5.dp,
- gridGutter = 2.dp,
- gridHeight = 10.dp,
- gridColumnsPerCard = 3,
- )
-
- Truth.assertThat(config.cardHeight(CommunalGridLayoutCard.Size.FULL)).isEqualTo(10.dp)
- Truth.assertThat(config.cardHeight(CommunalGridLayoutCard.Size.HALF)).isEqualTo(4.dp)
- Truth.assertThat(config.cardHeight(CommunalGridLayoutCard.Size.THIRD)).isEqualTo(2.dp)
- }
-}
diff --git a/packages/SystemUI/compose/features/Android.bp b/packages/SystemUI/compose/features/Android.bp
index 16c2437..796abf4b 100644
--- a/packages/SystemUI/compose/features/Android.bp
+++ b/packages/SystemUI/compose/features/Android.bp
@@ -31,7 +31,6 @@
],
static_libs: [
- "CommunalLayoutLib",
"SystemUI-core",
"PlatformComposeCore",
"PlatformComposeSceneTransitionLayout",