Move broadcast radio 1.2 default implementation back to 1.1.

Bug: 62945293
Test: VTS

Change-Id: I95d68ea61f5b50c5b510212b0941bddad1158f97
diff --git a/broadcastradio/1.2/default/Android.bp b/broadcastradio/1.1/default/Android.bp
similarity index 88%
rename from broadcastradio/1.2/default/Android.bp
rename to broadcastradio/1.1/default/Android.bp
index bd4be77..52fb45b 100644
--- a/broadcastradio/1.2/default/Android.bp
+++ b/broadcastradio/1.1/default/Android.bp
@@ -15,8 +15,8 @@
 //
 
 cc_binary {
-    name: "android.hardware.broadcastradio@1.2-service",
-    init_rc: ["android.hardware.broadcastradio@1.2-service.rc"],
+    name: "android.hardware.broadcastradio@1.1-service",
+    init_rc: ["android.hardware.broadcastradio@1.1-service.rc"],
     vendor: true,
     relative_install_path: "hw",
     cflags: [
@@ -39,7 +39,6 @@
     shared_libs: [
         "android.hardware.broadcastradio@1.0",
         "android.hardware.broadcastradio@1.1",
-        "android.hardware.broadcastradio@1.2",
         "libbase",
         "libhidlbase",
         "libhidltransport",
diff --git a/broadcastradio/1.2/default/BroadcastRadio.cpp b/broadcastradio/1.1/default/BroadcastRadio.cpp
similarity index 99%
rename from broadcastradio/1.2/default/BroadcastRadio.cpp
rename to broadcastradio/1.1/default/BroadcastRadio.cpp
index 74f6589..2933aa7 100644
--- a/broadcastradio/1.2/default/BroadcastRadio.cpp
+++ b/broadcastradio/1.1/default/BroadcastRadio.cpp
@@ -25,7 +25,7 @@
 namespace android {
 namespace hardware {
 namespace broadcastradio {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 
 using V1_0::Band;
@@ -190,7 +190,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android
diff --git a/broadcastradio/1.2/default/BroadcastRadio.h b/broadcastradio/1.1/default/BroadcastRadio.h
similarity index 85%
rename from broadcastradio/1.2/default/BroadcastRadio.h
rename to broadcastradio/1.1/default/BroadcastRadio.h
index 94d62b9..bdf3b87 100644
--- a/broadcastradio/1.2/default/BroadcastRadio.h
+++ b/broadcastradio/1.1/default/BroadcastRadio.h
@@ -13,24 +13,24 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_2_BROADCASTRADIO_H
-#define ANDROID_HARDWARE_BROADCASTRADIO_V1_2_BROADCASTRADIO_H
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIO_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIO_H
 
 #include "Tuner.h"
 
 #include <android/hardware/broadcastradio/1.1/IBroadcastRadio.h>
-#include <android/hardware/broadcastradio/1.2/types.h>
+#include <android/hardware/broadcastradio/1.1/types.h>
 
 namespace android {
 namespace hardware {
 namespace broadcastradio {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 
 struct AmFmBandConfig {
     V1_0::Band type;
-    uint32_t lowerLimit;  // kHz
-    uint32_t upperLimit;  // kHz
+    uint32_t lowerLimit;             // kHz
+    uint32_t upperLimit;             // kHz
     std::vector<uint32_t> spacings;  // kHz
 };
 
@@ -73,9 +73,9 @@
 };
 
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_2_BROADCASTRADIO_H
+#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIO_H
diff --git a/broadcastradio/1.2/default/BroadcastRadioFactory.cpp b/broadcastradio/1.1/default/BroadcastRadioFactory.cpp
similarity index 97%
rename from broadcastradio/1.2/default/BroadcastRadioFactory.cpp
rename to broadcastradio/1.1/default/BroadcastRadioFactory.cpp
index 8f17aff..aecc967 100644
--- a/broadcastradio/1.2/default/BroadcastRadioFactory.cpp
+++ b/broadcastradio/1.1/default/BroadcastRadioFactory.cpp
@@ -25,7 +25,7 @@
 namespace android {
 namespace hardware {
 namespace broadcastradio {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 
 using V1_0::Class;
@@ -57,7 +57,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android
diff --git a/broadcastradio/1.2/default/BroadcastRadioFactory.h b/broadcastradio/1.1/default/BroadcastRadioFactory.h
similarity index 77%
rename from broadcastradio/1.2/default/BroadcastRadioFactory.h
rename to broadcastradio/1.1/default/BroadcastRadioFactory.h
index c365ae0..62b65bc 100644
--- a/broadcastradio/1.2/default/BroadcastRadioFactory.h
+++ b/broadcastradio/1.1/default/BroadcastRadioFactory.h
@@ -13,17 +13,17 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_2_BROADCASTRADIOFACTORY_H
-#define ANDROID_HARDWARE_BROADCASTRADIO_V1_2_BROADCASTRADIOFACTORY_H
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIOFACTORY_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIOFACTORY_H
 
 #include <android/hardware/broadcastradio/1.1/IBroadcastRadio.h>
-#include <android/hardware/broadcastradio/1.2/IBroadcastRadioFactory.h>
-#include <android/hardware/broadcastradio/1.2/types.h>
+#include <android/hardware/broadcastradio/1.1/IBroadcastRadioFactory.h>
+#include <android/hardware/broadcastradio/1.1/types.h>
 
 namespace android {
 namespace hardware {
 namespace broadcastradio {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 
 struct BroadcastRadioFactory : public IBroadcastRadioFactory {
@@ -37,9 +37,9 @@
 };
 
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_2_BROADCASTRADIOFACTORY_H
+#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_BROADCASTRADIOFACTORY_H
diff --git a/broadcastradio/1.2/default/OWNERS b/broadcastradio/1.1/default/OWNERS
similarity index 100%
rename from broadcastradio/1.2/default/OWNERS
rename to broadcastradio/1.1/default/OWNERS
diff --git a/broadcastradio/1.2/default/Tuner.cpp b/broadcastradio/1.1/default/Tuner.cpp
similarity index 93%
rename from broadcastradio/1.2/default/Tuner.cpp
rename to broadcastradio/1.1/default/Tuner.cpp
index e95a132..2be070d 100644
--- a/broadcastradio/1.2/default/Tuner.cpp
+++ b/broadcastradio/1.1/default/Tuner.cpp
@@ -17,8 +17,8 @@
 #define LOG_TAG "BroadcastRadioDefault.tuner"
 #define LOG_NDEBUG 0
 
-#include "BroadcastRadio.h"
 #include "Tuner.h"
+#include "BroadcastRadio.h"
 
 #include <broadcastradio-utils-1x/Utils.h>
 #include <log/log.h>
@@ -26,7 +26,7 @@
 namespace android {
 namespace hardware {
 namespace broadcastradio {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 
 using namespace std::chrono_literals;
@@ -35,13 +35,13 @@
 using V1_0::BandConfig;
 using V1_0::Class;
 using V1_0::Direction;
+using V1_1::IdentifierType;
 using V1_1::ProgramInfo;
 using V1_1::ProgramInfoFlags;
 using V1_1::ProgramListResult;
 using V1_1::ProgramSelector;
 using V1_1::ProgramType;
 using V1_1::VendorKeyValue;
-using V1_2::IdentifierType;
 using utils::HalRevision;
 
 using std::chrono::milliseconds;
@@ -62,7 +62,6 @@
     : mClassId(classId),
       mCallback(callback),
       mCallback1_1(V1_1::ITunerCallback::castFrom(callback).withDefault(nullptr)),
-      mCallback1_2(V1_2::ITunerCallback::castFrom(callback).withDefault(nullptr)),
       mVirtualRadio(getRadio(classId)),
       mIsAnalogForced(false) {}
 
@@ -130,9 +129,7 @@
 }
 
 HalRevision Tuner::getHalRev() const {
-    if (mCallback1_2 != nullptr) {
-        return HalRevision::V1_2;
-    } else if (mCallback1_1 != nullptr) {
+    if (mCallback1_1 != nullptr) {
         return HalRevision::V1_1;
     } else {
         return HalRevision::V1_0;
@@ -282,7 +279,7 @@
             return Result::INVALID_ARGUMENTS;
         }
     } else if (programType == ProgramType::DAB) {
-        if (!utils::hasId(sel, IdentifierType::DAB_SID_EXT)) return Result::INVALID_ARGUMENTS;
+        if (!utils::hasId(sel, IdentifierType::DAB_SIDECC)) return Result::INVALID_ARGUMENTS;
     } else if (programType == ProgramType::DRMO) {
         if (!utils::hasId(sel, IdentifierType::DRMO_SERVICE_ID)) return Result::INVALID_ARGUMENTS;
     } else if (programType == ProgramType::SXM) {
@@ -386,24 +383,8 @@
     return {};
 }
 
-Return<void> Tuner::setParameters(const hidl_vec<VendorKeyValue>& /* parameters */,
-        setParameters_cb _hidl_cb) {
-    ALOGV("%s", __func__);
-
-    _hidl_cb({});
-    return {};
-}
-
-Return<void> Tuner::getParameters(const hidl_vec<hidl_string>& /* keys */,
-        getParameters_cb _hidl_cb) {
-    ALOGV("%s", __func__);
-
-    _hidl_cb({});
-    return {};
-}
-
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android
diff --git a/broadcastradio/1.2/default/Tuner.h b/broadcastradio/1.1/default/Tuner.h
similarity index 79%
rename from broadcastradio/1.2/default/Tuner.h
rename to broadcastradio/1.1/default/Tuner.h
index 7e68354..764d5b3 100644
--- a/broadcastradio/1.2/default/Tuner.h
+++ b/broadcastradio/1.1/default/Tuner.h
@@ -13,19 +13,19 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_2_TUNER_H
-#define ANDROID_HARDWARE_BROADCASTRADIO_V1_2_TUNER_H
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_TUNER_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_TUNER_H
 
 #include "VirtualRadio.h"
 
-#include <android/hardware/broadcastradio/1.2/ITuner.h>
-#include <android/hardware/broadcastradio/1.2/ITunerCallback.h>
+#include <android/hardware/broadcastradio/1.1/ITuner.h>
+#include <android/hardware/broadcastradio/1.1/ITunerCallback.h>
 #include <broadcastradio-utils/WorkerThread.h>
 
 namespace android {
 namespace hardware {
 namespace broadcastradio {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 
 struct Tuner : public ITuner {
@@ -33,7 +33,7 @@
 
     void forceClose();
 
-    // V1_2::ITuner methods
+    // V1_1::ITuner methods
     virtual Return<Result> setConfiguration(const V1_0::BandConfig& config) override;
     virtual Return<void> getConfiguration(getConfiguration_cb _hidl_cb) override;
     virtual Return<Result> scan(V1_0::Direction direction, bool skipSubChannel) override;
@@ -49,10 +49,6 @@
                                         getProgramList_cb _hidl_cb) override;
     virtual Return<Result> setAnalogForced(bool isForced) override;
     virtual Return<void> isAnalogForced(isAnalogForced_cb _hidl_cb) override;
-    virtual Return<void> setParameters(const hidl_vec<V1_1::VendorKeyValue>& parameters,
-                                       setParameters_cb _hidl_cb) override;
-    virtual Return<void> getParameters(const hidl_vec<hidl_string>& keys,
-                                       getParameters_cb _hidl_cb) override;
 
    private:
     std::mutex mMut;
@@ -62,7 +58,6 @@
     V1_0::Class mClassId;
     const sp<V1_0::ITunerCallback> mCallback;
     const sp<V1_1::ITunerCallback> mCallback1_1;
-    const sp<V1_2::ITunerCallback> mCallback1_2;
 
     std::reference_wrapper<VirtualRadio> mVirtualRadio;
     bool mIsAmfmConfigSet = false;
@@ -77,9 +72,9 @@
 };
 
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_2_TUNER_H
+#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_TUNER_H
diff --git a/broadcastradio/1.2/default/VirtualProgram.cpp b/broadcastradio/1.1/default/VirtualProgram.cpp
similarity index 97%
rename from broadcastradio/1.2/default/VirtualProgram.cpp
rename to broadcastradio/1.1/default/VirtualProgram.cpp
index 3594f64..20dc1f5 100644
--- a/broadcastradio/1.2/default/VirtualProgram.cpp
+++ b/broadcastradio/1.1/default/VirtualProgram.cpp
@@ -22,7 +22,7 @@
 namespace android {
 namespace hardware {
 namespace broadcastradio {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 
 using std::vector;
@@ -30,9 +30,9 @@
 using V1_0::MetaData;
 using V1_0::MetadataKey;
 using V1_0::MetadataType;
+using V1_1::IdentifierType;
 using V1_1::ProgramInfo;
 using V1_1::VendorKeyValue;
-using V1_2::IdentifierType;
 using utils::HalRevision;
 
 static MetaData createDemoBitmap(MetadataKey key, HalRevision halRev) {
@@ -96,7 +96,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android
diff --git a/broadcastradio/1.2/default/VirtualProgram.h b/broadcastradio/1.1/default/VirtualProgram.h
similarity index 84%
rename from broadcastradio/1.2/default/VirtualProgram.h
rename to broadcastradio/1.1/default/VirtualProgram.h
index c0b20f0..fd7a5e7 100644
--- a/broadcastradio/1.2/default/VirtualProgram.h
+++ b/broadcastradio/1.1/default/VirtualProgram.h
@@ -13,16 +13,16 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_2_VIRTUALPROGRAM_H
-#define ANDROID_HARDWARE_BROADCASTRADIO_V1_2_VIRTUALPROGRAM_H
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_VIRTUALPROGRAM_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_VIRTUALPROGRAM_H
 
-#include <android/hardware/broadcastradio/1.2/types.h>
+#include <android/hardware/broadcastradio/1.1/types.h>
 #include <broadcastradio-utils-1x/Utils.h>
 
 namespace android {
 namespace hardware {
 namespace broadcastradio {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 
 /**
@@ -47,9 +47,9 @@
                                                     utils::HalRevision halRev);
 
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_2_VIRTUALPROGRAM_H
+#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_VIRTUALPROGRAM_H
diff --git a/broadcastradio/1.2/default/VirtualRadio.cpp b/broadcastradio/1.1/default/VirtualRadio.cpp
similarity index 98%
rename from broadcastradio/1.2/default/VirtualRadio.cpp
rename to broadcastradio/1.1/default/VirtualRadio.cpp
index 8988080..5b79155 100644
--- a/broadcastradio/1.2/default/VirtualRadio.cpp
+++ b/broadcastradio/1.1/default/VirtualRadio.cpp
@@ -24,7 +24,7 @@
 namespace android {
 namespace hardware {
 namespace broadcastradio {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 
 using V1_0::Band;
@@ -100,7 +100,7 @@
 }
 
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android
diff --git a/broadcastradio/1.2/default/VirtualRadio.h b/broadcastradio/1.1/default/VirtualRadio.h
similarity index 91%
rename from broadcastradio/1.2/default/VirtualRadio.h
rename to broadcastradio/1.1/default/VirtualRadio.h
index 8cfaefe..176b1b2 100644
--- a/broadcastradio/1.2/default/VirtualRadio.h
+++ b/broadcastradio/1.1/default/VirtualRadio.h
@@ -13,8 +13,8 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_2_VIRTUALRADIO_H
-#define ANDROID_HARDWARE_BROADCASTRADIO_V1_2_VIRTUALRADIO_H
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_VIRTUALRADIO_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_VIRTUALRADIO_H
 
 #include "VirtualProgram.h"
 
@@ -24,7 +24,7 @@
 namespace android {
 namespace hardware {
 namespace broadcastradio {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 
 /**
@@ -72,9 +72,9 @@
 VirtualRadio& getDigitalRadio();
 
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_2_VIRTUALRADIO_H
+#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_VIRTUALRADIO_H
diff --git a/broadcastradio/1.2/default/android.hardware.broadcastradio@1.2-service.rc b/broadcastradio/1.1/default/android.hardware.broadcastradio@1.1-service.rc
similarity index 83%
rename from broadcastradio/1.2/default/android.hardware.broadcastradio@1.2-service.rc
rename to broadcastradio/1.1/default/android.hardware.broadcastradio@1.1-service.rc
index 3741f21..7c57135 100644
--- a/broadcastradio/1.2/default/android.hardware.broadcastradio@1.2-service.rc
+++ b/broadcastradio/1.1/default/android.hardware.broadcastradio@1.1-service.rc
@@ -1,4 +1,4 @@
-service broadcastradio-hal /vendor/bin/hw/android.hardware.broadcastradio@1.2-service
+service broadcastradio-hal /vendor/bin/hw/android.hardware.broadcastradio@1.1-service
     class hal
     user audioserver
     group audio
diff --git a/broadcastradio/1.2/default/resources.h b/broadcastradio/1.1/default/resources.h
similarity index 89%
rename from broadcastradio/1.2/default/resources.h
rename to broadcastradio/1.1/default/resources.h
index b383c27..b7e709f 100644
--- a/broadcastradio/1.2/default/resources.h
+++ b/broadcastradio/1.1/default/resources.h
@@ -13,13 +13,13 @@
  * See the License for the specific language governing permissions and
  * limitations under the License.
  */
-#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_2_RESOURCES_H
-#define ANDROID_HARDWARE_BROADCASTRADIO_V1_2_RESOURCES_H
+#ifndef ANDROID_HARDWARE_BROADCASTRADIO_V1_1_RESOURCES_H
+#define ANDROID_HARDWARE_BROADCASTRADIO_V1_1_RESOURCES_H
 
 namespace android {
 namespace hardware {
 namespace broadcastradio {
-namespace V1_2 {
+namespace V1_1 {
 namespace implementation {
 namespace resources {
 
@@ -38,9 +38,9 @@
 
 }  // namespace resources
 }  // namespace implementation
-}  // namespace V1_2
+}  // namespace V1_1
 }  // namespace broadcastradio
 }  // namespace hardware
 }  // namespace android
 
-#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_2_RESOURCES_H
+#endif  // ANDROID_HARDWARE_BROADCASTRADIO_V1_1_RESOURCES_H
diff --git a/broadcastradio/1.2/default/service.cpp b/broadcastradio/1.1/default/service.cpp
similarity index 94%
rename from broadcastradio/1.2/default/service.cpp
rename to broadcastradio/1.1/default/service.cpp
index ea86fba..f8af0b7 100644
--- a/broadcastradio/1.2/default/service.cpp
+++ b/broadcastradio/1.1/default/service.cpp
@@ -22,7 +22,7 @@
 
 using android::hardware::configureRpcThreadpool;
 using android::hardware::joinRpcThreadpool;
-using android::hardware::broadcastradio::V1_2::implementation::BroadcastRadioFactory;
+using android::hardware::broadcastradio::V1_1::implementation::BroadcastRadioFactory;
 
 int main(int /* argc */, char** /* argv */) {
     configureRpcThreadpool(4, true);
diff --git a/broadcastradio/1.2/vts/OWNERS b/broadcastradio/1.2/vts/OWNERS
deleted file mode 100644
index 12adf57..0000000
--- a/broadcastradio/1.2/vts/OWNERS
+++ /dev/null
@@ -1,7 +0,0 @@
-# Automotive team
-egranata@google.com
-twasilczyk@google.com
-
-# VTS team
-yuexima@google.com
-yim@google.com
diff --git a/broadcastradio/1.2/vts/functional/Android.bp b/broadcastradio/1.2/vts/functional/Android.bp
deleted file mode 100644
index fd1c254..0000000
--- a/broadcastradio/1.2/vts/functional/Android.bp
+++ /dev/null
@@ -1,28 +0,0 @@
-//
-// Copyright (C) 2017 The Android Open Source Project
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//      http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-//
-
-cc_test {
-    name: "VtsHalBroadcastradioV1_2TargetTest",
-    defaults: ["VtsHalTargetTestDefaults"],
-    srcs: ["VtsHalBroadcastradioV1_2TargetTest.cpp"],
-    static_libs: [
-        "android.hardware.broadcastradio@1.0",
-        "android.hardware.broadcastradio@1.1",
-        "android.hardware.broadcastradio@1.2",
-        "android.hardware.broadcastradio@vts-utils-lib",
-        "libgmock",
-    ],
-}
diff --git a/broadcastradio/1.2/vts/functional/VtsHalBroadcastradioV1_2TargetTest.cpp b/broadcastradio/1.2/vts/functional/VtsHalBroadcastradioV1_2TargetTest.cpp
deleted file mode 100644
index 085206b..0000000
--- a/broadcastradio/1.2/vts/functional/VtsHalBroadcastradioV1_2TargetTest.cpp
+++ /dev/null
@@ -1,293 +0,0 @@
-/*
- * Copyright (C) 2017 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#define LOG_TAG "broadcastradio.vts"
-
-#include <VtsHalHidlTargetTestBase.h>
-#include <android-base/logging.h>
-#include <android/hardware/broadcastradio/1.1/IBroadcastRadio.h>
-#include <android/hardware/broadcastradio/1.2/IBroadcastRadioFactory.h>
-#include <android/hardware/broadcastradio/1.2/ITuner.h>
-#include <android/hardware/broadcastradio/1.2/ITunerCallback.h>
-#include <android/hardware/broadcastradio/1.2/types.h>
-#include <broadcastradio-vts-utils/call-barrier.h>
-#include <broadcastradio-vts-utils/mock-timeout.h>
-#include <broadcastradio-vts-utils/pointer-utils.h>
-#include <cutils/native_handle.h>
-#include <cutils/properties.h>
-#include <gmock/gmock.h>
-#include <hidl/HidlTransportSupport.h>
-#include <utils/threads.h>
-
-#include <chrono>
-
-namespace android {
-namespace hardware {
-namespace broadcastradio {
-namespace V1_2 {
-namespace vts {
-
-using namespace std::chrono_literals;
-
-using testing::_;
-using testing::AnyNumber;
-using testing::ByMove;
-using testing::DoAll;
-using testing::Invoke;
-using testing::SaveArg;
-
-using broadcastradio::vts::CallBarrier;
-using V1_0::BandConfig;
-using V1_0::Class;
-using V1_0::MetaData;
-using V1_0::MetadataKey;
-using V1_0::MetadataType;
-using V1_1::IBroadcastRadio;
-using V1_1::ProgramInfo;
-using V1_1::ProgramListResult;
-using V1_1::ProgramSelector;
-using V1_1::Properties;
-
-using broadcastradio::vts::clearAndWait;
-
-static constexpr auto kConfigTimeout = 10s;
-static constexpr auto kConnectModuleTimeout = 1s;
-
-static void printSkipped(std::string msg) {
-    std::cout << "[  SKIPPED ] " << msg << std::endl;
-}
-
-struct TunerCallbackMock : public ITunerCallback {
-    TunerCallbackMock() { EXPECT_CALL(*this, hardwareFailure()).Times(0); }
-
-    MOCK_METHOD0(hardwareFailure, Return<void>());
-    MOCK_TIMEOUT_METHOD2(configChange, Return<void>(Result, const BandConfig&));
-    MOCK_METHOD2(tuneComplete, Return<void>(Result, const V1_0::ProgramInfo&));
-    MOCK_TIMEOUT_METHOD2(tuneComplete_1_1, Return<void>(Result, const ProgramSelector&));
-    MOCK_METHOD1(afSwitch, Return<void>(const V1_0::ProgramInfo&));
-    MOCK_METHOD1(antennaStateChange, Return<void>(bool connected));
-    MOCK_METHOD1(trafficAnnouncement, Return<void>(bool active));
-    MOCK_METHOD1(emergencyAnnouncement, Return<void>(bool active));
-    MOCK_METHOD3(newMetadata, Return<void>(uint32_t ch, uint32_t subCh, const hidl_vec<MetaData>&));
-    MOCK_METHOD1(backgroundScanAvailable, Return<void>(bool));
-    MOCK_TIMEOUT_METHOD1(backgroundScanComplete, Return<void>(ProgramListResult));
-    MOCK_METHOD0(programListChanged, Return<void>());
-    MOCK_TIMEOUT_METHOD1(currentProgramInfoChanged, Return<void>(const ProgramInfo&));
-    MOCK_METHOD1(parametersUpdated, Return<void>(const hidl_vec<VendorKeyValue>& parameters));
-};
-
-class BroadcastRadioHalTest : public ::testing::VtsHalHidlTargetTestBase,
-                              public ::testing::WithParamInterface<Class> {
-   protected:
-    virtual void SetUp() override;
-    virtual void TearDown() override;
-
-    bool openTuner();
-
-    Class radioClass;
-    bool skipped = false;
-
-    sp<IBroadcastRadio> mRadioModule;
-    sp<ITuner> mTuner;
-    sp<TunerCallbackMock> mCallback = new TunerCallbackMock();
-
-   private:
-    const BandConfig& getBand(unsigned idx);
-
-    hidl_vec<BandConfig> mBands;
-};
-
-void BroadcastRadioHalTest::SetUp() {
-    radioClass = GetParam();
-
-    // lookup HIDL service
-    auto factory = getService<IBroadcastRadioFactory>();
-    ASSERT_NE(nullptr, factory.get());
-
-    // connect radio module
-    Result connectResult;
-    CallBarrier onConnect;
-    factory->connectModule(radioClass, [&](Result ret, const sp<V1_0::IBroadcastRadio>& radio) {
-        connectResult = ret;
-        if (ret == Result::OK) mRadioModule = IBroadcastRadio::castFrom(radio);
-        onConnect.call();
-    });
-    ASSERT_TRUE(onConnect.waitForCall(kConnectModuleTimeout));
-
-    if (connectResult == Result::INVALID_ARGUMENTS) {
-        printSkipped("This device class is not supported.");
-        skipped = true;
-        return;
-    }
-    ASSERT_EQ(connectResult, Result::OK);
-    ASSERT_NE(nullptr, mRadioModule.get());
-
-    // get module properties
-    Properties prop11;
-    auto& prop10 = prop11.base;
-    auto propResult =
-        mRadioModule->getProperties_1_1([&](const Properties& properties) { prop11 = properties; });
-
-    ASSERT_TRUE(propResult.isOk());
-    EXPECT_EQ(radioClass, prop10.classId);
-    EXPECT_GT(prop10.numTuners, 0u);
-    EXPECT_GT(prop11.supportedProgramTypes.size(), 0u);
-    EXPECT_GT(prop11.supportedIdentifierTypes.size(), 0u);
-    if (radioClass == Class::AM_FM) {
-        EXPECT_GT(prop10.bands.size(), 0u);
-    }
-    mBands = prop10.bands;
-}
-
-void BroadcastRadioHalTest::TearDown() {
-    mTuner.clear();
-    mRadioModule.clear();
-    clearAndWait(mCallback, 1s);
-}
-
-bool BroadcastRadioHalTest::openTuner() {
-    EXPECT_EQ(nullptr, mTuner.get());
-
-    if (radioClass == Class::AM_FM) {
-        EXPECT_TIMEOUT_CALL(*mCallback, configChange, Result::OK, _);
-    }
-
-    Result halResult = Result::NOT_INITIALIZED;
-    auto openCb = [&](Result result, const sp<V1_0::ITuner>& tuner) {
-        halResult = result;
-        if (result != Result::OK) return;
-        mTuner = ITuner::castFrom(tuner);
-    };
-    auto hidlResult = mRadioModule->openTuner(getBand(0), true, mCallback, openCb);
-
-    EXPECT_TRUE(hidlResult.isOk());
-    EXPECT_EQ(Result::OK, halResult);
-    EXPECT_NE(nullptr, mTuner.get());
-    if (radioClass == Class::AM_FM && mTuner != nullptr) {
-        EXPECT_TIMEOUT_CALL_WAIT(*mCallback, configChange, kConfigTimeout);
-
-        BandConfig halConfig;
-        Result halResult = Result::NOT_INITIALIZED;
-        mTuner->getConfiguration([&](Result result, const BandConfig& config) {
-            halResult = result;
-            halConfig = config;
-        });
-        EXPECT_EQ(Result::OK, halResult);
-        EXPECT_TRUE(halConfig.antennaConnected);
-    }
-
-    EXPECT_NE(nullptr, mTuner.get());
-    return nullptr != mTuner.get();
-}
-
-const BandConfig& BroadcastRadioHalTest::getBand(unsigned idx) {
-    static const BandConfig dummyBandConfig = {};
-
-    if (radioClass != Class::AM_FM) {
-        ALOGD("Not AM/FM radio, returning dummy band config");
-        return dummyBandConfig;
-    }
-
-    EXPECT_GT(mBands.size(), idx);
-    if (mBands.size() <= idx) {
-        ALOGD("Band index out of bound, returning dummy band config");
-        return dummyBandConfig;
-    }
-
-    auto& band = mBands[idx];
-    ALOGD("Returning %s band", toString(band.type).c_str());
-    return band;
-}
-
-/**
- * Test IBroadcastRadio::get|setParameters() methods called with no parameters.
- *
- * Verifies that:
- *  - callback is called for empty parameters set.
- */
-TEST_P(BroadcastRadioHalTest, NoParameters) {
-    if (skipped) return;
-
-    ASSERT_TRUE(openTuner());
-
-    hidl_vec<VendorKeyValue> halResults = {};
-    bool wasCalled = false;
-    auto cb = [&](hidl_vec<VendorKeyValue> results) {
-        wasCalled = true;
-        halResults = results;
-    };
-
-    auto hidlResult = mTuner->setParameters({}, cb);
-    ASSERT_TRUE(hidlResult.isOk());
-    ASSERT_TRUE(wasCalled);
-    ASSERT_EQ(0u, halResults.size());
-
-    wasCalled = false;
-    hidlResult = mTuner->getParameters({}, cb);
-    ASSERT_TRUE(hidlResult.isOk());
-    ASSERT_TRUE(wasCalled);
-    ASSERT_EQ(0u, halResults.size());
-}
-
-/**
- * Test IBroadcastRadio::get|setParameters() methods called with unknown parameters.
- *
- * Verifies that:
- *  - unknown parameters are ignored;
- *  - callback is called also for empty results set.
- */
-TEST_P(BroadcastRadioHalTest, UnknownParameters) {
-    if (skipped) return;
-
-    ASSERT_TRUE(openTuner());
-
-    hidl_vec<VendorKeyValue> halResults = {};
-    bool wasCalled = false;
-    auto cb = [&](hidl_vec<VendorKeyValue> results) {
-        wasCalled = true;
-        halResults = results;
-    };
-
-    auto hidlResult = mTuner->setParameters({{"com.google.unknown", "dummy"}}, cb);
-    ASSERT_TRUE(hidlResult.isOk());
-    ASSERT_TRUE(wasCalled);
-    ASSERT_EQ(0u, halResults.size());
-
-    wasCalled = false;
-    hidlResult = mTuner->getParameters({{"com.google.unknown*", "dummy"}}, cb);
-    ASSERT_TRUE(hidlResult.isOk());
-    ASSERT_TRUE(wasCalled);
-    ASSERT_EQ(0u, halResults.size());
-}
-
-// TODO(b/69860743): implement VerifyIdentifiersFormat test when
-// the new program list fetching mechanism is implemented
-
-INSTANTIATE_TEST_CASE_P(BroadcastRadioHalTestCases, BroadcastRadioHalTest,
-                        ::testing::Values(Class::AM_FM, Class::SAT, Class::DT));
-
-}  // namespace vts
-}  // namespace V1_2
-}  // namespace broadcastradio
-}  // namespace hardware
-}  // namespace android
-
-int main(int argc, char** argv) {
-  ::testing::InitGoogleTest(&argc, argv);
-  int status = RUN_ALL_TESTS();
-  ALOGI("Test result = %d", status);
-  return status;
-}
diff --git a/broadcastradio/common/tests/Android.bp b/broadcastradio/common/tests/Android.bp
index f6a3b6f..3ba31db 100644
--- a/broadcastradio/common/tests/Android.bp
+++ b/broadcastradio/common/tests/Android.bp
@@ -33,7 +33,7 @@
         "android.hardware.broadcastradio@common-utils-2x-lib",
     ],
     shared_libs: [
-        "android.hardware.broadcastradio@1.2",
+        "android.hardware.broadcastradio@1.1",
         "android.hardware.broadcastradio@2.0",
     ],
 }
diff --git a/broadcastradio/common/utils1x/Android.bp b/broadcastradio/common/utils1x/Android.bp
index 127c15a..443dca1 100644
--- a/broadcastradio/common/utils1x/Android.bp
+++ b/broadcastradio/common/utils1x/Android.bp
@@ -28,6 +28,6 @@
     ],
     export_include_dirs: ["include"],
     shared_libs: [
-        "android.hardware.broadcastradio@1.2",
+        "android.hardware.broadcastradio@1.1",
     ],
 }
diff --git a/broadcastradio/common/utils1x/Utils.cpp b/broadcastradio/common/utils1x/Utils.cpp
index 7a59d6a..9c2cc3d 100644
--- a/broadcastradio/common/utils1x/Utils.cpp
+++ b/broadcastradio/common/utils1x/Utils.cpp
@@ -26,10 +26,10 @@
 namespace utils {
 
 using V1_0::Band;
+using V1_1::IdentifierType;
 using V1_1::ProgramIdentifier;
 using V1_1::ProgramSelector;
 using V1_1::ProgramType;
-using V1_2::IdentifierType;
 
 static bool isCompatibleProgramType(const uint32_t ia, const uint32_t ib) {
     auto a = static_cast<ProgramType>(ia);
@@ -86,7 +86,7 @@
 
             return haveEqualIds(a, b, IdentifierType::AMFM_FREQUENCY);
         case ProgramType::DAB:
-            return haveEqualIds(a, b, IdentifierType::DAB_SID_EXT);
+            return haveEqualIds(a, b, IdentifierType::DAB_SIDECC);
         case ProgramType::DRMO:
             return haveEqualIds(a, b, IdentifierType::DRMO_SERVICE_ID);
         case ProgramType::SXM:
@@ -126,35 +126,21 @@
 
 static bool maybeGetId(const ProgramSelector& sel, const IdentifierType type, uint64_t* val) {
     auto itype = static_cast<uint32_t>(type);
-    auto itypeAlt = itype;
-    if (type == IdentifierType::DAB_SIDECC) {
-        itypeAlt = static_cast<uint32_t>(IdentifierType::DAB_SID_EXT);
-    }
-    if (type == IdentifierType::DAB_SID_EXT) {
-        itypeAlt = static_cast<uint32_t>(IdentifierType::DAB_SIDECC);
-    }
 
-    if (sel.primaryId.type == itype || sel.primaryId.type == itypeAlt) {
+    if (sel.primaryId.type == itype) {
         if (val) *val = sel.primaryId.value;
         return true;
     }
 
     // not optimal, but we don't care in default impl
-    bool gotAlt = false;
     for (auto&& id : sel.secondaryIds) {
         if (id.type == itype) {
             if (val) *val = id.value;
             return true;
         }
-        // alternative identifier is a backup, we prefer original value
-        if (id.type == itypeAlt) {
-            if (val) *val = id.value;
-            gotAlt = true;
-            continue;
-        }
     }
 
-    return gotAlt;
+    return false;
 }
 
 bool hasId(const ProgramSelector& sel, const IdentifierType type) {
diff --git a/broadcastradio/common/utils1x/include/broadcastradio-utils-1x/Utils.h b/broadcastradio/common/utils1x/include/broadcastradio-utils-1x/Utils.h
index 5884b5a..8ad7109 100644
--- a/broadcastradio/common/utils1x/include/broadcastradio-utils-1x/Utils.h
+++ b/broadcastradio/common/utils1x/include/broadcastradio-utils-1x/Utils.h
@@ -16,7 +16,7 @@
 #ifndef ANDROID_HARDWARE_BROADCASTRADIO_COMMON_UTILS_1X_H
 #define ANDROID_HARDWARE_BROADCASTRADIO_COMMON_UTILS_1X_H
 
-#include <android/hardware/broadcastradio/1.2/types.h>
+#include <android/hardware/broadcastradio/1.1/types.h>
 #include <chrono>
 #include <queue>
 #include <thread>
@@ -29,7 +29,7 @@
 enum class HalRevision : uint32_t {
     V1_0 = 1,
     V1_1,
-    V1_2,
+    V1_2,  // TODO(b/62945293): remove
 };
 
 /**
@@ -50,21 +50,21 @@
 bool isAm(const V1_0::Band band);
 bool isFm(const V1_0::Band band);
 
-bool hasId(const V1_1::ProgramSelector& sel, const V1_2::IdentifierType type);
+bool hasId(const V1_1::ProgramSelector& sel, const V1_1::IdentifierType type);
 
 /**
  * Returns ID (either primary or secondary) for a given program selector.
  *
  * If the selector does not contain given type, returns 0 and emits a warning.
  */
-uint64_t getId(const V1_1::ProgramSelector& sel, const V1_2::IdentifierType type);
+uint64_t getId(const V1_1::ProgramSelector& sel, const V1_1::IdentifierType type);
 
 /**
  * Returns ID (either primary or secondary) for a given program selector.
  *
  * If the selector does not contain given type, returns default value.
  */
-uint64_t getId(const V1_1::ProgramSelector& sel, const V1_2::IdentifierType type, uint64_t defval);
+uint64_t getId(const V1_1::ProgramSelector& sel, const V1_1::IdentifierType type, uint64_t defval);
 
 V1_1::ProgramSelector make_selector(V1_0::Band band, uint32_t channel, uint32_t subChannel = 0);