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

Commit 14311e33 authored by Wysie's avatar Wysie
Browse files

Changed the onMeasure method to follow that of DragLock, as per _avatar's...

Changed the onMeasure method to follow that of DragLock, as per _avatar's suggestion. This fixes the bug of the dots in PIN lock getting cut off when using a custom message.
parent bf590d34
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -348,6 +348,7 @@ public class PinLock extends View implements LockPattern {
    }

    protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
        /*
        final WindowManager wm = (WindowManager) getContext()
                .getSystemService(Context.WINDOW_SERVICE);
        final int width = wm.getDefaultDisplay().getWidth();
@@ -358,7 +359,11 @@ public class PinLock extends View implements LockPattern {
        if (width > height) {
            squareSide -= STATUS_BAR_HEIGHT;
        }
        */
        
        final int width = MeasureSpec.getSize(widthMeasureSpec);
        final int height = MeasureSpec.getSize(heightMeasureSpec);
        final int squareSide = Math.min(width, height);
        setMeasuredDimension(squareSide, squareSide);
    }