Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 017972d2 authored by Jesus Sanchez-Palencia's avatar Jesus Sanchez-Palencia Committed by CJ Fan
Browse files

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 ea05baf3)
parent 7ab862b6
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
c8b1e8ebb88c57dcb2c350a8d9b722e77dd864c8
c7d3d941d303c70d1c22759a0b09e41930c1cddb
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
+1 −1
Original line number Diff line number Diff line
@@ -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;
Loading