Enhance resource sharing and enable ownership transfer
New public APIs
- Tuner.closeFrontend()
- Enables TIS app to continue using other resource while changing
frontend resource
- close & release Frontend resource when called on the owner, while
it unshares Frontend resource when called on the sharee.
- Lnb.addCallback(Callback, Executor) and Lnb.removeCallback(Callback)
- Enables TIS app to receive callback from the sharee
- Also helps with the ownership transfer
- Tuner.transferOwner(Tuner newOwner)
- Transfers the ownership of Frontend, CiCam, and Lnb resource
Additionally, added the following:
- Call nativeSetLnb() in requestFrontend() in case mLnb resource
is already held. (this use case becomes a possibility now that we
support Tuner.closeFrontend())
Bug: 192010866
Test: cts.TunerTest#testTransferOwner, testLnbAddAndRemoveSharee
Change-Id: I4c39c3726f0dd7bd1c153975ad01393ff2773005
8 files changed