Fix remaining broadcastradio 1.1 VTS TODOs.

This includes:
- cover all AM/FM bands, not just first one
- fix flakiness on late callback dereference
- fix 1.0 tuneComplete check
- move utils includes into separate subdirectories

Bug: b/36864490
Test: VTS
Change-Id: I6e2427ac29abd6278c9783cf83b4df05195ac7ea
diff --git a/broadcastradio/1.1/utils/Utils.cpp b/broadcastradio/1.1/utils/Utils.cpp
index f8a4479..8bb7691 100644
--- a/broadcastradio/1.1/utils/Utils.cpp
+++ b/broadcastradio/1.1/utils/Utils.cpp
@@ -16,7 +16,7 @@
 #define LOG_TAG "BroadcastRadioDefault.utils"
 //#define LOG_NDEBUG 0
 
-#include "Utils.h"
+#include <broadcastradio-utils/Utils.h>
 
 #include <log/log.h>
 
@@ -208,6 +208,26 @@
 
 }  // namespace utils
 }  // namespace V1_1
+
+namespace V1_0 {
+
+bool operator==(const BandConfig& l, const BandConfig& r) {
+    if (l.type != r.type) return false;
+    if (l.antennaConnected != r.antennaConnected) return false;
+    if (l.lowerLimit != r.lowerLimit) return false;
+    if (l.upperLimit != r.upperLimit) return false;
+    if (l.spacings != r.spacings) return false;
+    if (l.type == Band::AM || l.type == Band::AM_HD) {
+        return l.ext.am == r.ext.am;
+    } else if (l.type == Band::FM || l.type == Band::FM_HD) {
+        return l.ext.fm == r.ext.fm;
+    } else {
+        ALOGW("Unsupported band config type: %s", toString(l.type).c_str());
+        return false;
+    }
+}
+
+}  // namespace V1_0
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android