a37dbb2a5a
* On OnePlus 7 series phones, the light sensor is placed under the display. This means that light from the display can affect the reading of the sensor, messing up the auto brightness algorithm. * This is an attempt to address this by reading the pixel values right around the sensor, estimate its brightness and substract it from the original readings. It requires the following properties to be set: - persist.vendor.sensors.light.location_{x,y} The position of the sensor in terms of the coordinates on screen - persist.vendor.sensors.light.full_white_reading The reading of the light sensor when all the pixels around it are white and with full brightness * This also depends on `libgui` from `frameworks/native` to be available in vendor namespace. The module was already part of VNDK in AOSP, but it's VNDK-SP which means it is not available to normal vendor HALs. For now, we can just patch the `Android.bp` of `libgui` to set `vendor_available: true`. |
||
---|---|---|
.. | ||
Android.bp | ||
Light.cpp | ||
Light.h | ||
android.hardware.light@2.0-service.oneplus_msmnile.rc | ||
service.cpp |