Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 7f32fa70 authored by Eric Laurent's avatar Eric Laurent Committed by Android (Google) Code Review
Browse files

Merge "radio: fix 64 bit process compatibility"

parents c024377d 4bcb616e
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -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;
}