public static Rect getSquareFrame(int width, int height) {
    int squareSize = (int) (Math.min(width, height) * SQUARE_SIZE_PERCENT);
    return new Rect(
        (width - squareSize) / 2,
        (height - squareSize) / 2,
        (width + squareSize) / 2,
        (height + squareSize) / 2);
  }
This function return the frame for the square which is drawn on the {@link GraphicOverlay} of
{@link BarcodeCaptureActivity}, which is used for drawing the dark border outside the square.

@param width the with of the canvas
@param height the height of the canvas
@return the frame for the square
java/com/google/android/apps/authenticator/barcode/BarcodeCentralFilter.java