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

Commit 624b368f authored by Android Build Coastguard Worker's avatar Android Build Coastguard Worker
Browse files

Snap for 8345013 from 986c16c9 to tm-release

Change-Id: Icd3f187db0ef1097872707f80b448d94ca018113
parents 382c50ea 986c16c9
Loading
Loading
Loading
Loading
+31 −0
Original line number Diff line number Diff line
@@ -520,6 +520,37 @@ void Component::initListener(const sp<Component>& self) {
    if (res != C2_OK) {
        mInit = res;
    }

    struct ListenerDeathRecipient : public HwDeathRecipient {
        ListenerDeathRecipient(const wp<Component>& comp)
            : component{comp} {
        }

        virtual void serviceDied(
                uint64_t /* cookie */,
                const wp<::android::hidl::base::V1_0::IBase>& /* who */
                ) override {
            auto strongComponent = component.promote();
            if (strongComponent) {
                LOG(INFO) << "Client died ! release the component !!";
                strongComponent->release();
            } else {
                LOG(ERROR) << "Client died ! no component to release !!";
            }
        }

        wp<Component> component;
    };

    mDeathRecipient = new ListenerDeathRecipient(self);
    Return<bool> transStatus = mListener->linkToDeath(
            mDeathRecipient, 0);
    if (!transStatus.isOk()) {
        LOG(ERROR) << "Listener linkToDeath() transaction failed.";
    }
    if (!static_cast<bool>(transStatus)) {
        LOG(DEBUG) << "Listener linkToDeath() call failed.";
    }
}

Component::~Component() {
+4 −0
Original line number Diff line number Diff line
@@ -142,6 +142,10 @@ protected:
    friend struct ComponentStore;

    struct Listener;

    using HwDeathRecipient = ::android::hardware::hidl_death_recipient;
    sp<HwDeathRecipient> mDeathRecipient;

};

} // namespace utils
+1 −1
Original line number Diff line number Diff line
@@ -204,7 +204,7 @@ struct AUHeader {
};

bool AMPEG4ElementaryAssembler::initCheck() {
    if(mSizeLength == 0 || mIndexLength == 0 || mIndexDeltaLength == 0) {
    if(mIsGeneric && (mSizeLength == 0 || mIndexLength == 0 || mIndexDeltaLength == 0)) {
        android_errorWriteLog(0x534e4554, "124777537");
        return false;
    }
+0 −1
Original line number Diff line number Diff line
@@ -189,7 +189,6 @@ status_t AidlCamera3Device::initialize(sp<CameraProviderManager> manager,
        return res;
    }
    if (session == nullptr) {
      ALOGE("JCLog: null session returned");
      SET_ERR("Session iface returned is null");
      return INVALID_OPERATION;
    }