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

Commit 320ed36d authored by Kyle Zhang's avatar Kyle Zhang Committed by Automerger Merge Worker
Browse files

Merge "Reset Init Check to NO_INIT after destroy in CryptoHal implementation"...

Merge "Reset Init Check to NO_INIT after destroy in CryptoHal implementation" into tm-dev am: 67dd0e5f

Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/av/+/18419169



Change-Id: I85231b62cfd0da3855b9e78d58620bbc538d3ac6
Signed-off-by: default avatarAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
parents 718bac02 67dd0e5f
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -219,6 +219,7 @@ status_t CryptoHalAidl::destroyPlugin() {
    }

    mPlugin.reset();
    mInitCheck = NO_INIT;
    return OK;
}

@@ -372,6 +373,10 @@ int32_t CryptoHalAidl::setHeap(const sp<HidlMemory>& heap) {

    Mutex::Autolock autoLock(mLock);

    if (mInitCheck != OK) {
        return -1;
    }

    int32_t seqNum = mHeapSeqNum++;
    uint32_t bufferId = static_cast<uint32_t>(seqNum);
    mHeapSizes.add(seqNum, heap->size());
+5 −0
Original line number Diff line number Diff line
@@ -190,6 +190,7 @@ status_t CryptoHalHidl::destroyPlugin() {

    mPlugin.clear();
    mPluginV1_2.clear();
    mInitCheck = NO_INIT;
    return OK;
}

@@ -221,6 +222,10 @@ int32_t CryptoHalHidl::setHeapBase(const sp<HidlMemory>& heap) {

    Mutex::Autolock autoLock(mLock);

    if (mInitCheck != OK) {
        return -1;
    }

    int32_t seqNum = mHeapSeqNum++;
    uint32_t bufferId = static_cast<uint32_t>(seqNum);
    mHeapSizes.add(seqNum, heap->size());