The Light HAL implements a function getLights that returns a vector
of HwLight objects. This vector is called "lights" in Lights.cpp,
but it is called "types" in Lights.h. Lights.h has been changed to
call the vector "lights".
Test: VtsHalLightTargetTest
Change-Id: I1e567d1454d42e3efc0186cde8340c32e7f3456e
Signed-off-by: pix106 <sbordenave@gmail.com>
The ndk_platform backend will soon be deprecated because the ndk backend
can serve the same purpose. This is to eliminate the confusion about
having two variants (ndk and ndk_platform) for the same ndk backend.
Bug: 161456198
Test: m
Merged-In: I14a1c57bd06f1f2aa52491f779c7030d4de03547
Change-Id: I14a1c57bd06f1f2aa52491f779c7030d4de03547
Signed-off-by: pix106 <sbordenave@gmail.com>
* It fixes notification light
* Those were deleted in 4.19 LED changes
Signed-off-by: clarencelol <clarencekuiek@icloud.com>
Signed-off-by: pix106 <sbordenave@gmail.com>
* Re-apply old HIDL Light HAL changes
* Bring back set lcd backlight support, our devices doesn't support to set lcd backlight via hwcomposer
Co-authored-by: dianlujitao <dianlujitao@lineageos.org>
Signed-off-by: Ratoriku <a1063021545@gmail.com>
Change-Id: I1561545a2bc54c6e1b49af6d09b56db506afba5c
Signed-off-by: pix106 <sbordenave@gmail.com>
* Changes authored by dianlujitao in commits 7174356 ("Improve lights HAL") and
f8e30fd ("Fix battery light not lit after notification light off") are
adapted as following:
Type(HIDL) -> id(AIDL) in functions and maps
Note: Keep backlight in the map as per b9e44e5007, allowing SF to set backlight.
Co-authored-by: dianlujitao <dianlujitao@lineageos.org>
Change-Id: I8960a1fe0b44097e703f3f067d4e432a12d26fc3
Signed-off-by: pix106 <sbordenave@gmail.com>
Add Lights in list only if its corresponding function pointer is available.
Update map to store light id & function pointer.
For Invalid Id , return operation not supported.
Change-Id: Id89345fec8b1dfb89bcfbd71c56063707ba6bb2d
CRs-Fixed: 2709805
Signed-off-by: pix106 <sbordenave@gmail.com>
lights smart pointer was used without null pointer check.
This change adds null check.
Change-Id: Ifdd82290cfe4d7ca781adbed8c8a65961c70e244
Signed-off-by: pix106 <sbordenave@gmail.com>
This change add support for Light HAL Implementation using AIDL
Change-Id: I444994ff1a1ca22134e7ef6db13043fd2c06e8a8
Signed-off-by: pix106 <sbordenave@gmail.com>
The hal class is essentially triggered from the boot class, so it's
possible that the HAL starts before the permissions are set, and manual
intervention was added to deal with the issue. However, we can simply
move chown to an earlier stage to avoid playing with the workflow.
Change-Id: I189b247576151f76efaf26b2d266564dc7768fba
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: Iba2cd20b8b20fac3e7564de6b853b475fd4ebd2a
Signed-off-by: Subhajeet Muhuri <subhajeet.muhuri@gmail.com>
* squash from here
afafb3b3f3/light
* Added automatic max brightness detection
* Rework debug Statments
The xiaomi-sdm660-devs one created Led Light issues
Change-Id: Ie7b62a488770734e659f4db03436ebaa2f2f5f30
* Use libbase logging and file utils
* Read max brightness from sysfs
* Convert constants to constexpr
* Move helper functions to anonymous namespace
* Bug fixes
* Remove redundant chmod
* Start the service after permissions are set up because it reads max
brightness in constructor.
Change-Id: I145d393c785e182060c5651e796d489f8c4d697b
* To prevent property name collisions between properties of system and
vendor, 'vendor.' prefix must be added to a vendor HAL service name.
You can see the details in go/treble-sysprop-compatibility documents.
Test: succeeded building and tested on a sailfish device.
Bug: 36796459
Change-Id: I48e6ee0ae3fe401e39efb273256d991fac676357
Required because the lights need to be turned off late in boot
(e.x. during fsck for disk health), and before, blank_screen
accessing light encountered a race condition where if it didn't
get scheduled before all of the processes which were getting
shutdown were getting killed, the screen wouldn't blank.
Bug: 74976325
Test: adjusting brightness continues to work
Test: screen blanks during shutdown at the correct time
including when an artificial 5s delay is inserted when
the phone normally fscks (which can also be quick)
Change-Id: I57ebc11d7ecf57ee327c681455712f4b53de6fd3