Merge "Changed value of "no user id" to -10000 (same as UserHandle.USER_NULL)."
diff --git a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleConnector.cpp b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleConnector.cpp
index 63ad93c..7f90914 100644
--- a/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleConnector.cpp
+++ b/automotive/vehicle/2.0/default/impl/vhal_v2_0/EmulatedVehicleConnector.cpp
@@ -311,6 +311,11 @@
// (even when explicitly calling setprop log.tag. As this class should be using ALOG instead of
// LOG, it's not worth investigating why...
+ if (value.value.int32Values.size() == 0) {
+ LOG(ERROR) << "set(INITIAL_USER_INFO): no int32values, ignoring it: " << toString(value);
+ return StatusCode::INVALID_ARG;
+ }
+
if (value.areaId != 0) {
LOG(INFO) << "set(INITIAL_USER_INFO) called from lshal; storing it: " << toString(value);
mInitialUserResponseFromCmd.reset(new VehiclePropValue(value));
@@ -318,10 +323,6 @@
}
LOG(INFO) << "set(INITIAL_USER_INFO) called from Android: " << toString(value);
- if (value.value.int32Values.size() == 0) {
- LOG(ERROR) << "invalid request (no requestId): " << toString(value);
- return StatusCode::INVALID_ARG;
- }
int32_t requestId = value.value.int32Values[0];
// Create the update property and set common values
diff --git a/current.txt b/current.txt
index f6659e3..7d67361 100644
--- a/current.txt
+++ b/current.txt
@@ -684,10 +684,10 @@
def77c7db95d374f11a111bfc4ed60f92451303642a43276c4e291988fcee625 android.hardware.wifi.supplicant@1.3::ISupplicantStaIfaceCallback
62cf050c593c1ec34b49178b5bdde72dd9b80d9bad3eb184e4f0cd564d28678c android.hardware.wifi.supplicant@1.3::ISupplicantStaNetwork
98592d193a717066facf91428426e5abe211e3bd718bc372e29fb944ddbe6e7c android.hardware.wifi.supplicant@1.3::types
-e1d34b83188a8ef3c507ec53c0ebcf714863c746da7f4a05460453f7c4c09389 android.hardware.radio@1.5::types
-8062d0a1a03594dd8b448adcf6f08856b5720f7e33f9b785a21d3ef74a4f211d android.hardware.radio@1.5::IRadio
+99f5c26b952271d1246c957e1d0271fa39445ee65cc93aa7c187834f98914a33 android.hardware.radio@1.5::types
+7fefa2cc5b3b3be10b5cff5c5dc195385f491d4bf23ca65f9c6b3c30c8753a33 android.hardware.radio@1.5::IRadio
e96ae1c3a9c0689002ec2318e9c587f4f607c16a75a3cd38788b77eb91072021 android.hardware.radio@1.5::IRadioIndication
-c8a8e4c3998ebdf1c71ece2d3ecb033ae17798830bed4b30a53e5991aa219e3a android.hardware.radio@1.5::IRadioResponse
+829d3827eeb5a8f563e80fe627419b3231012fc02bc2e79782ec5e9ad9f799a4 android.hardware.radio@1.5::IRadioResponse
dcc8872337f0135e81970e1d8d5fd7139160dc80e9be76f0ae05290fa7e472b8 android.hardware.radio.config@1.3::types
a2977755bc5f1ef47f04b7f2400632efda6218e1515dba847da487145cfabc4f android.hardware.radio.config@1.3::IRadioConfig
742360c775313438b0f82256eac62fb5bbc76a6ae6f388573f3aa142fb2c1eea android.hardware.radio.config@1.3::IRadioConfigIndication
diff --git a/radio/1.5/IRadio.hal b/radio/1.5/IRadio.hal
index 2ec92e5..0b50436 100644
--- a/radio/1.5/IRadio.hal
+++ b/radio/1.5/IRadio.hal
@@ -69,6 +69,35 @@
SignalThresholdInfo signalThresholdInfo, AccessNetwork accessNetwork);
/**
+ * Sets the link capacity reporting criteria.
+ *
+ * The resulting reporting criteria are the AND of all the supplied criteria.
+ *
+ * Note: Reporting criteria must be individually set for each RAN. If unset, reporting criteria
+ * for that RAN are implementation-defined.
+ *
+ * Response callback is IRadioResponse.setLinkCapacityReportingCriteriaResponse_1_5().
+ *
+ * @param serial Serial number of request.
+ * @param hysteresisMs A hysteresis time in milliseconds to prevent flapping. A value of 0
+ * disables hysteresis.
+ * @param hysteresisDlKbps An interval in kbps defining the required magnitude change between DL
+ * reports. hysteresisDlKbps must be smaller than the smallest threshold delta. A value of 0
+ * disables hysteresis.
+ * @param hysteresisUlKbps An interval in kbps defining the required magnitude change between UL
+ * reports. hysteresisUlKbps must be smaller than the smallest threshold delta. A value of 0
+ * disables hysteresis.
+ * @param thresholdsDownlinkKbps A vector of trigger thresholds in kbps for downlink reports. A
+ * vector size of 0 disables the use of DL thresholds for reporting.
+ * @param thresholdsUplinkKbps A vector of trigger thresholds in kbps for uplink reports. A
+ * vector size of 0 disables the use of UL thresholds for reporting.
+ * @param accessNetwork The type of network for which to apply these thresholds.
+ */
+ oneway setLinkCapacityReportingCriteria_1_5(int32_t serial, int32_t hysteresisMs,
+ int32_t hysteresisDlKbps, int32_t hysteresisUlKbps, vec<int32_t> thresholdsDownlinkKbps,
+ vec<int32_t> thresholdsUplinkKbps, AccessNetwork accessNetwork);
+
+ /**
* Enable or disable UiccApplications on the SIM. If disabled:
* - Modem will not register on any network.
* - SIM must be PRESENT, and the IccId of the SIM must still be accessible.
diff --git a/radio/1.5/IRadioResponse.hal b/radio/1.5/IRadioResponse.hal
index 543f9b5..e87cad2 100644
--- a/radio/1.5/IRadioResponse.hal
+++ b/radio/1.5/IRadioResponse.hal
@@ -45,6 +45,17 @@
*
* Valid errors returned:
* RadioError:NONE
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INTERNAL_ERR
+ */
+ oneway setLinkCapacityReportingCriteriaResponse_1_5(RadioResponseInfo info);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
* RadioError:SIM_ABSENT
* RadioError:RADIO_NOT_AVAILABLE
* RadioError:INTERNAL_ERR
diff --git a/radio/1.5/types.hal b/radio/1.5/types.hal
index 448e5c8..4d3c2d5 100644
--- a/radio/1.5/types.hal
+++ b/radio/1.5/types.hal
@@ -156,7 +156,8 @@
enum AccessNetwork : @1.4::AccessNetwork {
/**
- * Next-Generation Radio Access Network (NGRAN)
+ * Next-Generation Radio Access Network (NGRAN).
+ * Note NGRAN is only for standalone mode. Non-standalone mode uses AccessNetwork EUTRAN.
*/
NGRAN = 6,
};
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
index 55a0a32..435bd23 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
+++ b/radio/1.5/vts/functional/radio_hidl_hal_api.cpp
@@ -310,6 +310,99 @@
}
/*
+ * Test IRadio.setLinkCapacityReportingCriteria_1_5() invalid hysteresisDlKbps
+ */
+TEST_F(RadioHidlTest_v1_5, setLinkCapacityReportingCriteria_1_5_invalidHysteresisDlKbps) {
+ serial = GetRandomSerialNumber();
+
+ Return<void> res = radio_v1_5->setLinkCapacityReportingCriteria_1_5(
+ serial, 5000,
+ 5000, // hysteresisDlKbps too big for thresholds delta
+ 100, {1000, 5000, 10000, 20000}, {500, 1000, 5000, 10000},
+ ::android::hardware::radio::V1_5::AccessNetwork::GERAN);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
+
+ ALOGI("setLinkCapacityReportingCriteria_1_5_invalidHysteresisDlKbps, rspInfo.error = %s\n",
+ toString(radioRsp_v1_5->rspInfo.error).c_str());
+ // Allow REQUEST_NOT_SUPPORTED as setLinkCapacityReportingCriteria_1_5() may not be supported
+ // for GERAN
+ ASSERT_TRUE(
+ CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
+ {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
+}
+
+/*
+ * Test IRadio.setLinkCapacityReportingCriteria_1_5() invalid hysteresisUlKbps
+ */
+TEST_F(RadioHidlTest_v1_5, setLinkCapacityReportingCriteria_1_5_invalidHysteresisUlKbps) {
+ serial = GetRandomSerialNumber();
+
+ Return<void> res = radio_v1_5->setLinkCapacityReportingCriteria_1_5(
+ serial, 5000, 500,
+ 1000, // hysteresisUlKbps too big for thresholds delta
+ {1000, 5000, 10000, 20000}, {500, 1000, 5000, 10000},
+ ::android::hardware::radio::V1_5::AccessNetwork::GERAN);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
+
+ ALOGI("setLinkCapacityReportingCriteria_1_5_invalidHysteresisUlKbps, rspInfo.error = %s\n",
+ toString(radioRsp_v1_5->rspInfo.error).c_str());
+ // Allow REQUEST_NOT_SUPPORTED as setLinkCapacityReportingCriteria_1_5() may not be supported
+ // for GERAN
+ ASSERT_TRUE(
+ CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
+ {RadioError::INVALID_ARGUMENTS, RadioError::REQUEST_NOT_SUPPORTED}));
+}
+
+/*
+ * Test IRadio.setLinkCapacityReportingCriteria_1_5() empty params
+ */
+TEST_F(RadioHidlTest_v1_5, setLinkCapacityReportingCriteria_1_5_emptyParams) {
+ serial = GetRandomSerialNumber();
+
+ Return<void> res = radio_v1_5->setLinkCapacityReportingCriteria_1_5(
+ serial, 0, 0, 0, {}, {}, ::android::hardware::radio::V1_5::AccessNetwork::GERAN);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
+
+ ALOGI("setLinkCapacityReportingCriteria_1_5_emptyParams, rspInfo.error = %s\n",
+ toString(radioRsp_v1_5->rspInfo.error).c_str());
+ // Allow REQUEST_NOT_SUPPORTED as setLinkCapacityReportingCriteria_1_5() may not be supported
+ // for GERAN
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
+ {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
+}
+
+/*
+ * Test IRadio.setLinkCapacityReportingCriteria_1_5() for GERAN
+ */
+TEST_F(RadioHidlTest_v1_5, setLinkCapacityReportingCriteria_1_5_Geran) {
+ serial = GetRandomSerialNumber();
+
+ Return<void> res = radio_v1_5->setLinkCapacityReportingCriteria_1_5(
+ serial, 5000, 500, 100, {1000, 5000, 10000, 20000}, {500, 1000, 5000, 10000},
+ ::android::hardware::radio::V1_5::AccessNetwork::GERAN);
+ ASSERT_OK(res);
+ EXPECT_EQ(std::cv_status::no_timeout, wait());
+ EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_5->rspInfo.type);
+ EXPECT_EQ(serial, radioRsp_v1_5->rspInfo.serial);
+
+ ALOGI("setLinkCapacityReportingCriteria_1_5_Geran, rspInfo.error = %s\n",
+ toString(radioRsp_v1_5->rspInfo.error).c_str());
+ // Allow REQUEST_NOT_SUPPORTED as setLinkCapacityReportingCriteria_1_5() may not be supported
+ // for GERAN
+ ASSERT_TRUE(CheckAnyOfErrors(radioRsp_v1_5->rspInfo.error,
+ {RadioError::NONE, RadioError::REQUEST_NOT_SUPPORTED}));
+}
+
+/*
* Test IRadio.enableUiccApplications() for the response returned.
* For SIM ABSENT case.
*/
diff --git a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
index caca777..01cf40a 100644
--- a/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
+++ b/radio/1.5/vts/functional/radio_hidl_hal_utils_v1_5.h
@@ -535,6 +535,8 @@
/* 1.5 Api */
Return<void> setSignalStrengthReportingCriteriaResponse_1_5(const RadioResponseInfo& info);
+ Return<void> setLinkCapacityReportingCriteriaResponse_1_5(const RadioResponseInfo& info);
+
Return<void> enableUiccApplicationsResponse(const RadioResponseInfo& info);
Return<void> areUiccApplicationsEnabledResponse(const RadioResponseInfo& info, bool enabled);
diff --git a/radio/1.5/vts/functional/radio_response.cpp b/radio/1.5/vts/functional/radio_response.cpp
index 7ad51ca..e4f9ce8 100644
--- a/radio/1.5/vts/functional/radio_response.cpp
+++ b/radio/1.5/vts/functional/radio_response.cpp
@@ -894,6 +894,13 @@
return Void();
}
+Return<void> RadioResponse_v1_5::setLinkCapacityReportingCriteriaResponse_1_5(
+ const RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_v1_5.notify(info.serial);
+ return Void();
+}
+
Return<void> RadioResponse_v1_5::enableUiccApplicationsResponse(const RadioResponseInfo& info) {
rspInfo = info;
parent_v1_5.notify(info.serial);
diff --git a/tv/tuner/1.0/config/tunerResourceManagerUseCaseConfig.xsd b/tv/tuner/1.0/config/tunerResourceManagerUseCaseConfig.xsd
new file mode 100644
index 0000000..45c01c1
--- /dev/null
+++ b/tv/tuner/1.0/config/tunerResourceManagerUseCaseConfig.xsd
@@ -0,0 +1,111 @@
+<?xml version="1.0"?>
+<!-- Copyright 2020 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.
+-->
+<xs:schema version="1.0"
+ xmlns:xs="http://www.w3.org/2001/XMLSchema">
+ <!-- List of the Tuner Resource Manager client use case priority hint. -->
+ <xs:simpleType name="version">
+ <xs:restriction base="xs:decimal">
+ <xs:enumeration value="1.0"/>
+ </xs:restriction>
+ </xs:simpleType>
+ <xs:complexType name="config">
+ <xs:sequence>
+ <xs:element name="useCaseDefault" type="useCaseDefault" minOccurs="1" maxOccurs="1"/>
+ <xs:element name="useCasePreDefined" type="useCasePreDefined" minOccurs="0" maxOccurs="5"/>
+ <xs:element name="useCaseVendor" type="useCaseVendor" minOccurs="0" maxOccurs="unbounded"/>
+ </xs:sequence>
+ <xs:attribute name="version" type="version"/>
+ </xs:complexType>
+
+ <xs:complexType name="useCaseDefault">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ useCaseDefault section:
+ Default value for predefined use cases priority hint.
+ "fgPriority": priority when the use case is in foreground.
+ "bgPriority": priority when the use case is in background.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="fgPriority" type="priority"/>
+ <xs:attribute name="bgPriority" type="priority"/>
+ </xs:complexType>
+
+ <xs:complexType name="useCasePreDefined">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ useCasePreDefined section:
+ A list of predefined use cases and their foreground/background priority hint.
+ Each use case has the following attributes:
+ "type": type of the use case. Pre-defined use cases start with "USE_CASE_"
+ and have been predefined in "predefinedUseCaseType".
+ "fgPriority": priority when the use case is in foreground.
+ "bgPriority": priority when the use case is in background.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="type" type="predefinedUseCaseType"/>
+ <xs:attribute name="fgPriority" type="priority"/>
+ <xs:attribute name="bgPriority" type="priority"/>
+ </xs:complexType>
+
+ <xs:complexType name="useCaseVendor">
+ <xs:annotation>
+ <xs:documentation xml:lang="en">
+ useCaseVendor section:
+ A list of vendor defined use cases and their foreground/background priority hint.
+ Each use case has the following attributes:
+ "type": type of the use case. Vendor defined use cases start with "VENDOR_USE_CASE_".
+ "fgPriority": priority when the use case is in foreground.
+ "bgPriority": priority when the use case is in background.
+ "id": Vendor defined use case must have an id greater than 1000 to be associated with.
+ </xs:documentation>
+ </xs:annotation>
+ <xs:attribute name="type" type="vendorUseCaseType"/>
+ <xs:attribute name="id" type="id"/>
+ <xs:attribute name="fgPriority" type="priority"/>
+ <xs:attribute name="bgPriority" type="priority"/>
+ </xs:complexType>
+
+ <xs:simpleType name="predefinedUseCaseType">
+ <xs:restriction base="xs:string">
+ <xs:enumeration value="USE_CASE_RECORD"/>
+ <xs:enumeration value="USE_CASE_LIVE"/>
+ <xs:enumeration value="USE_CASE_PLAYBACK"/>
+ <xs:enumeration value="USE_CASE_SCAN"/>
+ <xs:enumeration value="USE_CASE_BACKGROUND"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="vendorUseCaseType">
+ <xs:restriction base="xs:string">
+ <xs:pattern value="VENDOR_USE_CASE_[_A-Z0-9]+"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="priority">
+ <xs:restriction base="xs:integer">
+ <xs:minInclusive value="0"/>
+ <xs:maxInclusive value="1000"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:simpleType name="id">
+ <xs:restriction base="xs:integer">
+ <xs:minInclusive value="1001"/>
+ </xs:restriction>
+ </xs:simpleType>
+
+ <xs:element name="config" type="config"/>
+</xs:schema>
diff --git a/tv/tuner/1.0/config/tunerResourceManagerUseCaseConfigSample.xml b/tv/tuner/1.0/config/tunerResourceManagerUseCaseConfigSample.xml
new file mode 100644
index 0000000..938faeb
--- /dev/null
+++ b/tv/tuner/1.0/config/tunerResourceManagerUseCaseConfigSample.xml
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- Copyright 2020 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.
+-->
+<!-- A sample Tuner Resource Manager use case priority configuration xml -->
+<config version="1.0" xmlns:xi="http://www.w3.org/2001/XMLSchema">
+ <!-- useCaseDefault section:
+ Default value for predefined use cases priority hint.
+ "fgPriority": priority when the use case is in foreground. Value range [0-1000].
+ "bgPriority": priority when the use case is in background. Value range [0-1000].
+ -->
+ <useCaseDefault fgPriority="150" bgPriority="50"/>
+ <!-- useCasePreDefined section:
+ A list of predefined use cases and their foreground/background priority hint.
+ Each use case has the following attributes:
+ "type": type of the use case. Pre-defined use cases start with "USE_CASE_"
+ and could only use the types defined in "predefinedUseCaseType" in xsd.
+ "fgPriority": priority when the use case is in foreground. Value range [0-1000].
+ "bgPriority": priority when the use case is in background. Value range [0-1000].
+ -->
+ <useCasePreDefined type="USE_CASE_RECORD" fgPriority="600" bgPriority="500"/>
+ <useCasePreDefined type="USE_CASE_LIVE" fgPriority="490" bgPriority="400"/>
+ <useCasePreDefined type="USE_CASE_PLAYBACK" fgPriority="480" bgPriority="300"/>
+ <useCasePreDefined type="USE_CASE_SCAN" fgPriority="450" bgPriority="200"/>
+ <useCasePreDefined type="USE_CASE_BACKGROUND" fgPriority="180" bgPriority="100"/>
+ <!-- useCaseVendor section:
+ A list of vendor defined use cases and their foreground/background priority hint.
+ Each use case has the following attributes:
+ "type": type of the use case. Vendor defined use cases start with "VENDOR_USE_CASE_".
+ "fgPriority": priority when the use case is in foreground. Value range [0-1000].
+ "bgPriority": priority when the use case is in background. Value range [0-1000].
+ "id": Vendor defined use case must have an id greater than 1000 to be associated with.
+ -->
+ <useCaseVendor type="VENDOR_USE_CASE_SPECIAL_1" id="1001" fgPriority="300" bgPriority="80"/>
+ <useCaseVendor type="VENDOR_USE_CASE_SPECIAL_2" id="1002" fgPriority="200" bgPriority="40"/>
+</config>
diff --git a/wifi/supplicant/1.0/vts/functional/Android.bp b/wifi/supplicant/1.0/vts/functional/Android.bp
index 332ee4a..8013906 100644
--- a/wifi/supplicant/1.0/vts/functional/Android.bp
+++ b/wifi/supplicant/1.0/vts/functional/Android.bp
@@ -46,6 +46,8 @@
"VtsHalWifiSupplicantV1_0TargetTestUtil",
"android.hardware.wifi.supplicant@1.0",
"android.hardware.wifi.supplicant@1.1",
+ "android.hardware.wifi.supplicant@1.2",
+ "android.hardware.wifi.supplicant@1.3",
"android.hardware.wifi@1.0",
"libgmock",
"libwifi-system",
diff --git a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
index 52f77a1..5467e02 100644
--- a/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
+++ b/wifi/supplicant/1.0/vts/functional/supplicant_sta_network_hidl_test.cpp
@@ -19,6 +19,7 @@
#include <VtsCoreUtil.h>
#include <android/hardware/wifi/1.0/IWifi.h>
#include <android/hardware/wifi/supplicant/1.0/ISupplicantStaNetwork.h>
+#include <android/hardware/wifi/supplicant/1.3/ISupplicantStaNetwork.h>
#include <gtest/gtest.h>
#include <hidl/GtestPrinter.h>
#include <hidl/ServiceManagement.h>
@@ -93,6 +94,11 @@
EXPECT_TRUE(turnOnExcessiveLogging(supplicant_));
sta_network_ = createSupplicantStaNetwork(supplicant_);
ASSERT_NE(sta_network_.get(), nullptr);
+ /* variable used to check if the underlying HAL version is 1.3 or
+ * higher. This is to skip tests which are using deprecated methods.
+ */
+ v1_3 = ::android::hardware::wifi::supplicant::V1_3::
+ ISupplicantStaNetwork::castFrom(sta_network_);
ssid_.assign(kTestSsidStr, kTestSsidStr + strlen(kTestSsidStr));
}
@@ -114,6 +120,8 @@
});
}
+ sp<::android::hardware::wifi::supplicant::V1_3::ISupplicantStaNetwork>
+ v1_3 = nullptr;
bool isP2pOn_ = false;
sp<ISupplicant> supplicant_;
// ISupplicantStaNetwork object used for all tests in this fixture.
@@ -221,6 +229,9 @@
* SetGetKeyMgmt
*/
TEST_P(SupplicantStaNetworkHidlTest, SetGetKeyMgmt) {
+ if (v1_3 != nullptr) {
+ GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher";
+ }
sta_network_->setKeyMgmt(kTestKeyMgmt, [](const SupplicantStatus& status) {
EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
});
@@ -235,6 +246,9 @@
* SetGetProto
*/
TEST_P(SupplicantStaNetworkHidlTest, SetGetProto) {
+ if (v1_3 != nullptr) {
+ GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher";
+ }
sta_network_->setProto(kTestProto, [](const SupplicantStatus& status) {
EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
});
@@ -262,6 +276,9 @@
* SetGetGroupCipher
*/
TEST_P(SupplicantStaNetworkHidlTest, SetGetGroupCipher) {
+ if (v1_3 != nullptr) {
+ GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher";
+ }
sta_network_->setGroupCipher(
kTestGroupCipher, [](const SupplicantStatus& status) {
EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
@@ -277,6 +294,9 @@
* SetGetPairwiseCipher
*/
TEST_P(SupplicantStaNetworkHidlTest, SetGetPairwiseCipher) {
+ if (v1_3 != nullptr) {
+ GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher";
+ }
sta_network_->setPairwiseCipher(
kTestPairwiseCipher, [](const SupplicantStatus& status) {
EXPECT_EQ(SupplicantStatusCode::SUCCESS, status.code);
@@ -627,6 +647,9 @@
* Enable
*/
TEST_P(SupplicantStaNetworkHidlTest, Enable) {
+ if (v1_3 != nullptr) {
+ GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher";
+ }
// wpa_supplicant doesn't perform any connection initiation
// unless atleast the Ssid and Ket mgmt params are set.
sta_network_->setSsid(ssid_, [](const SupplicantStatus& status) {
@@ -654,6 +677,9 @@
* Disable
*/
TEST_P(SupplicantStaNetworkHidlTest, Disable) {
+ if (v1_3 != nullptr) {
+ GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher";
+ }
// wpa_supplicant doesn't perform any connection initiation
// unless atleast the Ssid and Ket mgmt params are set.
sta_network_->setSsid(ssid_, [](const SupplicantStatus& status) {
@@ -677,6 +703,9 @@
* Select.
*/
TEST_P(SupplicantStaNetworkHidlTest, Select) {
+ if (v1_3 != nullptr) {
+ GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher";
+ }
// wpa_supplicant doesn't perform any connection initiation
// unless atleast the Ssid and Ket mgmt params are set.
sta_network_->setSsid(ssid_, [](const SupplicantStatus& status) {
@@ -788,6 +817,9 @@
* GetWpsNfcConfigurationToken
*/
TEST_P(SupplicantStaNetworkHidlTest, GetWpsNfcConfigurationToken) {
+ if (v1_3 != nullptr) {
+ GTEST_SKIP() << "Skipping test since HAL is 1.3 or higher";
+ }
ASSERT_EQ(SupplicantStatusCode::SUCCESS,
HIDL_INVOKE(sta_network_, setSsid, ssid_).code);
ASSERT_EQ(SupplicantStatusCode::SUCCESS,
@@ -808,4 +840,4 @@
android::hardware::getAllHalInstanceNames(IWifi::descriptor)),
testing::ValuesIn(android::hardware::getAllHalInstanceNames(
ISupplicant::descriptor))),
- android::hardware::PrintInstanceTupleNameToString<>);
\ No newline at end of file
+ android::hardware::PrintInstanceTupleNameToString<>);