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

Unverified Commit ebd37b03 authored by Vijay Kumar Tumati's avatar Vijay Kumar Tumati Committed by Michael Bestas
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 857c96bc
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -2141,6 +2141,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
@@ -501,6 +501,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" );
@@ -1162,6 +1177,9 @@ static const 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 },