Widen dummy band range to cover all regions.

Bug: b/64115131
Test: VTS, instrumentation
Change-Id: I34e9aac440a003226200243c835e6116ba7eae90
diff --git a/broadcastradio/1.1/default/BroadcastRadio.cpp b/broadcastradio/1.1/default/BroadcastRadio.cpp
index ce7a10f..38b4b99 100644
--- a/broadcastradio/1.1/default/BroadcastRadio.cpp
+++ b/broadcastradio/1.1/default/BroadcastRadio.cpp
@@ -45,16 +45,28 @@
         "Digital radio mock",
         {  // amFmBands
             AmFmBandConfig({
+                Band::AM,
+                153,         // lowerLimit
+                26100,       // upperLimit
+                {5, 9, 10},  // spacings
+            }),
+            AmFmBandConfig({
+                Band::FM,
+                65800,           // lowerLimit
+                108000,          // upperLimit
+                {10, 100, 200},  // spacings
+            }),
+            AmFmBandConfig({
                 Band::AM_HD,
-                540,   // lowerLimit
-                1610,  // upperLimit
-                10,    // spacing
+                153,         // lowerLimit
+                26100,       // upperLimit
+                {5, 9, 10},  // spacings
             }),
             AmFmBandConfig({
                 Band::FM_HD,
                 87900,   // lowerLimit
                 107900,  // upperLimit
-                200,     // spacing
+                {200},   // spacings
             }),
         },
     })},
@@ -114,14 +126,14 @@
         dst.antennaConnected = true;
         dst.lowerLimit = src.lowerLimit;
         dst.upperLimit = src.upperLimit;
-        dst.spacings = vector<uint32_t>({src.spacing});
+        dst.spacings = src.spacings;
 
-        if (src.type == Band::AM) {
+        if (utils::isAm(src.type)) {
             dst.ext.am.stereo = true;
-        } else if (src.type == Band::FM) {
-            dst.ext.fm.deemphasis = Deemphasis::D75;
+        } else if (utils::isFm(src.type)) {
+            dst.ext.fm.deemphasis = static_cast<Deemphasis>(Deemphasis::D50 | Deemphasis::D75);
             dst.ext.fm.stereo = true;
-            dst.ext.fm.rds = Rds::US;
+            dst.ext.fm.rds = static_cast<Rds>(Rds::WORLD | Rds::US);
             dst.ext.fm.ta = true;
             dst.ext.fm.af = true;
             dst.ext.fm.ea = true;
diff --git a/broadcastradio/1.1/default/BroadcastRadio.h b/broadcastradio/1.1/default/BroadcastRadio.h
index 71e3be8..a96a2ab 100644
--- a/broadcastradio/1.1/default/BroadcastRadio.h
+++ b/broadcastradio/1.1/default/BroadcastRadio.h
@@ -31,7 +31,7 @@
     V1_0::Band type;
     uint32_t lowerLimit;  // kHz
     uint32_t upperLimit;  // kHz
-    uint32_t spacing;     // kHz
+    std::vector<uint32_t> spacings;  // kHz
 };
 
 struct ModuleConfig {
diff --git a/broadcastradio/1.1/default/Tuner.cpp b/broadcastradio/1.1/default/Tuner.cpp
index 87964d3..9a34cb1 100644
--- a/broadcastradio/1.1/default/Tuner.cpp
+++ b/broadcastradio/1.1/default/Tuner.cpp
@@ -83,7 +83,7 @@
         mAmfmConfig.antennaConnected = true;
         mCurrentProgram = utils::make_selector(mAmfmConfig.type, mAmfmConfig.lowerLimit);
 
-        if (mAmfmConfig.type == Band::FM_HD || mAmfmConfig.type == Band::FM) {
+        if (utils::isFm(mAmfmConfig.type)) {
             mVirtualRadio = std::ref(getFmRadio());
         } else {
             mVirtualRadio = std::ref(getAmRadio());
diff --git a/broadcastradio/1.1/utils/Utils.cpp b/broadcastradio/1.1/utils/Utils.cpp
index 50a407c..e880ca0 100644
--- a/broadcastradio/1.1/utils/Utils.cpp
+++ b/broadcastradio/1.1/utils/Utils.cpp
@@ -119,6 +119,14 @@
     }
 }
 
+bool isAm(const Band band) {
+    return band == Band::AM || band == Band::AM_HD;
+}
+
+bool isFm(const Band band) {
+    return band == Band::FM || band == Band::FM_HD;
+}
+
 bool hasId(const ProgramSelector& sel, const IdentifierType type) {
     auto itype = static_cast<uint32_t>(type);
     if (sel.primaryId.type == itype) return true;
@@ -153,17 +161,12 @@
 
     // we can't use ProgramType::AM_HD or FM_HD, because we don't know HD station ID
     ProgramType type;
-    switch (band) {
-        case Band::AM:
-        case Band::AM_HD:
-            type = ProgramType::AM;
-            break;
-        case Band::FM:
-        case Band::FM_HD:
-            type = ProgramType::FM;
-            break;
-        default:
-            LOG_ALWAYS_FATAL("Unsupported band: %s", toString(band).c_str());
+    if (isAm(band)) {
+        type = ProgramType::AM;
+    } else if (isFm(band)) {
+        type = ProgramType::FM;
+    } else {
+        LOG_ALWAYS_FATAL("Unsupported band: %s", toString(band).c_str());
     }
 
     sel.programType = static_cast<uint32_t>(type);
@@ -219,9 +222,9 @@
     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) {
+    if (V1_1::utils::isAm(l.type)) {
         return l.ext.am == r.ext.am;
-    } else if (l.type == Band::FM || l.type == Band::FM_HD) {
+    } else if (V1_1::utils::isFm(l.type)) {
         return l.ext.fm == r.ext.fm;
     } else {
         ALOGW("Unsupported band config type: %s", toString(l.type).c_str());
diff --git a/broadcastradio/1.1/utils/include/broadcastradio-utils/Utils.h b/broadcastradio/1.1/utils/include/broadcastradio-utils/Utils.h
index 4d69c0a..24c60ee 100644
--- a/broadcastradio/1.1/utils/include/broadcastradio-utils/Utils.h
+++ b/broadcastradio/1.1/utils/include/broadcastradio-utils/Utils.h
@@ -48,6 +48,9 @@
 ProgramType getType(const ProgramSelector& sel);
 bool isAmFm(const ProgramType type);
 
+bool isAm(const V1_0::Band band);
+bool isFm(const V1_0::Band band);
+
 bool hasId(const ProgramSelector& sel, const IdentifierType type);
 
 /**