Remove access to the backlight brightness
* We don't need to set the display brightness at the moment, and
access to the brightness fd requires an SELinux policy change
that we'd like to avoid, so ifdef out the code for now.
Bug: None
Test: To be tested along with Nick's SELinux policy cl
Change-Id: Ic6de9a1bd15d0eab2780bda31ec67fab94f8d6da
diff --git a/libs/vr/libvrflinger/hardware_composer.cpp b/libs/vr/libvrflinger/hardware_composer.cpp
index e0b592e..cc08209 100644
--- a/libs/vr/libvrflinger/hardware_composer.cpp
+++ b/libs/vr/libvrflinger/hardware_composer.cpp
@@ -211,11 +211,15 @@
layer->Initialize(hwc2_hidl_.get(), &native_display_metrics_);
}
+#if ENABLE_BACKLIGHT_BRIGHTNESS
+ // TODO(hendrikw): This isn't required at the moment. It's possible that there
+ // is another method to access this when needed.
// Open the backlight brightness control sysfs node.
backlight_brightness_fd_ = LocalHandle(kBacklightBrightnessSysFile, O_RDWR);
ALOGW_IF(!backlight_brightness_fd_,
"HardwareComposer: Failed to open backlight brightness control: %s",
strerror(errno));
+#endif // ENABLE_BACKLIGHT_BRIGHTNESS
// Open the vsync event node for the primary display.
// TODO(eieio): Move this into a platform-specific class.