Loading media/codec2/hidl/1.2/utils/Component.cpp +31 −0 Original line number Diff line number Diff line Loading @@ -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() { Loading media/codec2/hidl/1.2/utils/include/codec2/hidl/1.2/Component.h +4 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,10 @@ protected: friend struct ComponentStore; struct Listener; using HwDeathRecipient = ::android::hardware::hidl_death_recipient; sp<HwDeathRecipient> mDeathRecipient; }; } // namespace utils Loading media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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; } Loading services/camera/libcameraservice/device3/aidl/AidlCamera3Device.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -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; } Loading Loading
media/codec2/hidl/1.2/utils/Component.cpp +31 −0 Original line number Diff line number Diff line Loading @@ -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() { Loading
media/codec2/hidl/1.2/utils/include/codec2/hidl/1.2/Component.h +4 −0 Original line number Diff line number Diff line Loading @@ -142,6 +142,10 @@ protected: friend struct ComponentStore; struct Listener; using HwDeathRecipient = ::android::hardware::hidl_death_recipient; sp<HwDeathRecipient> mDeathRecipient; }; } // namespace utils Loading
media/libstagefright/rtsp/AMPEG4ElementaryAssembler.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -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; } Loading
services/camera/libcameraservice/device3/aidl/AidlCamera3Device.cpp +0 −1 Original line number Diff line number Diff line Loading @@ -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; } Loading