ThermalHAL: add BCL to temperature type

Bug: 116540200
Test: VTS test passed
Change-Id: I7cdf64a8ee55a9e14a9df673edaf25a5cd3a90d2
diff --git a/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp b/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp
index 535f618..cf1956d 100644
--- a/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp
+++ b/thermal/2.0/vts/functional/VtsHalThermalV2_0TargetTest.cpp
@@ -23,6 +23,7 @@
 #include <VtsHalHidlTargetTestEnvBase.h>
 
 using ::android::sp;
+using ::android::hardware::hidl_enum_range;
 using ::android::hardware::hidl_vec;
 using ::android::hardware::Return;
 using ::android::hardware::Void;
@@ -183,9 +184,8 @@
                                              EXPECT_NE(ThermalStatusCode::SUCCESS, status.code);
                                          }
                                      });
-    for (int i = static_cast<int>(TemperatureType::UNKNOWN);
-         i <= static_cast<int>(TemperatureType::POWER_AMPLIFIER); ++i) {
-        auto type = static_cast<TemperatureType>(i);
+    auto types = hidl_enum_range<TemperatureType>();
+    for (const auto& type : types) {
         mThermal->getCurrentTemperatures(
             true, type, [&type](ThermalStatus status, hidl_vec<Temperature> temperatures) {
                 if (temperatures.size()) {