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

Commit 60830b74 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add API to filter out unnecessary PIDs from frontend output."

parents b4f42a9b f6964ffa
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
@@ -174,6 +174,16 @@ TunerFrontend::~TunerFrontend() {
    return mFrontend->getHardwareInfo(_aidl_return);
}

::ndk::ScopedAStatus TunerFrontend::removeOutputPid(int32_t in_pid) {
    if (mFrontend == nullptr) {
        ALOGD("IFrontend is not initialized");
        return ::ndk::ScopedAStatus::fromServiceSpecificError(
                static_cast<int32_t>(Result::UNAVAILABLE));
    }

    return mFrontend->removeOutputPid(in_pid);
}

/////////////// FrontendCallback ///////////////////////
::ndk::ScopedAStatus TunerFrontend::FrontendCallback::onEvent(FrontendEventType frontendEventType) {
    ALOGV("FrontendCallback::onEvent, type=%d", frontendEventType);
+1 −0
Original line number Diff line number Diff line
@@ -63,6 +63,7 @@ public:
                                   vector<FrontendStatus>* _aidl_return) override;
    ::ndk::ScopedAStatus getFrontendId(int32_t* _aidl_return) override;
    ::ndk::ScopedAStatus getHardwareInfo(std::string* _aidl_return) override;
    ::ndk::ScopedAStatus removeOutputPid(int32_t in_pid) override;

    struct FrontendCallback : public BnFrontendCallback {
        FrontendCallback(const shared_ptr<ITunerFrontendCallback> tunerFrontendCallback)
+5 −0
Original line number Diff line number Diff line
@@ -99,4 +99,9 @@ interface ITunerFrontend {
     * Request hardware information about the frontend.
     */
    String getHardwareInfo();

    /**
     * Filter out unnecessary PID from frontend output.
     */
    void removeOutputPid(int pid);
}
+5 −0
Original line number Diff line number Diff line
@@ -428,6 +428,11 @@ TunerHidlFrontend::~TunerHidlFrontend() {
            static_cast<int32_t>(Result::UNAVAILABLE));
}

::ndk::ScopedAStatus TunerHidlFrontend::removeOutputPid(int32_t /* in_pid */) {
    return ::ndk::ScopedAStatus::fromServiceSpecificError(
            static_cast<int32_t>(Result::UNAVAILABLE));
}

void TunerHidlFrontend::setLna(bool bEnable) {
    if (mFrontend == nullptr) {
        ALOGD("IFrontend is not initialized");
+1 −0
Original line number Diff line number Diff line
@@ -83,6 +83,7 @@ public:
                                   vector<FrontendStatus>* _aidl_return) override;
    ::ndk::ScopedAStatus getFrontendId(int32_t* _aidl_return) override;
    ::ndk::ScopedAStatus getHardwareInfo(std::string* _aidl_return) override;
    ::ndk::ScopedAStatus removeOutputPid(int32_t in_pid) override;

    void setLna(bool in_bEnable);