drm_hwcomposer: hwc3: Fix build with Android-13
Account for differences in the Composer3 API between v1 and v2.
Change-Id: Ia8cbef19b5554467af15932afd842601d9d7f7a8
Signed-off-by: Roman Stratiienko <r.stratiienko@gmail.com>
diff --git a/hwc3/ComposerClient.cpp b/hwc3/ComposerClient.cpp
index 47ffc7e..0d3f9c0 100644
--- a/hwc3/ComposerClient.cpp
+++ b/hwc3/ComposerClient.cpp
@@ -154,7 +154,9 @@
// DisplayCommand and return.
case Composition::DISPLAY_DECORATION:
case Composition::SIDEBAND:
+#if __ANDROID_API__ >= 34
case Composition::REFRESH_RATE_INDICATOR:
+#endif
return false;
}
}
@@ -188,7 +190,9 @@
// Unsupported composition types.
case Composition::DISPLAY_DECORATION:
case Composition::SIDEBAND:
+#if __ANDROID_API__ >= 34
case Composition::REFRESH_RATE_INDICATOR:
+#endif
ALOGE("Unsupported composition type: %s",
toString(composition->composition).c_str());
return std::nullopt;
@@ -1242,6 +1246,8 @@
return ToBinderStatus(hwc3::Error::kUnsupported);
}
+#if __ANDROID_API__ >= 34
+
ndk::ScopedAStatus ComposerClient::getOverlaySupport(
OverlayProperties* /*out_overlay_properties*/) {
return ToBinderStatus(hwc3::Error::kUnsupported);
@@ -1263,6 +1269,8 @@
return ToBinderStatus(hwc3::Error::kUnsupported);
}
+#endif
+
#if __ANDROID_API__ >= 35
ndk::ScopedAStatus ComposerClient::getDisplayConfigurations(