Merge "Infinite loop when migrating calendar widget" into ub-launcher3-rvc-dev am: 8c46b20958 am: 011fa1bac1 am: 835b25d1dd

Original change: https://googleplex-android-review.googlesource.com/c/platform/packages/apps/Launcher3/+/12151323

Change-Id: I7cdb94a92668c239b442933c48a5b8c797cda088
This commit is contained in:
Tracy Zhou 2020-07-17 23:07:17 +00:00 committed by Automerger Merge Worker
commit c332b7dbff
1 changed files with 1 additions and 1 deletions

View File

@ -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,