Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8efcb633 authored by Vijay Kumar Tumati's avatar Vijay Kumar Tumati Committed by Steve Kondik
Browse files

Camera: Longshot with Burst Functionality.

New Longshot stop command is sent after receiving all the required YUV
callbacks or releasing the shutter before reaching Max number.

Change-Id: I264d94cde624b5f2ead88236bdff8d6db41e12e6
parent ef193989
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2112,6 +2112,15 @@ public class Camera {
    }
    private native final void native_setLongshot(boolean enable);

    /** @hide
     * Stop longshot. Available only in ZSL.
     */
    public final void stopLongshot()
    {
        native_stopLongshot();
    }
    private native final void native_stopLongshot();

     /** @hide
     * Handles the Touch Co-ordinate.
     */
+21 −3
Original line number Diff line number Diff line
@@ -495,6 +495,21 @@ static void android_hardware_Camera_setLongshot(JNIEnv *env, jobject thiz, jbool
    }
}

static void android_hardware_Camera_stopLongshot(JNIEnv *env, jobject thiz)
{
    ALOGV("stopLongshot");
    JNICameraContext* context;
    status_t rc;
    sp<Camera> camera = get_native_camera(env, thiz, &context);
    if (camera == 0) return;

    rc = camera->sendCommand(CAMERA_CMD_STOP_LONGSHOT, 0, 0);

    if (rc != NO_ERROR) {
       jniThrowException(env, "java/lang/RuntimeException", "enabling longshot mode failed");
    }
}

static void android_hardware_Camera_sendHistogramData(JNIEnv *env, jobject thiz)
 {
   ALOGV("sendHistogramData" );
@@ -1120,6 +1135,9 @@ static JNINativeMethod camMethods[] = {
  { "native_setLongshot",
    "(Z)V",
     (void *)android_hardware_Camera_setLongshot },
  { "native_stopLongshot",
    "()V",
     (void *)android_hardware_Camera_stopLongshot },
  { "native_setParameters",
    "(Ljava/lang/String;)V",
    (void *)android_hardware_Camera_setParameters },