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

Commit 1adb715b authored by Glenn Kasten's avatar Glenn Kasten
Browse files

new can't fail on Android

Change-Id: I0e048d3d8ba1ec34d13684b9fd898035d3381db8
parent 3251d363
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -224,10 +224,6 @@ android_media_AudioRecord_setup(JNIEnv *env, jobject thiz, jobject weak_this,

    // create an uninitialized AudioRecord object
    sp<AudioRecord> lpRecorder = new AudioRecord();
    if (lpRecorder == NULL) {
        ALOGE("Error creating AudioRecord instance.");
        return AUDIORECORD_ERROR_SETUP_NATIVEINITFAILED;
    }

    // create the callback information:
    // this data will be passed with every AudioRecord callback
+0 −4
Original line number Diff line number Diff line
@@ -295,10 +295,6 @@ android_media_AudioTrack_native_setup(JNIEnv *env, jobject thiz, jobject weak_th

    // create the native AudioTrack object
    sp<AudioTrack> lpTrack = new AudioTrack();
    if (lpTrack == NULL) {
        ALOGE("Error creating uninitialized AudioTrack");
        return AUDIOTRACK_ERROR_SETUP_NATIVEINITFAILED;
    }

    // initialize the callback information:
    // this data will be passed with every AudioTrack callback
+0 −5
Original line number Diff line number Diff line
@@ -93,11 +93,6 @@ static void android_media_ToneGenerator_native_setup(JNIEnv *env, jobject thiz,

    ALOGV("android_media_ToneGenerator_native_setup jobject: %x", (int)thiz);

    if (lpToneGen == NULL) {
        ALOGE("ToneGenerator creation failed");
        jniThrowException(env, "java/lang/OutOfMemoryError", NULL);
        return;
    }
    ALOGV("ToneGenerator lpToneGen: %x", (unsigned int)lpToneGen);

    if (!lpToneGen->isInited()) {