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

Commit cfc672ed authored by android-build-team Robot's avatar android-build-team Robot
Browse files

Snap for 7199033 from 6d52732d to sc-v2-release

Change-Id: I919f9f9ba5531a1815980d2ea90f61bbb4d5a23e
parents 6936081d 6d52732d
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.
 *
+2 −0
Original line number Diff line number Diff line
@@ -43,6 +43,8 @@ cc_test {
    ],
    static_libs: [
        "android.hardware.radio@1.0",
        "android.hardware.radio@1.1",
        "android.hardware.radio@1.2",
    ],
    test_config: "vts_hal_radio_target_test.xml",
    test_suites: [
+7 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */

#include <android-base/logging.h>
#include <android/hardware/radio/1.2/IRadio.h>
#include <radio_hidl_hal_utils_v1_0.h>

using namespace ::android::hardware::radio::V1_0;
@@ -139,6 +140,9 @@ TEST_P(RadioHidlTest, setupDataCall) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
    EXPECT_EQ(serial, radioRsp->rspInfo.serial);

    // setupDataCall is deprecated on radio::V1_2 with setupDataCall_1_2
    SKIP_TEST_IF_REQUEST_NOT_SUPPORTED_WITH_HAL_VERSION_AT_LEAST(1_2);

    if (cardStatus.cardState == CardState::ABSENT) {
        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
                                     {RadioError::NONE, RadioError::OP_NOT_ALLOWED_BEFORE_REG_TO_NW,
@@ -164,6 +168,9 @@ TEST_P(RadioHidlTest, deactivateDataCall) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
    EXPECT_EQ(serial, radioRsp->rspInfo.serial);

    // deactivateDataCall is deprecated on radio::V1_2 with deactiveDataCall_1_2
    SKIP_TEST_IF_REQUEST_NOT_SUPPORTED_WITH_HAL_VERSION_AT_LEAST(1_2);

    if (cardStatus.cardState == CardState::ABSENT) {
        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
                                     {RadioError::NONE, RadioError::RADIO_NOT_AVAILABLE,
+16 −0
Original line number Diff line number Diff line
@@ -15,6 +15,7 @@
 */

#include <android-base/logging.h>
#include <android/hardware/radio/1.2/IRadio.h>
#include <radio_hidl_hal_utils_v1_0.h>

/*
@@ -771,6 +772,9 @@ TEST_P(RadioHidlTest, startLceService) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
    EXPECT_EQ(serial, radioRsp->rspInfo.serial);

    // HAL 1.2 and later use the always-on LCE that relies on indications.
    SKIP_TEST_IF_REQUEST_NOT_SUPPORTED_WITH_HAL_VERSION_AT_LEAST(1_2);

    if (cardStatus.cardState == CardState::ABSENT) {
        ASSERT_TRUE(CheckAnyOfErrors(
            radioRsp->rspInfo.error,
@@ -792,6 +796,9 @@ TEST_P(RadioHidlTest, stopLceService) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
    EXPECT_EQ(serial, radioRsp->rspInfo.serial);

    // HAL 1.2 and later use the always-on LCE that relies on indications.
    SKIP_TEST_IF_REQUEST_NOT_SUPPORTED_WITH_HAL_VERSION_AT_LEAST(1_2);

    if (cardStatus.cardState == CardState::ABSENT) {
        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
                                     {RadioError::NONE, RadioError::LCE_NOT_SUPPORTED,
@@ -812,6 +819,9 @@ TEST_P(RadioHidlTest, pullLceData) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
    EXPECT_EQ(serial, radioRsp->rspInfo.serial);

    // HAL 1.2 and later use the always-on LCE that relies on indications.
    SKIP_TEST_IF_REQUEST_NOT_SUPPORTED_WITH_HAL_VERSION_AT_LEAST(1_2);

    if (cardStatus.cardState == CardState::ABSENT) {
        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
                                     {RadioError::NONE, RadioError::INTERNAL_ERR,
@@ -971,6 +981,9 @@ TEST_P(RadioHidlTest, setIndicationFilter) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
    EXPECT_EQ(serial, radioRsp->rspInfo.serial);

    // setIndicationFilter is deprecated on radio::V1_2 with setIndicationFilter_1_2
    SKIP_TEST_IF_REQUEST_NOT_SUPPORTED_WITH_HAL_VERSION_AT_LEAST(1_2);

    std::cout << static_cast<int>(radioRsp->rspInfo.error) << std::endl;

    if (cardStatus.cardState == CardState::ABSENT) {
@@ -992,6 +1005,9 @@ TEST_P(RadioHidlTest, setSimCardPower) {
    EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp->rspInfo.type);
    EXPECT_EQ(serial, radioRsp->rspInfo.serial);

    // setSimCardPower is deprecated on radio::V1_1 with setSimCardPower_1_1
    SKIP_TEST_IF_REQUEST_NOT_SUPPORTED_WITH_HAL_VERSION_AT_LEAST(1_1);

    if (cardStatus.cardState == CardState::ABSENT) {
        ASSERT_TRUE(CheckAnyOfErrors(radioRsp->rspInfo.error,
                                     {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
Loading