radio: fix 64 bit process compatibility

Update for fixes in radio.h and radio_metadata.h

Change-Id: I34562bf266ccb4f0667f0735b9d148c5ba2316a6
This commit is contained in:
Eric Laurent
2016-10-25 11:11:40 -07:00
parent 586bfe5429
commit 4bcb616e71

View File

@@ -245,16 +245,17 @@ static jint convertMetadataFromNative(JNIEnv *env,
radio_metadata_key_t key;
radio_metadata_type_t type;
void *value;
unsigned int size;
size_t size;
if (radio_metadata_get_at_index(nMetadata, i , &key, &type, &value, &size) != 0) {
continue;
}
switch (type) {
case RADIO_METADATA_TYPE_INT: {
ALOGV("%s RADIO_METADATA_TYPE_INT %d", __FUNCTION__, key);
int32_t val = *(int32_t *)value;
jStatus = env->CallIntMethod(*jMetadata,
gRadioMetadataMethods.putIntFromNative,
key, *(jint *)value);
key, (jint)val);
if (jStatus == 0) {
jCount++;
}
@@ -271,7 +272,7 @@ static jint convertMetadataFromNative(JNIEnv *env,
env->DeleteLocalRef(jText);
} break;
case RADIO_METADATA_TYPE_RAW: {
ALOGV("%s RADIO_METADATA_TYPE_RAW %d size %u", __FUNCTION__, key, size);
ALOGV("%s RADIO_METADATA_TYPE_RAW %d size %zu", __FUNCTION__, key, size);
if (size == 0) {
break;
}
@@ -720,7 +721,7 @@ android_hardware_Radio_tune(JNIEnv *env, jobject thiz, jint channel, jint subCha
if (module == NULL) {
return RADIO_STATUS_NO_INIT;
}
status_t status = module->tune((unsigned int)channel, (unsigned int)subChannel);
status_t status = module->tune((uint32_t)channel, (uint32_t)subChannel);
return (jint)status;
}