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

Commit 8a180434 authored by Glenn Kasten's avatar Glenn Kasten Committed by Android (Google) Code Review
Browse files

Merge "new can't fail on Android"

parents 1e821372 1adb715b
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()) {