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

Commit 05f95dca authored by Santiago Seifert's avatar Santiago Seifert
Browse files

Replace new with sp<>::make

As per sp's recommendations.

Bug: 204401299
Change-Id: Ida464b7ef44e2ad5855764e4e7d03b9f6bd5d1b0
Test: Built and flashed device.
Test: atest CtsMediaTestCases:MediaPlayerTest
parent 74ef57b8
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -953,7 +953,7 @@ android_media_MediaPlayer_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
    Parcel* parcel = parcelForJavaObject(env, jAttributionSource);
    android::content::AttributionSourceState attributionSource;
    attributionSource.readFromParcel(parcel);
    sp<MediaPlayer> mp = new MediaPlayer(attributionSource);
    sp<MediaPlayer> mp = sp<MediaPlayer>::make(attributionSource);
    if (mp == NULL) {
        jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
        return;