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

Commit 1bcf9dd3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add EVS_SERVICE_REQUEST property" into sc-dev

parents c3c6d96d b816f26b
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -996,6 +996,15 @@ const ConfigDeclaration kVehicleProperties[]{
                 },
         .initialValue = {.int32Values = {LIGHT_SWITCH_AUTO}}},

        {.config =
                 {
                         .prop = toInt(VehicleProperty::EVS_SERVICE_REQUEST),
                         .access = VehiclePropertyAccess::READ,
                         .changeMode = VehiclePropertyChangeMode::ON_CHANGE,
                 },
         .initialValue = {.int32Values = {toInt(EvsServiceType::REARVIEW),
                                          toInt(EvsServiceState::OFF)}}},

        {.config = {.prop = VEHICLE_MAP_SERVICE,
                    .access = VehiclePropertyAccess::READ_WRITE,
                    .changeMode = VehiclePropertyChangeMode::ON_CHANGE}},
+50 −0
Original line number Diff line number Diff line
@@ -2926,6 +2926,29 @@ enum VehicleProperty : int32_t {
        | VehiclePropertyType:MIXED
        | VehicleArea:GLOBAL),

    /**
     * Enable/request an EVS service.
     *
     * The property provides a generalized way to trigger EVS services.  VHAL
     * should use this property to request Android to start or stop EVS service.
     *
     *  int32Values[0] = a type of the EVS service. The value must be one of enums in
     *                   EvsServiceType.
     *  int32Values[1] = the state of the EVS service. The value must be one of enums in
     *                   EvsServiceState.
     *
     * For example, to enable rear view EVS service, android side can set the property value as
     * [EvsServiceType::REAR_VIEW, EvsServiceState::ON].
     *
     * @change_mode VehiclePropertyChangeMode:ON_CHANGE
     * @access VehiclePropertyAccess:READ
     */
    EVS_SERVICE_REQUEST = (
        0x0F10
        | VehiclePropertyGroup:SYSTEM
        | VehiclePropertyType:INT32_VEC
        | VehicleArea:GLOBAL),

    /**
     * Defines a request to apply power policy.
     *
@@ -3212,6 +3235,33 @@ enum VehicleSeatOccupancyState : int32_t {
    OCCUPIED = 2
};

/**
 * Used by EVS_SERVICE_REQUEST to enumerate the service's type.
 */
enum EvsServiceType : int32_t {

    REARVIEW = 0,
    SURROUNDVIEW = 1,
};

/**
 * Used by EVS_SERVICE_REQUEST to enumerate the service's state.
 */
enum EvsServiceState : int32_t {

    OFF = 0,
    ON = 1,
};

/**
 * Index in int32VAlues for VehicleProperty#EVS_SERVICE_REQUEST property.
 */
enum EvsServiceRequestIndex : int32_t {

    TYPE = 0,
    STATE = 1,
};

/**
 * Used by lights state properties to enumerate the current state of the lights.
 *