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

Commit 5fc97bb5 authored by Aaqib Ismail's avatar Aaqib Ismail
Browse files

Add HAL changes for BLIND_SPOT_WARNING_STATE

This property supports error states in addition to its own state.
This is why the comments mention two @data_enums for this property.
This works because states are integer values so as long as all states
have distinct integer values, this functions correctly.

Bug: 264946039
Test: atest VtsHalAutomotiveVehicle_TargetTest
Test: atest CtsCarTestCases:CarPropertyManagerTest
Test: atest CtsCarTestCases:VehiclePropertyIdsTest
Test: atest CtsCarTestCases:BlindSpotWarningStateTest
Test: atest AndroidCarApiTest:BlindSpotWarningStateTest
Change-Id: Idc64af44ecdf33ee5c89d3bf7d303498d80a0d14
parent 983fad40
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -242,6 +242,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyAccess> AccessForVehiclePrope
        {VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::FORWARD_COLLISION_WARNING_STATE, VehiclePropertyAccess::READ},
        {VehicleProperty::BLIND_SPOT_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::BLIND_SPOT_WARNING_STATE, VehiclePropertyAccess::READ},
        {VehicleProperty::LANE_DEPARTURE_WARNING_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::LANE_KEEP_ASSIST_ENABLED, VehiclePropertyAccess::READ_WRITE},
        {VehicleProperty::LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyAccess::READ_WRITE},
+1 −0
Original line number Diff line number Diff line
@@ -242,6 +242,7 @@ std::unordered_map<VehicleProperty, VehiclePropertyChangeMode> ChangeModeForVehi
        {VehicleProperty::FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::FORWARD_COLLISION_WARNING_STATE, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::BLIND_SPOT_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::BLIND_SPOT_WARNING_STATE, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::LANE_DEPARTURE_WARNING_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::LANE_KEEP_ASSIST_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
        {VehicleProperty::LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyChangeMode::ON_CHANGE},
+1 −0
Original line number Diff line number Diff line
@@ -234,6 +234,7 @@ public final class AccessForVehicleProperty {
        Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_STATE, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.BLIND_SPOT_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.BLIND_SPOT_WARNING_STATE, VehiclePropertyAccess.READ),
        Map.entry(VehicleProperty.LANE_DEPARTURE_WARNING_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.LANE_KEEP_ASSIST_ENABLED, VehiclePropertyAccess.READ_WRITE),
        Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyAccess.READ_WRITE),
+1 −0
Original line number Diff line number Diff line
@@ -234,6 +234,7 @@ public final class ChangeModeForVehicleProperty {
        Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
        Map.entry(VehicleProperty.FORWARD_COLLISION_WARNING_STATE, VehiclePropertyChangeMode.ON_CHANGE),
        Map.entry(VehicleProperty.BLIND_SPOT_WARNING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
        Map.entry(VehicleProperty.BLIND_SPOT_WARNING_STATE, VehiclePropertyChangeMode.ON_CHANGE),
        Map.entry(VehicleProperty.LANE_DEPARTURE_WARNING_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
        Map.entry(VehicleProperty.LANE_KEEP_ASSIST_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
        Map.entry(VehicleProperty.LANE_CENTERING_ASSIST_ENABLED, VehiclePropertyChangeMode.ON_CHANGE),
+3 −0
Original line number Diff line number Diff line
@@ -36,6 +36,7 @@ namespace jsonconfigloader_impl {

using ::aidl::android::hardware::automotive::vehicle::AccessForVehicleProperty;
using ::aidl::android::hardware::automotive::vehicle::AutomaticEmergencyBrakingState;
using ::aidl::android::hardware::automotive::vehicle::BlindSpotWarningState;
using ::aidl::android::hardware::automotive::vehicle::ChangeModeForVehicleProperty;
using ::aidl::android::hardware::automotive::vehicle::ErrorState;
using ::aidl::android::hardware::automotive::vehicle::EvConnectorType;
@@ -215,6 +216,8 @@ JsonValueParser::JsonValueParser() {
            std::make_unique<ConstantParser<AutomaticEmergencyBrakingState>>();
    mConstantParsersByType["ForwardCollisionWarningState"] =
            std::make_unique<ConstantParser<ForwardCollisionWarningState>>();
    mConstantParsersByType["BlindSpotWarningState"] =
            std::make_unique<ConstantParser<BlindSpotWarningState>>();
    mConstantParsersByType["Constants"] = std::make_unique<LocalVariableParser>();
}

Loading