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

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

release-request-1f2fcfef-9736-44dc-8628-3ba96dac60db-for-git_oc-mr1-release-43...

release-request-1f2fcfef-9736-44dc-8628-3ba96dac60db-for-git_oc-mr1-release-4343541 snap-temp-L73700000103533431

Change-Id: I42853ae0d9f733d567b45f76d0cd69503a4098a2
parents 665806ae 3f2c1c1b
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -28,6 +28,7 @@ TEST(CheckConfig, audioPolicyConfigurationValidation) {
        const auto configPath = folder + '/' + configName;
        if (access(configPath.c_str(), R_OK) == 0) {
            ASSERT_VALID_XML(configPath.c_str(), configSchemaPath);
            return; // The framework does not read past the first config file found
        }
    }
}
+21 −5
Original line number Diff line number Diff line
@@ -377,10 +377,14 @@ camera_memory_t* CameraDevice::sGetMemory(int fd, size_t buf_size, uint_t num_bu
    hidl_handle hidlHandle = mem->mHidlHandle;
    MemoryId id = object->mDeviceCallback->registerMemory(hidlHandle, buf_size, num_bufs);
    mem->handle.mId = id;

    {
        Mutex::Autolock _l(object->mMemoryMapLock);
        if (object->mMemoryMap.count(id) != 0) {
            ALOGE("%s: duplicate MemoryId %d returned by client!", __FUNCTION__, id);
        }
        object->mMemoryMap[id] = mem;
    }
    mem->handle.mDevice = object;
    return &mem->handle;
}
@@ -398,7 +402,10 @@ void CameraDevice::sPutMemory(camera_memory_t *data) {
        ALOGE("%s: camera HAL return memory while camera is not opened!", __FUNCTION__);
    }
    device->mDeviceCallback->unregisterMemory(mem->handle.mId);
    {
        Mutex::Autolock _l(device->mMemoryMapLock);
        device->mMemoryMap.erase(mem->handle.mId);
    }
    mem->decStrong(mem);
}

@@ -826,7 +833,16 @@ void CameraDevice::releaseRecordingFrameLocked(
        return;
    }
    if (mDevice->ops->release_recording_frame) {
        CameraHeapMemory* camMemory = mMemoryMap.at(memId);
        CameraHeapMemory* camMemory;
        {
            Mutex::Autolock _l(mMemoryMapLock);
            auto it = mMemoryMap.find(memId);
            if (it == mMemoryMap.end() || it->second == nullptr) {
                ALOGE("%s unknown memoryId %d", __FUNCTION__, memId);
                return;
            }
            camMemory = it->second;
        }
        if (bufferIndex >= camMemory->mNumBufs) {
            ALOGE("%s: bufferIndex %d exceeds number of buffers %d",
                    __FUNCTION__, bufferIndex, camMemory->mNumBufs);
+2 −0
Original line number Diff line number Diff line
@@ -165,6 +165,8 @@ private:

    sp<ICameraDeviceCallback> mDeviceCallback = nullptr;

    mutable Mutex mMemoryMapLock; // gating access to mMemoryMap
                                  // must not hold mLock after this lock is acquired
    std::unordered_map<MemoryId, CameraHeapMemory*> mMemoryMap;

    bool mMetadataMode = false;
+1 −4
Original line number Diff line number Diff line
@@ -67,16 +67,13 @@ genrule {
    ],
}

cc_test_library {
cc_library {
    name: "android.hardware.tests.bar@1.0",
    defaults: ["hidl-module-defaults"],
    generated_sources: ["android.hardware.tests.bar@1.0_genc++"],
    generated_headers: ["android.hardware.tests.bar@1.0_genc++_headers"],
    export_generated_headers: ["android.hardware.tests.bar@1.0_genc++_headers"],
    vendor_available: true,
    vndk: {
        enabled: true,
    },
    shared_libs: [
        "libhidlbase",
        "libhidltransport",
+1 −4
Original line number Diff line number Diff line
@@ -60,16 +60,13 @@ genrule {
    ],
}

cc_test_library {
cc_library {
    name: "android.hardware.tests.baz@1.0",
    defaults: ["hidl-module-defaults"],
    generated_sources: ["android.hardware.tests.baz@1.0_genc++"],
    generated_headers: ["android.hardware.tests.baz@1.0_genc++_headers"],
    export_generated_headers: ["android.hardware.tests.baz@1.0_genc++_headers"],
    vendor_available: true,
    vndk: {
        enabled: true,
    },
    shared_libs: [
        "libhidlbase",
        "libhidltransport",
Loading