Make tuned field description more precise and fix VTS tests to obey it.

Also makes an ABI-stable change to a hal definition file.

Bug: b/36864490
Test: VTS
Change-Id: Ibf3513722144a559c31d0f61eb84bc718cd9dbdc
diff --git a/broadcastradio/1.0/types.hal b/broadcastradio/1.0/types.hal
index 045231d..934f49f 100644
--- a/broadcastradio/1.0/types.hal
+++ b/broadcastradio/1.0/types.hal
@@ -208,7 +208,10 @@
 struct ProgramInfo {
     uint32_t     channel;   /** current channel. (e.g kHz for band type AM_FM) */
     uint32_t     subChannel; /** current sub channel. (FM_HD) */
-    bool         tuned;     /** tuned to a program or not */
+
+    /** Tuned to a program (not a noise). It's the same condition that would stop scan operation. */
+    bool         tuned;
+
     bool         stereo;    /** program is stereo or not */
     bool         digital;   /** digital program or not (e.g HD Radio program) */
     uint32_t     signalStrength; /** signal strength from 0 to 100 */
diff --git a/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp b/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
index 3ac6594..7241ad4 100644
--- a/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
+++ b/broadcastradio/1.0/vts/functional/VtsHalBroadcastradioV1_0TargetTest.cpp
@@ -599,11 +599,8 @@
     EXPECT_TRUE(hidlReturn.isOk());
     EXPECT_EQ(Result::OK, halResult);
     if (mResultCallbackData == Result::OK) {
-        EXPECT_EQ(true, halInfo.tuned);
         EXPECT_LE(halInfo.channel, upperLimit);
         EXPECT_GE(halInfo.channel, lowerLimit);
-    } else {
-        EXPECT_EQ(false, halInfo.tuned);
     }
 
     // test cancel
diff --git a/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp b/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
index 904d896..b45c8d5 100644
--- a/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
+++ b/broadcastradio/1.1/vts/functional/VtsHalBroadcastradioV1_1TargetTest.cpp
@@ -456,11 +456,8 @@
     EXPECT_EQ(Result::OK, halResult);
     auto &halInfo_1_1 = halInfo.base;
     if (mResultCallbackData == Result::OK) {
-        EXPECT_TRUE(halInfo_1_1.tuned);
         EXPECT_LE(halInfo_1_1.channel, upperLimit);
         EXPECT_GE(halInfo_1_1.channel, lowerLimit);
-    } else {
-        EXPECT_EQ(false, halInfo_1_1.tuned);
     }
 
     // test cancel
diff --git a/current.txt b/current.txt
index eb82ee4..cd76ef9 100644
--- a/current.txt
+++ b/current.txt
@@ -189,6 +189,7 @@
 
 # ABI preserving changes to HALs released in Android O
 
+1cb99268f38629288646c0e067a6bc59b82d356b5adb74237fba0372d34978b0 android.hardware.broadcastradio@1.0::types
 760485232f6cce07f8bb05e3475509956996b702f77415ee5bff05e2ec5a5bcc android.hardware.dumpstate@1.0::IDumpstateDevice
 1fecfa1609ff9d27ebf761a84b4336efa9d5dac5b241f19a6663f70d8db2c4b1 android.hardware.radio@1.0::IRadioResponse
 28e929b453df3d9f5060af2764e6cdb123ddb893e3e86923c877f6ff7e5f02c9 android.hardware.wifi@1.0::types