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

Commit c4c1fb62 authored by android-build-team Robot's avatar android-build-team Robot
Browse files

release-request-c9e3b153-009d-4386-b83e-337752602795-for-git_oc-mr1-release-41...

release-request-c9e3b153-009d-4386-b83e-337752602795-for-git_oc-mr1-release-4111654 snap-temp-L22900000075285650

Change-Id: Idf0df2109fca07a1a7d3597c54013c7a02844772
parents 1b2bed96 a5891320
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -21,6 +21,8 @@

#include <hidl/MQDescriptor.h>

#include <functional>

namespace android {
namespace hardware {
namespace bluetooth {
+1 −0
Original line number Diff line number Diff line
@@ -18,6 +18,7 @@

#define LOG_TAG "android.hardware.bluetooth-hci-hci_protocol"
#include <assert.h>
#include <errno.h>
#include <fcntl.h>
#include <log/log.h>

+11 −3
Original line number Diff line number Diff line
@@ -115,9 +115,17 @@ exit:
    return Void();
}

Return<void> BroadcastRadio::getProperties_1_1(getProperties_1_1_cb _hidl_cb __unused)
{
    return Status::fromExceptionCode(Status::EX_UNSUPPORTED_OPERATION);
Return<void> BroadcastRadio::getProperties_1_1(getProperties_1_1_cb _hidl_cb) {
    radio_hal_properties_t halProperties;
    V1_1::Properties properties = {};

    LOG_ALWAYS_FATAL_IF(mHwDevice == nullptr, "HW device is not set");
    int rc = mHwDevice->get_properties(mHwDevice, &halProperties);
    LOG_ALWAYS_FATAL_IF(rc != 0, "Couldn't get device properties");
    Utils::convertPropertiesFromHal(&properties.base, &halProperties);

    _hidl_cb(properties);
    return Void();
}

Return<void> BroadcastRadio::openTuner(const BandConfig& config, bool audio,
+5 −3
Original line number Diff line number Diff line
@@ -1678,7 +1678,8 @@ TEST_F(CameraHidlTest, getCameraCharacteristics) {
                    ASSERT_EQ(Status::OK, status);
                    const camera_metadata_t* metadata = (camera_metadata_t*) chars.data();
                    size_t expectedSize = chars.size();
                    ASSERT_EQ(0, validate_camera_metadata_structure(metadata, &expectedSize));
                    int result = validate_camera_metadata_structure(metadata, &expectedSize);
                    ASSERT_TRUE(result == 0 || result == CAMERA_METADATA_VALIDATION_SHIFTED);
                    size_t entryCount = get_camera_metadata_entry_count(metadata);
                    // TODO: we can do better than 0 here. Need to check how many required
                    // characteristics keys we've defined.
@@ -1995,8 +1996,9 @@ TEST_F(CameraHidlTest, constructDefaultRequestSettings) {
                            const camera_metadata_t* metadata =
                                (camera_metadata_t*) req.data();
                            size_t expectedSize = req.size();
                            ASSERT_EQ(0, validate_camera_metadata_structure(
                                    metadata, &expectedSize));
                            int result = validate_camera_metadata_structure(
                                    metadata, &expectedSize);
                            ASSERT_TRUE(result == 0 || result == CAMERA_METADATA_VALIDATION_SHIFTED);
                            size_t entryCount = get_camera_metadata_entry_count(metadata);
                            // TODO: we can do better than 0 here. Need to check how many required
                            // request keys we've defined for each template
+20 −9
Original line number Diff line number Diff line
@@ -293,20 +293,31 @@ Return<void> GrallocMapper::unlock(void* buffer, unlock_cb hidl_cb) {
    return Void();
}

IMapper* HIDL_FETCH_IMapper(const char* /* name */) {
    const hw_module_t* module = nullptr;
namespace {
// Load the gralloc module when this shared library is loaded, rather than
// waiting until HIDL_FETCH_IMapper is called. This allows it (and its
// dependencies) to be loaded by Zygote, reducing app startup time and sharing
// pages dirtied during library load between all apps.
struct GrallocModule {
    const hw_module_t* module;
    GrallocModule() : module(nullptr) {
        int err = hw_get_module(GRALLOC_HARDWARE_MODULE_ID, &module);
    if (err) {
        ALOGE("failed to get gralloc module");
        return nullptr;
        ALOGE_IF(err, "failed to get gralloc module: %s (%d)", strerror(-err),
                 err);
    }
};
GrallocModule gGralloc;
}  // namespace

IMapper* HIDL_FETCH_IMapper(const char* /* name */) {
    if (!gGralloc.module) return nullptr;

    uint8_t major = (module->module_api_version >> 8) & 0xff;
    uint8_t major = (gGralloc.module->module_api_version >> 8) & 0xff;
    switch (major) {
        case 1:
            return new Gralloc1Mapper(module);
            return new Gralloc1Mapper(gGralloc.module);
        case 0:
            return new Gralloc0Mapper(module);
            return new Gralloc0Mapper(gGralloc.module);
        default:
            ALOGE("unknown gralloc module major version %d", major);
            return nullptr;
Loading