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

Commit 85f9efa7 authored by Tracy Zhou's avatar Tracy Zhou
Browse files

Infinite loop when migrating calendar widget

Second page can take y = 0

Fixes: 161201598
Test: manual
Change-Id: I6654db5c2c358dfb132268218dd044674e302e83
parent 88e9c5dc
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -406,7 +406,7 @@ public class GridSizeMigrationTaskV2 {
         * to speed up the search.
         */
        private boolean findPlacement(DbEntry entry) {
            for (int y = mNextStartY; y > 0; y--) {
            for (int y = mNextStartY; y >= (mScreenId == 0 ? 1 /* smartspace */ : 0); y--) {
                for (int x = mNextStartX; x < mTrgX; x++) {
                    boolean fits = mOccupied.isRegionVacant(x, y, entry.spanX, entry.spanY);
                    boolean minFits = mOccupied.isRegionVacant(x, y, entry.minSpanX,