Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 81b1558a authored by Lucas Silva's avatar Lucas Silva
Browse files

Update communal db for responsive grid

In the responsive grid, we are updating the grid cells such that a
widget occupies a single cell instead of the 3 cells they do today. We
therefore add a new spanY field in the database which stores the new
height in responsive grid units.

Also noticed that we were not properly backing up the spanY field
before, so fixed that in this change also.

Bug: 378171351
Flag: com.android.systemui.communal_responsive_grid
Test: atest SystemUITests
Change-Id: I147e1ba5f7fa1c0ad2eaffcd02b11bfd062ab55d
parent c9b66b17
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -1203,6 +1203,13 @@ flag {
  }
}

flag {
  name: "communal_responsive_grid"
  namespace: "systemui"
  description: "Enables responsive grid on glanceable hub"
  bug: "378171351"
}

flag {
  name: "communal_standalone_support"
  namespace: "systemui"
+5 −4
Original line number Diff line number Diff line
@@ -24,6 +24,7 @@ import androidx.test.ext.junit.runners.AndroidJUnit4
import androidx.test.filters.SmallTest
import com.android.systemui.SysuiTestCase
import com.android.systemui.communal.data.db.DefaultWidgetPopulation.SkipReason.RESTORED_FROM_BACKUP
import com.android.systemui.communal.shared.model.SpanValue
import com.android.systemui.communal.widgets.CommunalWidgetHost
import com.android.systemui.kosmos.applicationCoroutineScope
import com.android.systemui.kosmos.testScope
@@ -117,7 +118,7 @@ class DefaultWidgetPopulationTest : SysuiTestCase() {
                    componentName = defaultWidgets[0],
                    rank = 0,
                    userSerialNumber = 0,
                    spanY = 3,
                    spanY = SpanValue.Fixed(3),
                )
            verify(communalWidgetDao)
                .addWidget(
@@ -125,7 +126,7 @@ class DefaultWidgetPopulationTest : SysuiTestCase() {
                    componentName = defaultWidgets[1],
                    rank = 1,
                    userSerialNumber = 0,
                    spanY = 3,
                    spanY = SpanValue.Fixed(3),
                )
            verify(communalWidgetDao)
                .addWidget(
@@ -133,7 +134,7 @@ class DefaultWidgetPopulationTest : SysuiTestCase() {
                    componentName = defaultWidgets[2],
                    rank = 2,
                    userSerialNumber = 0,
                    spanY = 3,
                    spanY = SpanValue.Fixed(3),
                )
        }

@@ -155,7 +156,7 @@ class DefaultWidgetPopulationTest : SysuiTestCase() {
                    componentName = any(),
                    rank = anyInt(),
                    userSerialNumber = anyInt(),
                    spanY = anyInt(),
                    spanY = any(),
                )
        }
}
Loading