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

Commit 2583a8f4 authored by Lucas Silva's avatar Lucas Silva
Browse files

Handle invalid values in ResizeableItemFrameViewModel

If the maxSpans is less than the currentSpans, the anchors are
calculated incorrectly which leads to a crash in SystemUI. This fix
ensures that we always coerce the max to be at least the current spans.

This can happen when Compose is initializing, and the padding values
haven't been finalized yet. In this intermediate state, we may receive
invalid values before the grid stabilizes.

Fixes: 376490959
Test: atest ResizeableItemFrameViewModelTest
Flag: com.android.systemui.communal_widget_resizing
Change-Id: Ic9b569fb1894b950882aeaeea5065c99c762dc74
parent 067c153f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment