This is needed to upgrade the android_logger crate from 0.12.0
to 0.13.3.
with_max_level provides the same functionality as with_min_level.
The renaming is admittedly confusing, but the new name is accurate
and it makes sense that they deprecated and then removed the
previously poorly named with_min_level.
See crate documentation [1] and code [2].
[1]: https://docs.rs/android_logger/0.12.0/android_logger/struct.Config.html#method.with_min_level
[2]: https://docs.rs/android_logger/0.12.0/src/android_logger/lib.rs.html#227
Bug: 322718401
Test: build and run CF with the change.
Test: m aosp_cf_x86_64_phone
Change-Id: Ie410d871ccc2a083eec5bcb7e805f52b985b9385
Add a Light struct to the example service so it can hold a HwLight and
its associated HwLightState. Also added a HashMap of ids -> Light to the
LightService and updated the HAL methods implementation to make the
service stateful.
Now instantiating a LightService requires that a list of HwLights is
provided, so a default implementation was provided as a convenience. The
android.hardware.light rust API version had to be bumped since we rely
on new derive statements added to the AIDL files.
Tested: built VtsHalLightTargetTest and ran in Cuttlefish
Bug: 286106270
Change-Id: Id2b17a6a2290295c7b0b5405ac9815eaa28303c6
The new LightsService example is written in Rust and is being expanded
to include a state as part of the service. This required that HwLight
and HwLightState derived from the Copy and Clone traits, so here we are
updating the AIDL Rust bindings.
This is not an API change, so in order to avoid having to bump the AIDL
API version for this HAL we used the hash_gen.sh script as below:
$ m android.hardware.light-update-api
$ m android.hardware.light-freeze-api
$ vim light/aidl/Android.bp # removed frozen_api argument and the newly
created version 3 block
$ cp -r aidl_api/android.hardware.light/3/* aidl_api/android.hardware.light/2/
$ rm -rf aidl_api/android.hardware.light/3/
$ ./system/tools/aidl/build/hash_gen.sh \
hardware/interfaces/light/aidl/aidl_api/android.hardware.light/2/ \
1 \
hardware/interfaces/light/aidl/aidl_api/android.hardware.light/2/.hash
Tested: Verified that the build is passing and used with the next CL.
Bug: 286106270
Change-Id: I1400ec1db1e75595176a5656d6688df9457153d4
Add a re-implementation of the Lights HAL example service in Rust. This
was originally written as the start of a Cuttlefish specific
implementation of this service, but it's simple / small enough that
replacing the current Android C++ one with it shouldn't bring in any
trouble while providing yet another Rust service example to the tree.
Tested: built VtsHalLightTargetTest and ran in Cuttlefish
Bug: 286106270
(cherry picked from https://googleplex-android-review.googlesource.com/q/commit:a796fb113c405838424e61fd0b4cd6e0ef86c5a7)
Change-Id: I01eaf9ce7c6086e1429f52ff4f7f92cebc5360b6
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
In aosp/2167085, a few placeholder lights were added to the Light
HAL default implementation. However, the comment describing
this class still said that no lights would be reported. This
has been fixed.
Test: VtsHalLightTargetTest
Bug: 240485903
Change-Id: I3ad2e2000fb0db6a62835e621bc81d77308db140
Most of the VTS tests for the Light HAL involve looping over
the list of Light objects returned by Lights::getLights(), but
the current default implementation of this function returns no
Light objects. Lights::getLights() was changed to create a few
dummy Light objects when called. Lights::setLightStatus() was
also changed to determine whether a given Light id was created
by Lights::getLights() and thus valid or not.
Test: VtsHalLightTargetTest
Bug: 240485903
Change-Id: I5ad0bdfdccacc2bde80c2dd89eaa84702f22a7fb
Some are still in VNDK because they are used in other VNDK libs.
Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
Some are still in VNDK because they are used in other VNDK libs.
Ignore-AOSP-First: some libs are still in internal master only.
Bug: 234181591
Test: m
Merged-In: If999df9c78a20df931177da11742b1c5de19bc08
Change-Id: If999df9c78a20df931177da11742b1c5de19bc08
(cherry picked from commit 5527adfd7f)
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
Change-Id: Ibe8beeaf0d1b33968fb782f1f70c17ae9e9bf871
If a certain type of light isn't available, we want to indicate this,
but it isn't an error.
Bug: N/A (was asked to do this for some fixit)
Test: N/A
Change-Id: I69038964db22425a7e9b2c722ddd4f38bf5bea2e
Now that this works for VINTF modules, make sure we have at least one
example of it on AOSP.
Fixes: 161501127
Test: build only
Change-Id: Ib02d36d172ad6654b4b7fc424ca14bb90ee503d5
HIDL libs are not necessarily part of VNDK now. Because some are
used by VNDK libs, they are still VNDK. But rest are now just
vendor-available.
.hidl_for_test files are also removed because they are used to exclude
test-purpose hidl libs from VNDK libs.
Instead, .hidl_for_system_ext files are added to tests/lazy to
distinguish them from others which are installed /system.
Bug: 143933769
Test: update-makefiles.sh && m com.android.vndk.current
Merged-In: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
Change-Id: Ia81312dda340b6b5cbdd7a3c21e1d323bda39a4a
(cherry picked from commit b0907a6bb8)
AIDL interfaces which are vintf-stable have to be frozen in release.
But these interfaces have been never frozen, so freeze them.
- android.hardware.power
- android.hardware.identity
- android.hardware.keymaster
- android.hardware.vibrator
- android.hardware.light
- android.hardware.tests.extension.vibrator
Bug: 153500421
Bug: 153500550
Bug: 153511407
Bug: 153500549
Bug: 153501107
Bug: 153501202
Test: m
Change-Id: I643c25fc695f9d1e874dcceb327d465c49e9cab6
All aidl_interface modules should by default considered as stable, in
case it is used across system and vendor partitions, or across modules.
Like other API surfaces, we need to have a dump for the current
(yet-to-be-released) version and update it when there is an API change.
This is done via .
Then the owner of the interface can freeze the current version as a
numbered version via .
This change shal be rejected only when the owner is certain that the
interface is not used across the updatable boundaries.
Bug: 152655547
Test: m
Change-Id: If47c5982894dc99a7f2d1767d64be60b491842c7
Merged-In: If47c5982894dc99a7f2d1767d64be60b491842c7
Bug: 151896491
Test: local build
Exempt-From-Owner-Approval: This CL update suite name vts-core to vts as
the suite name is updated. This CL won't change test logic or behavior.
Change-Id: I562b4dc50765e953800a814a8fd84a01c1b9352b
Merged-In: I562b4dc50765e953800a814a8fd84a01c1b9352b
This is a revision of the previous 2.0 HIDL-based light HAL.
It accomplishes 2 goals:
1) Support more than 1 light for a given type. This allows Assistant to
use the HAL on TV platforms that have usually 4 indicator lights.
2) Use AIDL, which is the more modern way of writing HALs.
The previous HAL is in hardware/interfaces/light/2.0 and the new one is
in versioned as aidl, as that supports forward compatibility.
Test: atest VtsHalLightTargetTest
Bug: 142715294, 142230898
Change-Id: I6d8c12b3df88e02f2a0fff8b6aa8543372b510c8
Merged-In: I08d831ca0380d8bb187e43f6d5c214810ff72f50
Since these were combined into libhidlbase.
Bug: 135686713
Test: build only (libhwbinder/libhidltransport are empty)
Change-Id: I075670b64eebbbbd6a6ae0e84ad51bf1c6f5ba36
hidl-generated makefiles are now generated such that bpfmt(file) == file.
Bug: 67417008
Test: enable bpfmt hook
Change-Id: I1f69d292bc23a7cc293a66110cb02d597e1019ad
This change allows a device to include the lazy service implementation,
which will allow the HAL to exit when it is not in use.
Test: Manually observe brightness slider behavior
Change-Id: I7f8f747ebe6e183e1aaf1406852e6e26a97aee35
This was a temporary workaround in Android P, but it is fixed
with a relatively more dangerous change in libhwbinder.
This reverts commit 73ba34f1b7.
Bug: 77934844
Test: reboot device and watch for screen to get shutdown, check logs
Change-Id: I970144eea4acd8254f4a67ebe803f3c3eda9aba2
Delay starting the threadpool until necessary,
and once started, always exit with _exit().
Bug: 77934844
Test: screen is blanked on reboot
Change-Id: I7715d889a6f78b9ce058fb3841ef7944116d8e82
This is used to make the phone appear off by init
during late boot (e.x. fsck for disk health), so
it should shut off all lights (not just the screen).
Bug: 74976325
Test: blank_screen
Change-Id: I790cc3dd856c2c2095fa3cf82519fd30834304ca
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
This can be transitioned to by init to shutdown the
screen thereby preventing init from either depending
on binder or accessing halified sysnodes directly.
Bug: 70846424
Test: manual + init use
Change-Id: I86893ee5d7118547cd073297c0626e474f366b82