Merge "Replace new with sp<>::make" am: 88aed3b81d
Original change: https://android-review.googlesource.com/c/platform/frameworks/base/+/1878353 Change-Id: I654382ac5e1a4faf2275d24fad1ca8cc81727359
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user