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

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

Snap for 6640159 from d9573c1c to mainline-release

Change-Id: I080e9d999cfacbf0df050dd7fcb9715654fc010c
parents d9539e32 d9573c1c
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -2532,7 +2532,7 @@ enum VehicleProperty : int32_t {
     *
     * int32[0]: 42      // must match the request id from the request
     * int32[1]:  2      // action = InitialUserInfoResponseAction::CREATE
     * int32[2]: -1      // userToSwitchOrCreate.userId (not used as user will be created)
     * int32[2]: -10000  // userToSwitchOrCreate.userId (not used as user will be created)
     * int32[3]:  8      // userToSwitchOrCreate.flags = ADMIN
     * string: "||Owner" // userLocales + separator + userNameToCreate
     *
@@ -2541,7 +2541,8 @@ enum VehicleProperty : int32_t {
     * will use Android's default value), while the second value is the (also optional) name of the
     * to user to be created (when the type of response is InitialUserInfoResponseAction:CREATE).
     * For example, to create the same "Owner" user with "en-US" and "pt-BR" locales, the string
     * value of the response would be "en-US,pt-BR||Owner".
     * value of the response would be "en-US,pt-BR||Owner". As such, neither the locale nor the
     * name can have || on it, although a single | is fine.
     *
     * NOTE: if the HAL doesn't support user management, then it should not define this property,
     * which in turn would disable the other user-related properties (for example, the Android
@@ -2626,7 +2627,7 @@ enum VehicleProperty : int32_t {
     * int32[5]:  0   // current user flags (none)
     * int32[6]:  3   // number of users
     * int32[7]:  0   // 1st user (user 0)
     * int32[8]:  0   // 1st user flags (none)
     * int32[8]:  1   // 1st user flags (SYSTEM)
     * int32[9]:  10  // 2nd user (user 10)
     * int32[10]: 0   // 2nd user flags (none)
     * int32[11]: 11  // 3rd user (user 11)
@@ -2660,7 +2661,7 @@ enum VehicleProperty : int32_t {
     * identified the user as A.
     *
     * The HAL makes this request by a property change event (passing a negative request id), and
     * the Android system will response by issuye an ANDROID_POST_SWITCH call which the same
     * the Android system will response by issue an ANDROID_POST_SWITCH call which the same
     * request id.
     *
     * For example, if the current foreground Android user is 10 and the HAL asked it to switch to
@@ -2704,7 +2705,7 @@ enum VehicleProperty : int32_t {
     *    in the response are different (as the current user didn't change to the target).
     * 3. If a new switch request is made before the HAL responded to the previous one or before
     *    the user was unlocked, then the ANDROID_POST_SWITCH request is not made. For example,
     *    the driver could accidentally switch to the wrong user which has lock crentials, then
     *    the driver could accidentally switch to the wrong user which has lock credentials, then
     *    switch to the right one before entering the credentials.
     *
     * The HAL can update its internal state once it receives this request, but it doesn't need to
@@ -4389,16 +4390,16 @@ struct InitialUserInfoResponse {
     */
    UserInfo userToSwitchOrCreate;

    /**
     * Name of the user that should be created.
     */
    string userNameToCreate;

    /**
     * System locales of the initial user (value will be passed as-is to
     * android.provider.Settings.System.SYSTEM_LOCALES)
     */
    string userLocales;

    /**
     * Name of the user that should be created.
     */
    string userNameToCreate;
};

/**
+33 −45
Original line number Diff line number Diff line
@@ -18,6 +18,15 @@

#define ASSERT_OK(ret) ASSERT_TRUE(ret.isOk())

namespace {
const RadioAccessSpecifier GERAN_SPECIFIER_P900 = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
                                                   .geranBands = {GeranBands::BAND_P900},
                                                   .channels = {1, 2}};
const RadioAccessSpecifier GERAN_SPECIFIER_850 = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
                                                  .geranBands = {GeranBands::BAND_850},
                                                  .channels = {128, 129}};
}  // namespace

/*
 * Test IRadio.emergencyDial() for the response returned.
 */
@@ -199,14 +208,10 @@ TEST_P(RadioHidlTest_v1_4, setPreferredNetworkTypeBitmap) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan) {
    serial = GetRandomSerialNumber();

    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
                                      .channels = {1, 2}};

    ::android::hardware::radio::V1_2::NetworkScanRequest request = {
            .type = ScanType::ONE_SHOT,
            .interval = 60,
            .specifiers = {specifier},
            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
            .maxSearchTime = 60,
            .incrementalResults = false,
            .incrementalResultsPeriodicity = 1};
@@ -234,6 +239,11 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan) {
                           {RadioError::NONE, RadioError::OPERATION_NOT_ALLOWED,
                            RadioError::REQUEST_NOT_SUPPORTED}));
    }

    if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
        ALOGI("Stop Network Scan");
        stopNetworkScan();
    }
}

/*
@@ -270,14 +280,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidArgument) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval1) {
    serial = GetRandomSerialNumber();

    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
                                      .channels = {1, 2}};

    ::android::hardware::radio::V1_2::NetworkScanRequest request = {
            .type = ScanType::ONE_SHOT,
            .interval = 4,
            .specifiers = {specifier},
            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
            .maxSearchTime = 60,
            .incrementalResults = false,
            .incrementalResultsPeriodicity = 1};
@@ -307,14 +313,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval2) {
    serial = GetRandomSerialNumber();

    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
                                      .channels = {1, 2}};

    ::android::hardware::radio::V1_2::NetworkScanRequest request = {
            .type = ScanType::ONE_SHOT,
            .interval = 301,
            .specifiers = {specifier},
            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
            .maxSearchTime = 60,
            .incrementalResults = false,
            .incrementalResultsPeriodicity = 1};
@@ -343,14 +345,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidInterval2) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime1) {
    serial = GetRandomSerialNumber();

    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
                                      .channels = {1, 2}};

    ::android::hardware::radio::V1_2::NetworkScanRequest request = {
            .type = ScanType::ONE_SHOT,
            .interval = 60,
            .specifiers = {specifier},
            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
            .maxSearchTime = 59,
            .incrementalResults = false,
            .incrementalResultsPeriodicity = 1};
@@ -379,14 +377,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime2) {
    serial = GetRandomSerialNumber();

    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
                                      .channels = {1, 2}};

    ::android::hardware::radio::V1_2::NetworkScanRequest request = {
            .type = ScanType::ONE_SHOT,
            .interval = 60,
            .specifiers = {specifier},
            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
            .maxSearchTime = 3601,
            .incrementalResults = false,
            .incrementalResultsPeriodicity = 1};
@@ -415,14 +409,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidMaxSearchTime2) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity1) {
    serial = GetRandomSerialNumber();

    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
                                      .channels = {1, 2}};

    ::android::hardware::radio::V1_2::NetworkScanRequest request = {
            .type = ScanType::ONE_SHOT,
            .interval = 60,
            .specifiers = {specifier},
            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
            .maxSearchTime = 600,
            .incrementalResults = true,
            .incrementalResultsPeriodicity = 0};
@@ -451,14 +441,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity2) {
    serial = GetRandomSerialNumber();

    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
                                      .channels = {1, 2}};

    ::android::hardware::radio::V1_2::NetworkScanRequest request = {
            .type = ScanType::ONE_SHOT,
            .interval = 60,
            .specifiers = {specifier},
            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
            .maxSearchTime = 600,
            .incrementalResults = true,
            .incrementalResultsPeriodicity = 11};
@@ -487,14 +473,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_InvalidPeriodicity2) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest1) {
    serial = GetRandomSerialNumber();

    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
                                      .channels = {1, 2}};

    ::android::hardware::radio::V1_2::NetworkScanRequest request = {
            .type = ScanType::ONE_SHOT,
            .interval = 60,
            .specifiers = {specifier},
            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
            // Some vendor may not support max search time of 360s.
            // This issue is tracked in b/112205669.
            .maxSearchTime = 300,
@@ -518,6 +500,11 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest1) {
                           {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
                            RadioError::REQUEST_NOT_SUPPORTED}));
    }

    if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
        ALOGI("Stop Network Scan");
        stopNetworkScan();
    }
}

/*
@@ -526,14 +513,10 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest1) {
TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest2) {
    serial = GetRandomSerialNumber();

    RadioAccessSpecifier specifier = {.radioAccessNetwork = RadioAccessNetworks::GERAN,
                                      .geranBands = {GeranBands::BAND_450, GeranBands::BAND_480},
                                      .channels = {1, 2}};

    ::android::hardware::radio::V1_2::NetworkScanRequest request = {
            .type = ScanType::ONE_SHOT,
            .interval = 60,
            .specifiers = {specifier},
            .specifiers = {::GERAN_SPECIFIER_P900, ::GERAN_SPECIFIER_850},
            // Some vendor may not support max search time of 360s.
            // This issue is tracked in b/112205669.
            .maxSearchTime = 300,
@@ -559,6 +542,11 @@ TEST_P(RadioHidlTest_v1_4, startNetworkScan_GoodRequest2) {
                           {RadioError::NONE, RadioError::INVALID_ARGUMENTS,
                            RadioError::REQUEST_NOT_SUPPORTED}));
    }

    if (radioRsp_v1_4->rspInfo.error == RadioError::NONE) {
        ALOGI("Stop Network Scan");
        stopNetworkScan();
    }
}

/*
+6 −0
Original line number Diff line number Diff line
@@ -107,3 +107,9 @@ void RadioHidlTest_v1_4::updateSimCardStatus() {
    radio_v1_4->getIccCardStatus(serial);
    EXPECT_EQ(std::cv_status::no_timeout, wait());
}

void RadioHidlTest_v1_4::stopNetworkScan() {
    serial = GetRandomSerialNumber();
    radio_v1_4->stopNetworkScan(serial);
    EXPECT_EQ(std::cv_status::no_timeout, wait());
}
+4 −1
Original line number Diff line number Diff line
@@ -721,6 +721,9 @@ class RadioHidlTest_v1_4 : public ::testing::TestWithParam<std::string> {
    /* Update Sim Card Status */
    void updateSimCardStatus();

    /* Stop Network Scan Command */
    void stopNetworkScan();

  public:
    virtual void SetUp() override;

+128 −61

File changed.

Preview size limit exceeded, changes collapsed.

Loading