Skip to content

Commit

Permalink
Dev
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy-budiyev committed May 19, 2022
1 parent 97e2410 commit a7d2002
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down Expand Up @@ -291,8 +291,8 @@ private static MultiFormatReader createReader(@Nullable final Map<DecodeHintType
if (hints != null) {
reader.setHints(hints);
} else {
reader.setHints(Collections
.singletonMap(DecodeHintType.POSSIBLE_FORMATS, CodeScanner.ALL_FORMATS));
reader.setHints(Collections.singletonMap(DecodeHintType.POSSIBLE_FORMATS,
CodeScanner.ALL_FORMATS));
}
return reader;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ private void initialize(@NonNull final Context context, @Nullable final Attribut

@Override
protected void onMeasure(final int widthMeasureSpec, final int heightMeasureSpec) {
int childCount = getChildCount();
final int childCount = getChildCount();
if (childCount > MAX_CHILD_COUNT) {
throw new IllegalStateException("CodeScannerView can have zero or one child");
}
Expand All @@ -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);
}
Expand All @@ -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");
}
Expand Down Expand Up @@ -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);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down

0 comments on commit a7d2002

Please sign in to comment.