summaryrefslogtreecommitdiffstats
path: root/src_wrapper
diff options
context:
space:
mode:
authorChippa-a <vusal1372@gmail.com>2019-10-09 00:31:36 +0300
committerChippa-a <vusal1372@gmail.com>2019-10-25 15:55:20 +0300
commitae20e768aad08893f566260f814e0fa3e9f68801 (patch)
treeebba18d7634e1cbdc1b94ee5dd8cfbdac8a809e6 /src_wrapper
parentadf5d41ce1b6a0d69b7b0a1ef2b22e9d2a35deb3 (diff)
downloadandroid_packages_apps_Snap-ae20e768aad08893f566260f814e0fa3e9f68801.zip
android_packages_apps_Snap-ae20e768aad08893f566260f814e0fa3e9f68801.tar.gz
android_packages_apps_Snap-ae20e768aad08893f566260f814e0fa3e9f68801.tar.bz2
Revert "Remove CameraDataCallback."
This reverts commit e7c3825c2ef5fca2ed70d753ea32f2c042a3fa50. Change-Id: Id18176046c657ea084eaec3ab3c1f0e51aeb12f0
Diffstat (limited to 'src_wrapper')
-rw-r--r--[-rwxr-xr-x]src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java36
1 files changed, 36 insertions, 0 deletions
diff --git a/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java b/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java
index 8078a38..6739686 100755..100644
--- a/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java
+++ b/src_wrapper/org/codeaurora/snapcam/wrapper/CameraWrapper.java
@@ -46,9 +46,45 @@ import android.hardware.Camera.ShutterCallback;
import android.util.Log;
import android.view.SurfaceHolder;
+import android.hardware.Camera.CameraMetaDataCallback;
+import android.hardware.Camera.CameraDataCallback;
+
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){