mirror of
https://github.com/zxing/zxing.git
synced 2024-11-09 20:44:03 -08:00
More minor javadoc, code tweaks
git-svn-id: https://zxing.googlecode.com/svn/trunk@189 59b500cc-1b3d-0410-9834-0bbf25fbcc57
This commit is contained in:
parent
739192b101
commit
3f3c2fd7e5
|
@ -16,11 +16,6 @@
|
|||
|
||||
package com.google.zxing.client.android;
|
||||
|
||||
import com.google.zxing.Result;
|
||||
import com.google.zxing.ResultPoint;
|
||||
import com.google.zxing.client.result.ParsedReaderResult;
|
||||
import com.google.zxing.client.result.ParsedReaderResultType;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.content.Context;
|
||||
import android.graphics.PixelFormat;
|
||||
|
@ -31,7 +26,18 @@ import android.view.KeyEvent;
|
|||
import android.view.Menu;
|
||||
import android.view.Window;
|
||||
import android.view.WindowManager.LayoutParams;
|
||||
import com.google.zxing.Result;
|
||||
import com.google.zxing.ResultPoint;
|
||||
import com.google.zxing.client.result.ParsedReaderResult;
|
||||
import com.google.zxing.client.result.ParsedReaderResultType;
|
||||
|
||||
/**
|
||||
* The barcode reader activity itself. This is loosely based on the CameraPreview
|
||||
* example included in the Android SDK.
|
||||
*
|
||||
* @author dswitkin@google.com (Daniel Switkin)
|
||||
* @author Android Team (for CameraPreview example)
|
||||
*/
|
||||
public final class BarcodeReaderCaptureActivity extends Activity {
|
||||
|
||||
private CameraManager cameraManager;
|
||||
|
|
|
@ -27,6 +27,9 @@ import android.graphics.Rect;
|
|||
import android.view.SurfaceHolder;
|
||||
import android.view.SurfaceView;
|
||||
|
||||
/**
|
||||
* @author dswitkin@google.com (Daniel Switkin)
|
||||
*/
|
||||
final class CameraSurfaceView extends SurfaceView implements SurfaceHolder.Callback {
|
||||
|
||||
private static int[] SCANNER_ALPHA = { 0, 64, 128, 192, 255, 192, 128, 64 };
|
||||
|
|
|
@ -16,17 +16,28 @@
|
|||
|
||||
package com.google.zxing.client.android;
|
||||
|
||||
import com.google.zxing.client.result.*;
|
||||
|
||||
import android.content.Intent;
|
||||
import android.net.ContentURI;
|
||||
import android.os.Handler;
|
||||
import android.os.Message;
|
||||
import android.provider.Contacts;
|
||||
import com.google.zxing.client.result.AddressBookDoCoMoResult;
|
||||
import com.google.zxing.client.result.BookmarkDoCoMoResult;
|
||||
import com.google.zxing.client.result.EmailAddressResult;
|
||||
import com.google.zxing.client.result.EmailDoCoMoResult;
|
||||
import com.google.zxing.client.result.ParsedReaderResult;
|
||||
import com.google.zxing.client.result.ParsedReaderResultType;
|
||||
import com.google.zxing.client.result.UPCParsedResult;
|
||||
import com.google.zxing.client.result.URIParsedResult;
|
||||
|
||||
import java.net.URISyntaxException;
|
||||
|
||||
/**
|
||||
* Handles the result of barcode decoding in the context of the Android platform,
|
||||
* by dispatching the proper intents and so on.
|
||||
*
|
||||
* @author srowen@google.com (Sean Owen)
|
||||
* @author dswitkin@google.com (Daniel Switkin)
|
||||
*/
|
||||
final class ResultHandler extends Handler {
|
||||
|
||||
|
|
|
@ -103,8 +103,8 @@ public abstract class AbstractBlackBoxTestCase extends TestCase {
|
|||
private static String readFileAsString(File file) throws IOException {
|
||||
StringBuilder result = new StringBuilder();
|
||||
InputStreamReader reader = new InputStreamReader(new FileInputStream(file), "UTF-8");
|
||||
char[] buffer = new char[512];
|
||||
try {
|
||||
char[] buffer = new char[256];
|
||||
int charsRead;
|
||||
while ((charsRead = reader.read(buffer)) > 0) {
|
||||
result.append(buffer, 0, charsRead);
|
||||
|
|
Loading…
Reference in a new issue