Added programInfoChanged callback.
Also, updated tuneComplete_1_1 and afSwitch_1_1 to match the new behavior
(not passing the whole ProgramInfo struct).
Bug: b/32621193
Test: VTS (none added)
Change-Id: Ic8aee15b05cb982d97e550fc0806f34fbe112e22
diff --git a/broadcastradio/1.1/ITunerCallback.hal b/broadcastradio/1.1/ITunerCallback.hal
index 158e217..b1c5b01 100644
--- a/broadcastradio/1.1/ITunerCallback.hal
+++ b/broadcastradio/1.1/ITunerCallback.hal
@@ -28,16 +28,26 @@
/**
* Method called by the HAL when a tuning operation completes
* following a step(), scan() or tune() command.
+ *
+ * This callback supersedes V1_0::tuneComplete. For performance reasons,
+ * the 1.0 callback may not be called when HAL implementation detects 1.1
+ * client (by casting V1_0::ITunerCallback to V1_1::ITunerCallback).
+ *
* @param result OK if tune succeeded or TIMEOUT in case of time out.
- * @param info A ProgramInfo structure describing the tuned station.
+ * @param selector A ProgramSelector structure describing the tuned station.
*/
- oneway tuneComplete_1_1(Result result, ProgramInfo info);
+ oneway tuneComplete_1_1(Result result, ProgramSelector selector);
/**
* Method called by the HAL when a frequency switch occurs.
- * @param info A ProgramInfo structure describing the new tuned station.
+ *
+ * This callback supersedes V1_0::afSwitch. For performance reasons,
+ * the 1.0 callback may not be called when HAL implementation detects 1.1
+ * client (by casting V1_0::ITunerCallback to V1_1::ITunerCallback).
+ *
+ * @param selector A ProgramSelector structure describing the tuned station.
*/
- oneway afSwitch_1_1(ProgramInfo info);
+ oneway afSwitch_1_1(ProgramSelector selector);
/**
* Called by the HAL when background scan feature becomes available or not.
@@ -69,4 +79,20 @@
* Client may retrieve the actual list with ITuner::getProgramList.
*/
oneway programListChanged();
+
+ /**
+ * 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::tuneComplete, V1_0::afSwitch and
+ * newMetadata. For performance reasons, these callbacks may not be called
+ * when HAL implementation detects 1.1 client (by casting
+ * V1_0::ITunerCallback to V1_1::ITunerCallback).
+ */
+ oneway programInfoChanged();
};