Skip to content

drm_hwcomposer: Fix build failure on Linux-native targets

Paz Zcharya requested to merge pazz1/drm-hwcomposer:build-fix into main

Commit e11f723f ("drm_hwcomposer: Query property when checking virtual displays availability") introduced a call to android::base::GetBoolProperty, which is only available in Android. This caused the test "hwcomposer.filegroups_build_test" to fail because the code was no longer compiling for Linux-native targets.

Fix that by replacing "android::base::GetBoolProperty" with a new function "property_get_bool," and define the function for both Android and non-Android targets: For Android, utilize the existing function from <cutils/properties.h> For other targets, a new implementation is provided in utils/properties.h.

Merge request reports

Loading