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

Commit a0934756 authored by Wonsik Kim's avatar Wonsik Kim Committed by Gerrit Code Review
Browse files

Merge "aidl/ComponentStore: return error if listener is null." into main

parents 411ee6cf 32141dd7
Loading
Loading
Loading
Loading
+9 −2
Original line number Original line Diff line number Diff line
@@ -206,12 +206,19 @@ ScopedAStatus ComponentStore::createComponent(
        const std::shared_ptr<IClientManager>& pool,
        const std::shared_ptr<IClientManager>& pool,
        std::shared_ptr<IComponent> *component) {
        std::shared_ptr<IComponent> *component) {


    if (!listener) {
        ALOGE("createComponent(): listener is null");
        return ScopedAStatus::fromServiceSpecificError(Status::BAD_VALUE);
    }
    if (!pool) {
        ALOGE("createComponent(): pool is null");
        return ScopedAStatus::fromServiceSpecificError(Status::BAD_VALUE);
    }

    std::shared_ptr<C2Component> c2component;
    std::shared_ptr<C2Component> c2component;
    c2_status_t status =
    c2_status_t status =
            mStore->createComponent(name, &c2component);
            mStore->createComponent(name, &c2component);


    ALOGD("createComponent(): listener(%d)", bool(listener));

    if (status == C2_OK) {
    if (status == C2_OK) {
#ifndef __ANDROID_APEX__
#ifndef __ANDROID_APEX__
        c2component = GetFilterWrapper()->maybeWrapComponent(c2component);
        c2component = GetFilterWrapper()->maybeWrapComponent(c2component);