Revert "Revert "Remove CameraDataCallback.""
This reverts commit ae20e768aad08893f566260f814e0fa3e9f68801.
Change-Id: I0832bb75267d21b77eeb09604b0f026ec0fced2b
Signed-off-by: Alexander Martinz <amartinz@shiftphones.com>
diff --git a/src/com/android/camera/AndroidCameraManagerImpl.java b/src/com/android/camera/AndroidCameraManagerImpl.java
index ca4eba6..45eb429 100644
--- a/src/com/android/camera/AndroidCameraManagerImpl.java
+++ b/src/com/android/camera/AndroidCameraManagerImpl.java
@@ -22,8 +22,6 @@
import android.hardware.Camera;
import android.hardware.Camera.AutoFocusCallback;
import android.hardware.Camera.AutoFocusMoveCallback;
-import android.hardware.Camera.CameraDataCallback;
-import android.hardware.Camera.CameraMetaDataCallback;
import android.hardware.Camera.ErrorCallback;
import android.hardware.Camera.FaceDetectionListener;
import android.hardware.Camera.OnZoomChangeListener;
@@ -98,12 +96,10 @@
private static final int ENABLE_SHUTTER_SOUND = 501;
private static final int SET_DISPLAY_ORIENTATION = 502;
// Histogram
- private static final int SET_HISTOGRAM_MODE = 601;
private static final int SEND_HISTOGRAM_DATA = 602;
//LONGSHOT
private static final int SET_LONGSHOT = 701;
private static final int STOP_LONGSHOT = 702;
- private static final int SET_AUTO_HDR_MODE = 801;
//HAL1 version code
private static final int CAMERA_HAL_API_VERSION_1_0 = 0x100;
@@ -414,10 +410,6 @@
mParametersIsDirty = true;
return;
- case SET_HISTOGRAM_MODE:
- CameraWrapper.setHistogramMode(mCamera, (CameraDataCallback) msg.obj);
- break;
-
case SEND_HISTOGRAM_DATA:
CameraWrapper.sendHistogramData(mCamera);
break;
@@ -430,10 +422,6 @@
CameraWrapper.stopLongshot(mCamera);
break;
- case SET_AUTO_HDR_MODE:
- CameraWrapper.setMetadataCb(mCamera, (CameraMetaDataCallback) msg.obj);
- break;
-
default:
throw new RuntimeException("Invalid CameraProxy message=" + msg.what);
}
@@ -532,11 +520,6 @@
}
@Override
- public void setMetadataCb(CameraMetaDataCallback cb){
- mCameraHandler.obtainMessage(SET_AUTO_HDR_MODE, cb).sendToTarget();
- }
-
- @Override
public void setPreviewTexture(SurfaceTexture surfaceTexture) {
mCameraHandler.obtainMessage(SET_PREVIEW_TEXTURE_ASYNC, surfaceTexture).sendToTarget();
}
@@ -696,10 +679,6 @@
}
@Override
- public void setHistogramMode(CameraDataCallback cb) {
- mCameraHandler.obtainMessage(SET_HISTOGRAM_MODE, cb).sendToTarget();
- }
- @Override
public void sendHistogramData() {
mCameraHandler.sendEmptyMessage(SEND_HISTOGRAM_DATA);
}
diff --git a/src/com/android/camera/CameraManager.java b/src/com/android/camera/CameraManager.java
index a636d4e..1515f38 100644
--- a/src/com/android/camera/CameraManager.java
+++ b/src/com/android/camera/CameraManager.java
@@ -19,8 +19,6 @@
import android.annotation.TargetApi;
import android.graphics.SurfaceTexture;
import android.hardware.Camera;
-import android.hardware.Camera.CameraDataCallback;
-import android.hardware.Camera.CameraMetaDataCallback;
import android.hardware.Camera.ErrorCallback;
import android.hardware.Camera.OnZoomChangeListener;
import android.hardware.Camera.Parameters;
@@ -175,12 +173,6 @@
public void release();
/**
- * Sets the metadata cb
- * @cb Metadata callback object
- */
- public void setMetadataCb (CameraMetaDataCallback cb);
-
- /**
* Reconnects to the camera device.
* @see android.hardware.Camera#reconnect()
*
@@ -367,12 +359,6 @@
*/
public void enableShutterSound(boolean enable);
/**
- * Set histogram Mode
- *
- * @param cb cameraDataCallback to use
- */
- public void setHistogramMode(CameraDataCallback cb);
- /**
* Send the Histogram Data.
*
*/
diff --git a/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java b/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java
index 8fc412f..e21c481 100644
--- a/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java
+++ b/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java
@@ -30,49 +30,12 @@
package org.codeaurora.snapcam.wrapper;
import android.hardware.Camera;
-import android.hardware.Camera.CameraDataCallback;
-import android.hardware.Camera.CameraMetaDataCallback;
import android.util.Log;
import java.lang.reflect.Method;
public class CameraWrapper extends Wrapper{
- private static Method method_setMetadataCb = null;
- public static final void setMetadataCb(Camera camera, CameraMetaDataCallback cb){
- if ( DEBUG ){
- Log.e(TAG, "" + Camera.class + " no setMetadataCb");
- return;
- }
- try{
- if ( method_setMetadataCb == null ){
- method_setMetadataCb = Camera.class.getMethod("setMetadataCb",
- android.hardware.Camera.CameraMetaDataCallback.class);
- }
- method_setMetadataCb.invoke(camera, cb);
- }catch (Exception exception){
- exception.printStackTrace();
- }
- }
-
-
- private static Method method_setHistogramMode = null;
- public static final void setHistogramMode(Camera camera, CameraDataCallback cb) {
- if ( DEBUG ){
- Log.e(TAG, "" + Camera.class + " no setHistogramMode");
- return;
- }
- try{
- if ( method_setHistogramMode == null ){
- method_setHistogramMode = Camera.class.getMethod("setHistogramMode",
- CameraDataCallback.class);
- }
- method_setHistogramMode.invoke(camera, cb);
- }catch (Exception exception){
- exception.printStackTrace();
- }
- }
-
private static Method method_sendHistogramData = null;
public static final void sendHistogramData(Camera camera){
if ( DEBUG ){