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

Commit aba1f18b authored by Alexander Martinz's avatar Alexander Martinz Committed by Michael Bestas
Browse files

DeviceProfile: fix divide by zero



Change-Id: I8deeeb053a43bac0941950a0c25770b4cc565405
Signed-off-by: Alexander Martinz's avatarAlexander Martinz <amartinz@shiftphones.com>
parent 753d0e9d
Loading
Loading
Loading
Loading
+6 −0
Original line number Diff line number Diff line
@@ -526,9 +526,15 @@ public class DeviceProfile {
    }

    public static int calculateCellWidth(int width, int countX) {
        if (countX == 0) {
            countX = 4;
        }
        return width / countX;
    }
    public static int calculateCellHeight(int height, int countY) {
        if (countY == 0) {
            countY = 5;
        }
        return height / countY;
    }