android_device_oneplus_sm81.../lights
Peter Cai a37dbb2a5a
sm8150-common: sensors: calculate correction for light sensor
* 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`.
2019-06-27 14:06:45 +08:00
..
Android.bp [WIP, DO NOT MERGE] sm8150-common: build vendor image 2019-06-24 21:32:23 +08:00
Light.cpp
Light.h
android.hardware.light@2.0-service.oneplus_msmnile.rc sm8150-common: sensors: calculate correction for light sensor 2019-06-27 14:06:45 +08:00
service.cpp guacamole: lights: fix tag 2019-06-21 14:46:31 +08:00