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

Commit 9f285c93 authored by Hongguang's avatar Hongguang
Browse files

tuner: call to hal again to close transport FD by binder

- Base on hardware binder design, the transport data from binder will be
closed on the next transact(...).
- Here TunerServer call to Tuner HAL again to trigger binder to close
the fd and release shared memory occupied by it.

Bug: 197008205
Test: Check whether there is tuner related fd leak.
Change-Id: I5eb8e0f193e80a789ca48389c43eb859cb0b5c4a
parent 093c5f34
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -308,6 +308,11 @@ TunerHidlFilter::~TunerHidlFilter() {
        return ::ndk::ScopedAStatus::fromServiceSpecificError(static_cast<int32_t>(res));
    }

    // Call to HAL to make sure the transport FD was able to be closed by binder.
    // This is a tricky workaround for a problem in Binder.
    // TODO:[b/192048842] When that problem is fixed we may be able to remove or change this code.
    mFilter->getId([&](HidlResult /* r */, uint32_t /* filterId*/){});

    return ::ndk::ScopedAStatus::ok();
}