Package: android.hardware.broadcastradio@1.1

ITunerCallback

interface ITunerCallback extends @1.0::ITunerCallback

Some methods of@1.1::ITunerCallback are updated versions of those from@1.0:ITunerCallback.All 1.1 HAL implementations must call both(eg.tuneComplete and tuneComplete_1_1), while 1.1 clients may ignore 1.0 ones, to avoid receiving a callback twice.

Methods

tuneComplete_1_1

oneway tuneComplete_1_1 (Result result, ProgramSelector selector)

Method called by the HAL when a tuning operation completes following a step(), scan() or tune() command.

This callback supersedes V1_0::tuneComplete.The 1.0 callback must not be called when HAL implementation detects 1.1 client(by casting V1_0::ITunerCallback to V1_1::ITunerCallback).

In case of success, currentProgramInfoChanged must be called too.It means the success case may(or may not)be handled by the client in currentProgramInfoChanged, instead of here.

Details
RPC mode
oneway
Parameters
result
OK if tune succeeded or TIMEOUT in case of time out.
selector
A ProgramSelector structure describing the tuned station.

backgroundScanAvailable

oneway backgroundScanAvailable (bool isAvailable)

Called by the HAL when background scan feature becomes available or not.

Details
RPC mode
oneway
Parameters
isAvailable
true, if the tuner turned temporarily background- capable, false in the other case.

backgroundScanComplete

oneway backgroundScanComplete (ProgramListResult result)

Called by the HAL when background scan initiated by startBackgroundScan finishes.If the list was changed, programListChanged must be called too.

Details
RPC mode
oneway
Parameters
result
OK if the scan succeeded, client may retrieve the actual list with ITuner::getProgramList.UNAVAILABLE if the scan was interrupted due to hardware becoming temporarily unavailable.NOT_INITIALIZED other error, ie.HW failure.

programListChanged

oneway programListChanged ()

Called each time the internally cached program list changes.HAL may not call it immediately, ie.it may wait for a short time to accumulate multiple list change notifications into a single event.

This callback is only for notifying about insertions and deletions, not about metadata changes.

It may be triggered either by an explicitly issued background scan, or a scan issued by the device internally.

Client may retrieve the actual list with ITuner::getProgramList.

Details
RPC mode
oneway

currentProgramInfoChanged

oneway currentProgramInfoChanged (ProgramInfo info)

Method called by the HAL when current program information(including metadata)is updated.

Client may retrieve the actual program info with ITuner::getProgramInformation_1_1.

This may be called together with tuneComplete_1_1 or afSwitch_1_1.

This callback supersedes V1_0::newMetadata and V1_0::afSwitch;partly V1_0::tuneComplete.1.0 callbacks must not be called when HAL implementation detects 1.1 client(by casting V1_0::ITunerCallback to V1_1::ITunerCallback).

Details
RPC mode
oneway
Parameters
info
current program information