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

Commit 6f06ffe6 authored by Tomasz Wasilczyk's avatar Tomasz Wasilczyk
Browse files

Implement generic vendor-specific parameters.

This commit covers HAL changes only.

Bug: 65862441
Test: it builds
Change-Id: I9d3eb232468d8e91bb1f88ccfbf882feb2775ce1
parent 20eef7d0
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -50,6 +50,7 @@ using V1_0::Result;
using V1_1::ProgramInfo;
using V1_1::ProgramListResult;
using V1_1::ProgramSelector;
using V1_1::VendorKeyValue;
using V1_2::ITunerCallback;
using utils::HalRevision;

@@ -120,6 +121,7 @@ public:
    virtual Return<void> backgroundScanComplete(ProgramListResult result);
    virtual Return<void> programListChanged();
    virtual Return<void> currentProgramInfoChanged(const ProgramInfo& info);
    virtual Return<void> parametersUpdated(const hidl_vec<VendorKeyValue>& parameters);
};

struct TunerCallbackContext {
@@ -341,6 +343,14 @@ Return<void> NativeCallback::currentProgramInfoChanged(const ProgramInfo& info)
    return Return<void>();
}

Return<void> NativeCallback::parametersUpdated(const hidl_vec<VendorKeyValue>& parameters) {
    ALOGV("%s", __func__);

    // TODO(b/65862441): pass this callback to the front-end

    return {};
}

static TunerCallbackContext& getNativeContext(jlong nativeContextHandle) {
    auto nativeContext = reinterpret_cast<TunerCallbackContext*>(nativeContextHandle);
    LOG_ALWAYS_FATAL_IF(nativeContext == nullptr, "Native context not initialized");