From 8bd79e7262d93403885fa981293781e8e83af6fc Mon Sep 17 00:00:00 2001 From: Yu Shan Date: Wed, 21 Aug 2024 16:03:37 -0700 Subject: [PATCH] Update generated lib to backport PER_DISPLAY_MAX_BRIGHTNESS. Manually update generated VHAL libs to backport PER_DISPLAY_MAX_BRIGHTNESS. This is required otherwise it will be filtered out at DefaultVehicleHal layer if v3 version lib is used. Flag: EXEMPT HAL change Test: Manual test, verify PER_DISPLAY_MAX_BRIGHTNESS is not filtered. Bug: 361417708 Change-Id: I86f66ed8a9c775e03d7ad65b83d370c97dd38e76 --- .../3/cpp/AccessForVehicleProperty.h | 7 +++++ .../3/cpp/ChangeModeForVehicleProperty.h | 7 +++++ .../3/cpp/PerDisplayMaxBrightness.h | 26 +++++++++++++++++++ .../3/cpp/VersionForVehicleProperty.h | 7 +++++ .../3/java/AccessForVehicleProperty.java | 9 ++++++- .../3/java/ChangeModeForVehicleProperty.java | 9 ++++++- 6 files changed, 63 insertions(+), 2 deletions(-) create mode 100644 automotive/vehicle/aidl/generated_lib/3/cpp/PerDisplayMaxBrightness.h diff --git a/automotive/vehicle/aidl/generated_lib/3/cpp/AccessForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/3/cpp/AccessForVehicleProperty.h index 51a3025740..6f6c91c149 100644 --- a/automotive/vehicle/aidl/generated_lib/3/cpp/AccessForVehicleProperty.h +++ b/automotive/vehicle/aidl/generated_lib/3/cpp/AccessForVehicleProperty.h @@ -27,6 +27,10 @@ #include #include +// Start manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. +#include +// End manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + #include namespace aidl { @@ -302,6 +306,9 @@ std::unordered_map AccessForVehiclePrope {VehicleProperty::CROSS_TRAFFIC_MONITORING_WARNING_STATE, VehiclePropertyAccess::READ}, {VehicleProperty::LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess::READ_WRITE}, {VehicleProperty::LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyAccess::READ}, + // Start manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + {PER_DISPLAY_MAX_BRIGHTNESS, VehiclePropertyAccess::READ}, + // End manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. }; } // namespace vehicle diff --git a/automotive/vehicle/aidl/generated_lib/3/cpp/ChangeModeForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/3/cpp/ChangeModeForVehicleProperty.h index 60e9a72138..88f2f88ac3 100644 --- a/automotive/vehicle/aidl/generated_lib/3/cpp/ChangeModeForVehicleProperty.h +++ b/automotive/vehicle/aidl/generated_lib/3/cpp/ChangeModeForVehicleProperty.h @@ -27,6 +27,10 @@ #include #include +// Start manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. +#include +// End manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + #include namespace aidl { @@ -302,6 +306,9 @@ std::unordered_map ChangeModeForVehi {VehicleProperty::CROSS_TRAFFIC_MONITORING_WARNING_STATE, VehiclePropertyChangeMode::ON_CHANGE}, {VehicleProperty::LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE}, {VehicleProperty::LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyChangeMode::ON_CHANGE}, + // Start manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + {PER_DISPLAY_MAX_BRIGHTNESS, VehiclePropertyChangeMode::STATIC}, + // End manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. }; } // namespace vehicle diff --git a/automotive/vehicle/aidl/generated_lib/3/cpp/PerDisplayMaxBrightness.h b/automotive/vehicle/aidl/generated_lib/3/cpp/PerDisplayMaxBrightness.h new file mode 100644 index 0000000000..2b50db3531 --- /dev/null +++ b/automotive/vehicle/aidl/generated_lib/3/cpp/PerDisplayMaxBrightness.h @@ -0,0 +1,26 @@ +/* + * Copyright (C) 2024 The Android Open Source Project + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#pragma once + +#include + +namespace aidl::android::hardware::automotive::vehicle { + +// Same as VehicleProperty::PER_DISPLAY_MAX_BRIGHTNESS as defined in v4. +static constexpr VehicleProperty PER_DISPLAY_MAX_BRIGHTNESS = (VehicleProperty)0x11410F4E; + +} // namespace aidl::android::hardware::automotive::vehicle diff --git a/automotive/vehicle/aidl/generated_lib/3/cpp/VersionForVehicleProperty.h b/automotive/vehicle/aidl/generated_lib/3/cpp/VersionForVehicleProperty.h index 0e80bd85b2..0d242737d1 100644 --- a/automotive/vehicle/aidl/generated_lib/3/cpp/VersionForVehicleProperty.h +++ b/automotive/vehicle/aidl/generated_lib/3/cpp/VersionForVehicleProperty.h @@ -26,6 +26,10 @@ #include +// Start manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. +#include +// End manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + #include namespace aidl { @@ -301,6 +305,9 @@ std::unordered_map VersionForVehicleProperty = { {VehicleProperty::CROSS_TRAFFIC_MONITORING_WARNING_STATE, 3}, {VehicleProperty::LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED, 3}, {VehicleProperty::LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_STATE, 3}, + // Start manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + {PER_DISPLAY_MAX_BRIGHTNESS, 2}, + // End manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. }; } // namespace vehicle diff --git a/automotive/vehicle/aidl/generated_lib/3/java/AccessForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/3/java/AccessForVehicleProperty.java index afb6cab547..f899df84d7 100644 --- a/automotive/vehicle/aidl/generated_lib/3/java/AccessForVehicleProperty.java +++ b/automotive/vehicle/aidl/generated_lib/3/java/AccessForVehicleProperty.java @@ -28,6 +28,10 @@ import java.util.Map; public final class AccessForVehicleProperty { + // Start manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + private static final int PER_DISPLAY_MAX_BRIGHTNESS = 0x11410F4E; + // End manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + public static final Map values = Map.ofEntries( Map.entry(VehicleProperty.INFO_VIN, VehiclePropertyAccess.READ), Map.entry(VehicleProperty.INFO_MAKE, VehiclePropertyAccess.READ), @@ -294,7 +298,10 @@ public final class AccessForVehicleProperty { Map.entry(VehicleProperty.CROSS_TRAFFIC_MONITORING_ENABLED, VehiclePropertyAccess.READ_WRITE), Map.entry(VehicleProperty.CROSS_TRAFFIC_MONITORING_WARNING_STATE, VehiclePropertyAccess.READ), Map.entry(VehicleProperty.LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyAccess.READ_WRITE), - Map.entry(VehicleProperty.LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyAccess.READ) + Map.entry(VehicleProperty.LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyAccess.READ), + // Start manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + Map.entry(PER_DISPLAY_MAX_BRIGHTNESS, VehiclePropertyAccess.READ) + // End manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. ); } diff --git a/automotive/vehicle/aidl/generated_lib/3/java/ChangeModeForVehicleProperty.java b/automotive/vehicle/aidl/generated_lib/3/java/ChangeModeForVehicleProperty.java index 12aff40b34..09989bf73b 100644 --- a/automotive/vehicle/aidl/generated_lib/3/java/ChangeModeForVehicleProperty.java +++ b/automotive/vehicle/aidl/generated_lib/3/java/ChangeModeForVehicleProperty.java @@ -28,6 +28,10 @@ import java.util.Map; public final class ChangeModeForVehicleProperty { + // Start manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + private static final int PER_DISPLAY_MAX_BRIGHTNESS = 0x11410F4E; + // End manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + public static final Map values = Map.ofEntries( Map.entry(VehicleProperty.INFO_VIN, VehiclePropertyChangeMode.STATIC), Map.entry(VehicleProperty.INFO_MAKE, VehiclePropertyChangeMode.STATIC), @@ -294,7 +298,10 @@ public final class ChangeModeForVehicleProperty { Map.entry(VehicleProperty.CROSS_TRAFFIC_MONITORING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE), Map.entry(VehicleProperty.CROSS_TRAFFIC_MONITORING_WARNING_STATE, VehiclePropertyChangeMode.ON_CHANGE), Map.entry(VehicleProperty.LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE), - Map.entry(VehicleProperty.LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyChangeMode.ON_CHANGE) + Map.entry(VehicleProperty.LOW_SPEED_AUTOMATIC_EMERGENCY_BRAKING_STATE, VehiclePropertyChangeMode.ON_CHANGE), + // Start manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. + Map.entry(PER_DISPLAY_MAX_BRIGHTNESS, VehiclePropertyChangeMode.STATIC) + // End manual edit: backport PER_DISPLAY_MAX_BRIGHTNESS. ); }