public static Rect getExtraSquareFrame(int width, int height) {
    int squareSize = (int) (Math.min(width, height) * SQUARE_SIZE_PERCENT);
    int extraPadding = (int) (squareSize * EXTRA_PADDING_SQUARE_PERCENT);
    mSavedSquareFrame = new Rect(
        (width - squareSize) / 2 - extraPadding,
        (height - squareSize) / 2 - extraPadding,
        (width + squareSize) / 2 + extraPadding,
        (height + squareSize) / 2 + extraPadding);

    mCanvasWidth = width;
    mCanvasHeight = height;

    return mSavedSquareFrame;
  }
This function return the extra frame for the square which is drawn on the {@link
GraphicOverlay} as we actually have some padding between the scanner square bitmap. This frame
is used for drawing the actual scanner square bitmap.

@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