summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Tomasz Wasilczyk <twasilczyk@google.com> 2017-01-27 20:38:55 +0000
committer android-build-merger <android-build-merger@google.com> 2017-01-27 20:38:55 +0000
commitbb15b50ffc02e02de0af11e2bee577fc47a44e2e (patch)
tree08c73bec24120dc6be250012b118c141f555a98a
parent118c0c9e7dc60c7e7bb83e525c2b2b1c9c021ceb (diff)
parente163e7b943ca05b51087bac9e048a181033b6461 (diff)
Merge "Use the new radio_metadata wrapper for safer memory management." am: a9ed0b1c8b
am: e163e7b943 Change-Id: I61a101f50ef6ea56b0ed9b9b1b7ec4b0516220ab
-rw-r--r--core/jni/android_hardware_Radio.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/jni/android_hardware_Radio.cpp b/core/jni/android_hardware_Radio.cpp
index ec6471e3dc83..d2ac2cc40a32 100644
--- a/core/jni/android_hardware_Radio.cpp
+++ b/core/jni/android_hardware_Radio.cpp
@@ -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>
@@ -749,7 +749,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;
@@ -767,7 +767,6 @@ exit:
if (jInfo != NULL) {
env->DeleteLocalRef(jInfo);
}
- radio_metadata_deallocate(nInfo.metadata);
return jStatus;
}