changeset 2:de6a63e771dc

Code cleanup
author IBBoard <dev@ibboard.co.uk>
date Mon, 29 Oct 2012 11:59:17 +0000
parents 7bcf9621a373
children 1c0184311e64
files src/uk/co/ibboard/acetorch/AceTorchActivity.java
diffstat 1 files changed, 2 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/uk/co/ibboard/acetorch/AceTorchActivity.java	Mon Oct 29 11:38:59 2012 +0000
+++ b/src/uk/co/ibboard/acetorch/AceTorchActivity.java	Mon Oct 29 11:59:17 2012 +0000
@@ -44,8 +44,8 @@
 	//  2) Sham's post (http://stackoverflow.com/a/10253946/283242 - auto-focus just after start preview)
 	//  3) A reasonable amount of trial and error
 	private void enableLight() {
-
 		initCamera();
+		
 		if (_camera == null) {
 
 			Toast.makeText(this, "Unable to get camera", Toast.LENGTH_LONG);
@@ -61,11 +61,7 @@
 		
 		_camera.startPreview();
 
-		_camera.autoFocus(null/*new AutoFocusCallback() {
-			public void onAutoFocus(boolean success, Camera camera) {
-				// Do nothing, just be a handler
-			}
-		}*/);
+		_camera.autoFocus(null);
 
 		params = _camera.getParameters();
 		params.setFlashMode(Parameters.FLASH_MODE_OFF);