Fill announcement-related gaps in Broadcast Radio APIs.
- adds TA and TP flags to ProgramInfo struct
- adds a callback to cancel announcement
Bug: b/63702941
Test: Instrumentalization, VTS
Change-Id: I03a0781d37429d4a84aab2dce3e5bb7794a20c57
diff --git a/broadcastradio/1.1/ITuner.hal b/broadcastradio/1.1/ITuner.hal
index 912786a..a5c569a 100644
--- a/broadcastradio/1.1/ITuner.hal
+++ b/broadcastradio/1.1/ITuner.hal
@@ -42,6 +42,24 @@
tune_1_1(ProgramSelector program) generates (Result result);
/**
+ * Cancels announcement.
+ *
+ * If it was traffic announcement, trafficAnnouncement(false) callback
+ * should be called (just like it was ended in a normal way). Similarly for
+ * emergency announcement. If there was no announcement, then no action
+ * should be taken.
+ *
+ * There is a race condition between calling cancelAnnouncement and the
+ * actual announcement being finished, so trafficAnnouncement /
+ * emergencyAnnouncement callback should be tracked with proper locking.
+ *
+ * @return result OK if successfully cancelled announcement or there was
+ * no announcement.
+ * NOT_INITIALIZED if another error occurs.
+ */
+ cancelAnnouncement() generates (Result result);
+
+ /**
* Retrieve current station information.
* @return result OK if scan successfully started
* NOT_INITIALIZED if another error occurs