diff --git a/src/main/java/com/budiyev/android/codescanner/BarcodeUtils.java b/src/main/java/com/budiyev/android/codescanner/BarcodeUtils.java index 373eb9b..660bccd 100644 --- a/src/main/java/com/budiyev/android/codescanner/BarcodeUtils.java +++ b/src/main/java/com/budiyev/android/codescanner/BarcodeUtils.java @@ -121,8 +121,8 @@ public static Result decodeRgb(@NonNull final int[] pixels, final int width, fin Objects.requireNonNull(pixels); final MultiFormatReader reader = createReader(hints); try { - return Utils - .decodeLuminanceSource(reader, new RGBLuminanceSource(width, height, pixels)); + return Utils.decodeLuminanceSource(reader, + new RGBLuminanceSource(width, height, pixels)); } catch (final ReaderException e) { return null; } @@ -291,8 +291,8 @@ private static MultiFormatReader createReader(@Nullable final Map MAX_CHILD_COUNT) { throw new IllegalStateException("CodeScannerView can have zero or one child"); } @@ -222,7 +222,7 @@ protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec measureChildWithMargins(mAutoFocusButton, widthMeasureSpec, 0, heightMeasureSpec, 0); measureChildWithMargins(mFlashButton, widthMeasureSpec, 0, heightMeasureSpec, 0); if (childCount == MAX_CHILD_COUNT) { - Rect frameRect = mViewFinderView.getFrameRect(); + final Rect frameRect = mViewFinderView.getFrameRect(); measureChildWithMargins(getChildAt(HINT_VIEW_INDEX), widthMeasureSpec, 0, heightMeasureSpec, frameRect != null ? frameRect.getBottom() : 0); } @@ -233,7 +233,7 @@ protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec @Override protected void onLayout(final boolean changed, final int left, final int top, final int right, final int bottom) { - int childCount = getChildCount(); + final int childCount = getChildCount(); if (childCount > MAX_CHILD_COUNT) { throw new IllegalStateException("CodeScannerView can have zero or one child"); } @@ -687,19 +687,19 @@ interface SizeListener { public static class LayoutParams extends MarginLayoutParams { - public LayoutParams(@NonNull Context c, @Nullable AttributeSet attrs) { + public LayoutParams(@NonNull final Context c, @Nullable final AttributeSet attrs) { super(c, attrs); } - public LayoutParams(int width, int height) { + public LayoutParams(final int width, final int height) { super(width, height); } - public LayoutParams(@NonNull MarginLayoutParams source) { + public LayoutParams(@NonNull final MarginLayoutParams source) { super(source); } - public LayoutParams(@NonNull ViewGroup.LayoutParams source) { + public LayoutParams(@NonNull final ViewGroup.LayoutParams source) { super(source); } } diff --git a/src/main/java/com/budiyev/android/codescanner/ViewFinderView.java b/src/main/java/com/budiyev/android/codescanner/ViewFinderView.java index b40d0b0..2ad2c11 100644 --- a/src/main/java/com/budiyev/android/codescanner/ViewFinderView.java +++ b/src/main/java/com/budiyev/android/codescanner/ViewFinderView.java @@ -60,7 +60,7 @@ public ViewFinderView(@NonNull final Context context) { } @Override - protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) { + protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec) { super.onMeasure(widthMeasureSpec, heightMeasureSpec); invalidateFrameRect(getMeasuredWidth(), getMeasuredHeight()); }