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

Commit 82c5de33 authored by Jeff Tinker's avatar Jeff Tinker Committed by android-build-merger
Browse files

Merge "Fix mediadrmserver segfault in GTS tests" into pi-dev

am: 4ed61f3f

Change-Id: Ia258a9b27b1b66c17f5c142671132241dc4fdd63
parents ab75d53c 4ed61f3f
Loading
Loading
Loading
Loading
+9 −5
Original line number Diff line number Diff line
@@ -269,12 +269,16 @@ void CryptoHal::clearHeapBase(int32_t seqNum) {
     * TODO: Add a releaseSharedBuffer method in a future DRM HAL
     * API version to make this explicit.
     */
    uint32_t bufferId = mHeapBases.valueFor(seqNum).getBufferId();
    ssize_t index = mHeapBases.indexOfKey(seqNum);
    if (index >= 0) {
        if (mPlugin != NULL) {
            uint32_t bufferId = mHeapBases[index].getBufferId();
            Return<void> hResult = mPlugin->setSharedBufferBase(hidl_memory(), bufferId);
            ALOGE_IF(!hResult.isOk(), "setSharedBufferBase(): remote call failed");

        }
        mHeapBases.removeItem(seqNum);
    }
}

status_t CryptoHal::toSharedBuffer(const sp<IMemory>& memory, int32_t seqNum, ::SharedBuffer* buffer) {
    ssize_t offset;