mirror of
https://github.com/zxing/zxing.git
synced 2025-03-05 20:48:51 -08:00
Touch up whitespace and other small issues from inspection
This commit is contained in:
parent
15b4dedb98
commit
6c2a9b016c
|
@ -308,7 +308,7 @@ public class IntentIntegrator {
|
||||||
}
|
}
|
||||||
intentScan.putExtra("SCAN_FORMATS", joinedByComma.toString());
|
intentScan.putExtra("SCAN_FORMATS", joinedByComma.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
// check requested camera ID
|
// check requested camera ID
|
||||||
if (cameraId >= 0) {
|
if (cameraId >= 0) {
|
||||||
intentScan.putExtra("SCAN_CAMERA_ID", cameraId);
|
intentScan.putExtra("SCAN_CAMERA_ID", cameraId);
|
||||||
|
|
|
@ -218,7 +218,7 @@ public final class CaptureActivity extends Activity implements SurfaceHolder.Cal
|
||||||
cameraManager.setManualFramingRect(width, height);
|
cameraManager.setManualFramingRect(width, height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (intent.hasExtra(Intents.Scan.CAMERA_ID)) {
|
if (intent.hasExtra(Intents.Scan.CAMERA_ID)) {
|
||||||
int cameraId = intent.getIntExtra(Intents.Scan.CAMERA_ID, -1);
|
int cameraId = intent.getIntExtra(Intents.Scan.CAMERA_ID, -1);
|
||||||
if (cameraId >= 0) {
|
if (cameraId >= 0) {
|
||||||
|
|
|
@ -80,7 +80,7 @@ public final class Intents {
|
||||||
* Example: "EAN_13,EAN_8,QR_CODE". This overrides {@link #MODE}.
|
* Example: "EAN_13,EAN_8,QR_CODE". This overrides {@link #MODE}.
|
||||||
*/
|
*/
|
||||||
public static final String FORMATS = "SCAN_FORMATS";
|
public static final String FORMATS = "SCAN_FORMATS";
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Optional parameter to specify the id of the camera from which to recognize barcodes.
|
* Optional parameter to specify the id of the camera from which to recognize barcodes.
|
||||||
* Overrides the default camera that would otherwise would have been selected.
|
* Overrides the default camera that would otherwise would have been selected.
|
||||||
|
|
|
@ -76,7 +76,7 @@ public final class CameraManager {
|
||||||
public synchronized void openDriver(SurfaceHolder holder) throws IOException {
|
public synchronized void openDriver(SurfaceHolder holder) throws IOException {
|
||||||
Camera theCamera = camera;
|
Camera theCamera = camera;
|
||||||
if (theCamera == null) {
|
if (theCamera == null) {
|
||||||
|
|
||||||
if (requestedCameraId >= 0) {
|
if (requestedCameraId >= 0) {
|
||||||
theCamera = OpenCameraInterface.open(requestedCameraId);
|
theCamera = OpenCameraInterface.open(requestedCameraId);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -40,9 +40,9 @@ public final class OpenCameraInterface {
|
||||||
Log.w(TAG, "No cameras!");
|
Log.w(TAG, "No cameras!");
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean explicitRequest = cameraId >= 0;
|
boolean explicitRequest = cameraId >= 0;
|
||||||
|
|
||||||
if (!explicitRequest) {
|
if (!explicitRequest) {
|
||||||
// Select a camera if no explicit camera requested
|
// Select a camera if no explicit camera requested
|
||||||
int index = 0;
|
int index = 0;
|
||||||
|
@ -57,7 +57,7 @@ public final class OpenCameraInterface {
|
||||||
|
|
||||||
cameraId = index;
|
cameraId = index;
|
||||||
}
|
}
|
||||||
|
|
||||||
Camera camera;
|
Camera camera;
|
||||||
if (cameraId < numCameras) {
|
if (cameraId < numCameras) {
|
||||||
Log.i(TAG, "Opening camera #" + cameraId);
|
Log.i(TAG, "Opening camera #" + cameraId);
|
||||||
|
|
|
@ -71,7 +71,7 @@ public class ResultPoint {
|
||||||
* Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC
|
* Orders an array of three ResultPoints in an order [A,B,C] such that AB is less than AC
|
||||||
* and BC is less than AC, and the angle between BC and BA is less than 180 degrees.
|
* and BC is less than AC, and the angle between BC and BA is less than 180 degrees.
|
||||||
*
|
*
|
||||||
* @param patterns array of three {@link ResultPoint} to order
|
* @param patterns array of three {@code ResultPoint} to order
|
||||||
*/
|
*/
|
||||||
public static void orderBestPatterns(ResultPoint[] patterns) {
|
public static void orderBestPatterns(ResultPoint[] patterns) {
|
||||||
|
|
||||||
|
|
|
@ -95,7 +95,7 @@ public enum CharacterSetECI {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param value character set ECI value
|
* @param value character set ECI value
|
||||||
* @return {@link CharacterSetECI} representing ECI of given value, or null if it is legal but
|
* @return {@code CharacterSetECI} representing ECI of given value, or null if it is legal but
|
||||||
* unsupported
|
* unsupported
|
||||||
* @throws FormatException if ECI value is invalid
|
* @throws FormatException if ECI value is invalid
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -16,8 +16,7 @@
|
||||||
|
|
||||||
package com.google.zxing.oned;
|
package com.google.zxing.oned;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import org.junit.Assert;
|
||||||
|
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -26,7 +25,7 @@ import com.google.zxing.Writer;
|
||||||
import com.google.zxing.WriterException;
|
import com.google.zxing.WriterException;
|
||||||
import com.google.zxing.common.BitMatrix;
|
import com.google.zxing.common.BitMatrix;
|
||||||
|
|
||||||
public class Code128WriterTestCase {
|
public class Code128WriterTestCase extends Assert {
|
||||||
|
|
||||||
private static final String FNC1 = "11110101110";
|
private static final String FNC1 = "11110101110";
|
||||||
private static final String FNC2 = "11110101000";
|
private static final String FNC2 = "11110101000";
|
||||||
|
@ -91,7 +90,7 @@ public class Code128WriterTestCase {
|
||||||
assertEquals(expected, actual);
|
assertEquals(expected, actual);
|
||||||
}
|
}
|
||||||
|
|
||||||
private String matrixToString(BitMatrix result) {
|
private static String matrixToString(BitMatrix result) {
|
||||||
StringBuilder builder = new StringBuilder(result.getWidth());
|
StringBuilder builder = new StringBuilder(result.getWidth());
|
||||||
for (int i = 0; i < result.getWidth(); i++) {
|
for (int i = 0; i < result.getWidth(); i++) {
|
||||||
builder.append(result.get(i, 0) ? '1' : '0');
|
builder.append(result.get(i, 0) ? '1' : '0');
|
||||||
|
|
|
@ -1,10 +1,9 @@
|
||||||
body{
|
body{
|
||||||
background-color:#404040;
|
background: #404040 url("img/bg.png");
|
||||||
text-align:center;
|
text-align:center;
|
||||||
color:#FFF;
|
color:#FFF;
|
||||||
font-size: 20px;
|
font-size: 20px;
|
||||||
font-family: 'Droid Sans',sans-serif;
|
font-family: 'Droid Sans',sans-serif;
|
||||||
background-image:url("img/bg.png");
|
|
||||||
}
|
}
|
||||||
a img{
|
a img{
|
||||||
border:0;
|
border:0;
|
||||||
|
|
Loading…
Reference in a new issue