From 42d234e7b1a0e66298d5b4d1e615396fddd9f01b Mon Sep 17 00:00:00 2001 From: pjgowtham Date: Thu, 3 Oct 2024 10:53:29 +0530 Subject: [PATCH] overlay/sensors: Configure Doze brightness sensor Oplus doze brightness sensors either reports 0 or 1 0.0 - Dark environment 1.0 - Bright environment aod_light_mode value of 1 enables qcom,mdss-dsi-aod-low-mode-command and any other value would enable qcom,mdss-dsi-aod-high-mode-command Change-Id: I98e3ea6abe0375ca75dad1b82e0bc6a1551cbb0e --- aidl/sensors/HalProxyCallback.cpp | 10 +++++++++ ...hardware.sensors-service.oplus-multihal.rc | 3 +++ .../SystemUIResCommon/res/values/config.xml | 21 +++++++++++++++++++ 3 files changed, 34 insertions(+) diff --git a/aidl/sensors/HalProxyCallback.cpp b/aidl/sensors/HalProxyCallback.cpp index 36eaec6..17526c5 100644 --- a/aidl/sensors/HalProxyCallback.cpp +++ b/aidl/sensors/HalProxyCallback.cpp @@ -17,6 +17,7 @@ #include "HalProxyCallback.h" #include +#include namespace android { namespace hardware { @@ -66,6 +67,7 @@ std::vector HalProxyCallbackBase::processEvents(const std::vector eventsOut; + const char* aodLightModeNode = "/sys/kernel/oplus_display/aod_light_mode_set"; for (V2_1::Event event : events) { event.sensorHandle = setSubHalIndex(event.sensorHandle, mSubHalIndex); if (event.sensorType == V2_1::SensorType::DYNAMIC_SENSOR_META) { @@ -84,6 +86,14 @@ std::vector HalProxyCallbackBase::processEvents(const std::vector + + qti.sensor.lux_aod + true + + + -1 + -1 + + + + + -1 + -1 + +