Merge "Merge "Use the new radio_metadata wrapper for safer memory management." am: a9ed0b1c8b am: e163e7b943 am: bb15b50ffc am: aa70426388"

This commit is contained in:
Android Build Merger (Role)
2017-01-27 20:51:31 +00:00
committed by Android (Google) Code Review

View File

@@ -23,7 +23,7 @@
#include "JNIHelp.h"
#include "core_jni_helpers.h"
#include <system/radio.h>
#include <system/radio_metadata.h>
#include <system/RadioMetadataWrapper.h>
#include <radio/RadioCallback.h>
#include <radio/Radio.h>
#include <utils/RefBase.h>
@@ -752,7 +752,7 @@ android_hardware_Radio_getProgramInformation(JNIEnv *env, jobject thiz, jobjectA
}
struct radio_program_info nInfo;
radio_metadata_allocate(&nInfo.metadata, 0, 0);
RadioMetadataWrapper metadataWrapper(&nInfo.metadata);
jobject jInfo = NULL;
int jStatus;
@@ -770,7 +770,6 @@ exit:
if (jInfo != NULL) {
env->DeleteLocalRef(jInfo);
}
radio_metadata_deallocate(nInfo.metadata);
return jStatus;
}