configstore: Add display configuration items
This adds to configstore@1.0 HAL two new configuration
items that indicate if the display support WideColor
or HDR.
Configuration is controlled by TARGET_HAS_WIDE_COLOR_DISPLAY
and TARGET_HAS_HDR_DISPLAY in the board config file.
Test: make tests in libs/gui/tests/
Test: adb sync
Test: adb shell /data/nativetest/libgui_test/libgui_test
Change-Id: I442febc602851577c470c038a7fbf056c8ed25a7
diff --git a/configstore/1.0/default/SurfaceFlingerConfigs.cpp b/configstore/1.0/default/SurfaceFlingerConfigs.cpp
index 0aeb4f5..035479c 100644
--- a/configstore/1.0/default/SurfaceFlingerConfigs.cpp
+++ b/configstore/1.0/default/SurfaceFlingerConfigs.cpp
@@ -49,6 +49,26 @@
return Void();
}
+Return<void> SurfaceFlingerConfigs::hasWideColorDisplay(hasWideColorDisplay_cb _hidl_cb) {
+ bool value = false;
+#ifdef HAS_WIDE_COLOR_DISPLAY
+ value = true;
+#endif
+ _hidl_cb({true, value});
+ LOG(INFO) << "SurfaceFlinger Display: " << (value ? "Wide Color" : "Standard Color");
+ return Void();
+}
+
+Return<void> SurfaceFlingerConfigs::hasHDRDisplay(hasHDRDisplay_cb _hidl_cb) {
+ bool value = false;
+#ifdef HAS_HDR_DISPLAY
+ value = true;
+#endif
+ _hidl_cb({true, value});
+ LOG(INFO) << "SurfaceFlinger Display: " << (value ? "HDR" : "SDR");
+ return Void();
+}
+
// Methods from ::android::hidl::base::V1_0::IBase follow.
ISurfaceFlingerConfigs* HIDL_FETCH_ISurfaceFlingerConfigs(const char* /* name */) {