Do not send HdrMetadata on older interface

Need to make sure composer@2.2 is supported before sending
HDR data across composer interface.
Test: boot
Bug: 74523164

Change-Id: I551c8568098990193309939483f10a30cc47350c
diff --git a/services/surfaceflinger/BufferLayer.cpp b/services/surfaceflinger/BufferLayer.cpp
index b804af8..d22c021 100644
--- a/services/surfaceflinger/BufferLayer.cpp
+++ b/services/surfaceflinger/BufferLayer.cpp
@@ -631,7 +631,7 @@
 
     const HdrMetadata& metadata = mConsumer->getCurrentHdrMetadata();
     error = hwcLayer->setHdrMetadata(metadata);
-    if (error != HWC2::Error::None) {
+    if (error != HWC2::Error::None && error != HWC2::Error::Unsupported) {
         ALOGE("[%s] Failed to set hdrMetadata: %s (%d)", mName.string(),
               to_string(error).c_str(), static_cast<int32_t>(error));
     }