Merge "Replace new with sp<>::make" am: 88aed3b81d am: e1e9a0dc55 am: 301ef0b780

Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1878353

Change-Id: I2f1995016d9b33e856a652600b5376b969ffc097
This commit is contained in:
Santiago Seifert
2021-11-05 05:51:39 +00:00
committed by Automerger Merge Worker

View File

@@ -953,7 +953,7 @@ android_media_MediaPlayer_native_setup(JNIEnv *env, jobject thiz, jobject weak_t
Parcel* parcel = parcelForJavaObject(env, jAttributionSource); Parcel* parcel = parcelForJavaObject(env, jAttributionSource);
android::content::AttributionSourceState attributionSource; android::content::AttributionSourceState attributionSource;
attributionSource.readFromParcel(parcel); attributionSource.readFromParcel(parcel);
sp<MediaPlayer> mp = new MediaPlayer(attributionSource); sp<MediaPlayer> mp = sp<MediaPlayer>::make(attributionSource);
if (mp == NULL) { if (mp == NULL) {
jniThrowException(env, "java/lang/RuntimeException", "Out of memory"); jniThrowException(env, "java/lang/RuntimeException", "Out of memory");
return; return;