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

Commit 3d73e7aa authored by Mario Bertschler's avatar Mario Bertschler
Browse files

Check in FocusLogic that focused view fits into the matrix created for

cell-layout. Temporarily there can be a mismatch.

Bug: 73346286
Change-Id: Id014332d585c73b2be92da1f24db82484f103de4
parent 46d259d9
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -177,7 +177,10 @@ public class FocusLogic {
            }
            int cx = ((CellLayout.LayoutParams) cell.getLayoutParams()).cellX;
            int cy = ((CellLayout.LayoutParams) cell.getLayoutParams()).cellY;
            matrix[invert ? (m - cx - 1) : cx][cy] = i;
            int x = invert ? (m - cx - 1) : cx;
            if (x < m && cy < n) { // check if view fits into matrix, else skip
                matrix[x][cy] = i;
            }
        }
        if (DEBUG) {
            printMatrix(matrix);