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

Commit dfc1ae8c authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "MediaRecorder: Add pause interface"

parents 81c59f30 145e7856
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -741,6 +741,10 @@ public class MediaRecorder
     */
    public native void start() throws IllegalStateException;

    /** @hide
    */
    public native void pause() throws IllegalStateException;

    /**
     * Stops recording. Call this after start(). Once recording is stopped,
     * you will have to configure it again as if it has just been constructed.
+9 −0
Original line number Diff line number Diff line
@@ -352,6 +352,14 @@ android_media_MediaRecorder_start(JNIEnv *env, jobject thiz)
    process_media_recorder_call(env, mr->start(), "java/lang/RuntimeException", "start failed.");
}

static void
android_media_MediaRecorder_pause(JNIEnv *env, jobject thiz)
{
    ALOGV("pause");
    sp<MediaRecorder> mr = getMediaRecorder(env, thiz);
    process_media_recorder_call(env, mr->pause(), "java/lang/RuntimeException", "pause failed.");
}

static void
android_media_MediaRecorder_stop(JNIEnv *env, jobject thiz)
{
@@ -472,6 +480,7 @@ static JNINativeMethod gMethods[] = {
    {"_prepare",             "()V",                             (void *)android_media_MediaRecorder_prepare},
    {"getMaxAmplitude",      "()I",                             (void *)android_media_MediaRecorder_native_getMaxAmplitude},
    {"start",                "()V",                             (void *)android_media_MediaRecorder_start},
    {"pause",                "()V",                             (void *)android_media_MediaRecorder_pause},
    {"stop",                 "()V",                             (void *)android_media_MediaRecorder_stop},
    {"native_reset",         "()V",                             (void *)android_media_MediaRecorder_native_reset},
    {"release",              "()V",                             (void *)android_media_MediaRecorder_release},