lights aidl: Add required @Rust derive statements
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
(cherry picked from commit ea05baf338
)
This commit is contained in:
parent
7ab862b625
commit
017972d2d1
7 changed files with 7 additions and 6 deletions
|
@ -1 +1,2 @@
|
|||
c8b1e8ebb88c57dcb2c350a8d9b722e77dd864c8
|
||||
c7d3d941d303c70d1c22759a0b09e41930c1cddb
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.light;
|
||||
@VintfStability
|
||||
@RustDerive(Clone=true, Copy=true) @VintfStability
|
||||
parcelable HwLight {
|
||||
int id;
|
||||
int ordinal;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.light;
|
||||
@VintfStability
|
||||
@RustDerive(Clone=true, Copy=true) @VintfStability
|
||||
parcelable HwLightState {
|
||||
int color;
|
||||
android.hardware.light.FlashMode flashMode;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.light;
|
||||
@VintfStability
|
||||
@RustDerive(Clone=true, Copy=true) @VintfStability
|
||||
parcelable HwLight {
|
||||
int id;
|
||||
int ordinal;
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
// later when a module using the interface is updated, e.g., Mainline modules.
|
||||
|
||||
package android.hardware.light;
|
||||
@VintfStability
|
||||
@RustDerive(Clone=true, Copy=true) @VintfStability
|
||||
parcelable HwLightState {
|
||||
int color;
|
||||
android.hardware.light.FlashMode flashMode;
|
||||
|
|
|
@ -22,7 +22,7 @@ import android.hardware.light.LightType;
|
|||
* A description of a single light. Multiple lights can map to the same physical
|
||||
* LED. Separate physical LEDs are always represented by separate instances.
|
||||
*/
|
||||
@VintfStability
|
||||
@RustDerive(Clone=true, Copy=true) @VintfStability
|
||||
parcelable HwLight {
|
||||
/**
|
||||
* Integer ID used for controlling this light
|
||||
|
|
|
@ -25,7 +25,7 @@ import android.hardware.light.FlashMode;
|
|||
* Not all lights must support all parameters. If you
|
||||
* can do something backward-compatible, do it.
|
||||
*/
|
||||
@VintfStability
|
||||
@RustDerive(Clone=true, Copy=true) @VintfStability
|
||||
parcelable HwLightState {
|
||||
/**
|
||||
* The color of the LED in ARGB.
|
||||
|
|
Loading…
Reference in a new issue