Change to using sysprop for libEGL and EGL_test
The configstore service was deprecated. So change to use sysprop
instead of configstore.
Bug: 124531214
Test: m -j && check reading system properties
Change-Id: I220094082a1d4ec4e7649ad0d9b614e0bcc334a6
diff --git a/opengl/libs/Android.bp b/opengl/libs/Android.bp
index e255b9d..19b8a58 100644
--- a/opengl/libs/Android.bp
+++ b/opengl/libs/Android.bp
@@ -154,6 +154,7 @@
"libnativebridge_lazy",
"libnativeloader_lazy",
"libutils",
+ "libSurfaceFlingerProp",
],
static_libs: [
"libEGL_getProcAddress",
@@ -165,6 +166,7 @@
symbol_file: "libEGL.map.txt",
versions: ["29"],
},
+ header_libs: ["libsurfaceflinger_headers"],
}
cc_test {
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
index a58e87c..d107d8e 100644
--- a/opengl/libs/EGL/egl_display.cpp
+++ b/opengl/libs/EGL/egl_display.cpp
@@ -31,6 +31,7 @@
#include "egl_object.h"
#include "egl_tls.h"
+#include <SurfaceFlingerProperties.h>
#include <android/dlext.h>
#include <dlfcn.h>
#include <graphicsenv/GraphicsEnv.h>
@@ -361,9 +362,7 @@
// Note: CDD requires that devices supporting wide color and/or HDR color also support
// the EGL_KHR_gl_colorspace extension.
- bool wideColorBoardConfig =
- getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasWideColorDisplay>(
- false);
+ bool wideColorBoardConfig = android::sysprop::has_wide_color_display(false);
// Add wide-color extensions if device can support wide-color
if (wideColorBoardConfig && hasColorSpaceSupport) {
@@ -373,8 +372,7 @@
"EGL_EXT_gl_colorspace_display_p3_passthrough ");
}
- bool hasHdrBoardConfig =
- getBool<ISurfaceFlingerConfigs, &ISurfaceFlingerConfigs::hasHDRDisplay>(false);
+ bool hasHdrBoardConfig = android::sysprop::has_HDR_display(false);
if (hasHdrBoardConfig && hasColorSpaceSupport) {
// hasHDRBoardConfig indicates the system is capable of supporting HDR content.