[ANAPIC Review] Remove config 1.3 hal
Bug: 183738012 Test: build Change-Id: Ie0eec5576d08ddcd9a8f5ee1a1d9e2b32772653e
This commit is contained in:
parent
c99bf00d21
commit
f03a62f25c
8 changed files with 29 additions and 69 deletions
|
@ -175,7 +175,7 @@ TEST_P(RadioHidlTest_v1_6, getSlicingConfig) {
|
|||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
|
||||
if (getRadioHalCapabilities().modemReducedFeatureSet1) {
|
||||
if (getRadioHalCapabilities()) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_6->rspInfo.error,
|
||||
{::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED}));
|
||||
|
@ -378,7 +378,7 @@ TEST_P(RadioHidlTest_v1_6, setNrDualConnectivityState) {
|
|||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
|
||||
if (getRadioHalCapabilities().modemReducedFeatureSet1) {
|
||||
if (getRadioHalCapabilities()) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_6->rspInfo.error,
|
||||
{::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED}));
|
||||
|
@ -403,7 +403,7 @@ TEST_P(RadioHidlTest_v1_6, isNrDualConnectivityEnabled) {
|
|||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
|
||||
if (getRadioHalCapabilities().modemReducedFeatureSet1) {
|
||||
if (getRadioHalCapabilities()) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_6->rspInfo.error,
|
||||
{::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED}));
|
||||
|
@ -429,7 +429,7 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) {
|
|||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
|
||||
if (getRadioHalCapabilities().modemReducedFeatureSet1) {
|
||||
if (getRadioHalCapabilities()) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_6->rspInfo.error,
|
||||
{::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED}));
|
||||
|
@ -449,7 +449,7 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) {
|
|||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
|
||||
if (getRadioHalCapabilities().modemReducedFeatureSet1) {
|
||||
if (getRadioHalCapabilities()) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_6->rspInfo.error,
|
||||
{::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED}));
|
||||
|
@ -469,7 +469,7 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) {
|
|||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
|
||||
if (getRadioHalCapabilities().modemReducedFeatureSet1) {
|
||||
if (getRadioHalCapabilities()) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_6->rspInfo.error,
|
||||
{::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED}));
|
||||
|
@ -488,7 +488,7 @@ TEST_P(RadioHidlTest_v1_6, setDataThrottling) {
|
|||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_v1_6->rspInfo.type);
|
||||
EXPECT_EQ(serial, radioRsp_v1_6->rspInfo.serial);
|
||||
if (getRadioHalCapabilities().modemReducedFeatureSet1) {
|
||||
if (getRadioHalCapabilities()) {
|
||||
ASSERT_TRUE(CheckAnyOfErrors(
|
||||
radioRsp_v1_6->rspInfo.error,
|
||||
{::android::hardware::radio::V1_6::RadioError::REQUEST_NOT_SUPPORTED}));
|
||||
|
|
|
@ -86,16 +86,14 @@ void RadioHidlTest_v1_6::getDataCallList() {
|
|||
* disabled.
|
||||
* <p/>
|
||||
* Typical usage within VTS:
|
||||
* if (getRadioHalCapabilities().modemReducedFeatureSet) return;
|
||||
* if (getRadioHalCapabilities()) return;
|
||||
*/
|
||||
HalDeviceCapabilities RadioHidlTest_v1_6::getRadioHalCapabilities() {
|
||||
bool RadioHidlTest_v1_6::getRadioHalCapabilities() {
|
||||
sp<::android::hardware::radio::config::V1_3::IRadioConfig> radioConfig_v1_3 =
|
||||
::android::hardware::radio::config::V1_3::IRadioConfig::getService();
|
||||
if (radioConfig_v1_3.get() == nullptr) {
|
||||
// If v1_3 isn't present, the values are initialized to false
|
||||
HalDeviceCapabilities radioHalCapabilities;
|
||||
memset(&radioHalCapabilities, 0, sizeof(radioHalCapabilities));
|
||||
return radioHalCapabilities;
|
||||
return false;
|
||||
} else {
|
||||
// Get radioHalDeviceCapabilities from the radio config
|
||||
sp<RadioConfigResponse> radioConfigRsp = new (std::nothrow) RadioConfigResponse(*this);
|
||||
|
@ -104,6 +102,6 @@ HalDeviceCapabilities RadioHidlTest_v1_6::getRadioHalCapabilities() {
|
|||
|
||||
radioConfig_v1_3->getHalDeviceCapabilities(serial);
|
||||
EXPECT_EQ(std::cv_status::no_timeout, wait());
|
||||
return radioConfigRsp->halDeviceCapabilities;
|
||||
return radioConfigRsp->modemReducedFeatureSet1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,14 +38,12 @@ using namespace ::android::hardware::radio::V1_3;
|
|||
using namespace ::android::hardware::radio::V1_2;
|
||||
using namespace ::android::hardware::radio::V1_1;
|
||||
using namespace ::android::hardware::radio::V1_0;
|
||||
using namespace ::android::hardware::radio::config::V1_3;
|
||||
|
||||
using ::android::sp;
|
||||
using ::android::hardware::hidl_string;
|
||||
using ::android::hardware::hidl_vec;
|
||||
using ::android::hardware::Return;
|
||||
using ::android::hardware::Void;
|
||||
using ::android::hardware::radio::config::V1_3::HalDeviceCapabilities;
|
||||
|
||||
#define MODEM_EMERGENCY_CALL_ESTABLISH_TIME 3
|
||||
#define MODEM_EMERGENCY_CALL_DISCONNECT_TIME 3
|
||||
|
@ -1115,7 +1113,7 @@ class RadioHidlTest_v1_6 : public ::testing::TestWithParam<std::string>,
|
|||
public:
|
||||
virtual void SetUp() override;
|
||||
|
||||
HalDeviceCapabilities getRadioHalCapabilities();
|
||||
bool getRadioHalCapabilities();
|
||||
|
||||
/* radio service handle */
|
||||
sp<::android::hardware::radio::V1_6::IRadio> radio_v1_6;
|
||||
|
|
|
@ -13,7 +13,6 @@ hidl_interface {
|
|||
name: "android.hardware.radio.config@1.3",
|
||||
root: "android.hardware",
|
||||
srcs: [
|
||||
"types.hal",
|
||||
"IRadioConfig.hal",
|
||||
"IRadioConfigResponse.hal",
|
||||
],
|
||||
|
|
|
@ -18,7 +18,6 @@ package android.hardware.radio.config@1.3;
|
|||
|
||||
import android.hardware.radio@1.6::RadioResponseInfo;
|
||||
import @1.2::IRadioConfigResponse;
|
||||
import HalDeviceCapabilities;
|
||||
|
||||
/**
|
||||
* Interface declaring response functions to solicited radio config requests.
|
||||
|
@ -26,8 +25,18 @@ import HalDeviceCapabilities;
|
|||
interface IRadioConfigResponse extends @1.2::IRadioConfigResponse {
|
||||
/**
|
||||
* @param info Response info struct containing response type, serial no. and error
|
||||
* @param capabilities Capabilities struct containing the capabilities of the
|
||||
* device related to the Radio HAL
|
||||
* @param modemReducedFeatureSet1 True indicates that the modem does NOT support the following
|
||||
* features.
|
||||
* - Providing either
|
||||
* android.hardware.radio@1.6::LinkCapacityEstimate:secondaryDownlinkCapacityKbps
|
||||
* or android.hardware.radio@1.6::LinkCapacityEstimate:secondaryUplinkCapacityKbps
|
||||
* when given from
|
||||
* android.hardware.radio@1.6::RadioIndication:currentLinkCapacityEstimate
|
||||
* - Calling android.hardware.radio@1.6::IRadio.setNrDualConnectivityState
|
||||
* or querying android.hardware.radio@1.6::IRadio.isNrDualConnectivityEnabled
|
||||
* - Requesting android.hardware.radio@1.6::IRadio.setDataThrottling()
|
||||
* - Providing android.hardware.radio@1.6::SlicingConfig through
|
||||
* android.hardware.radio@1.6::getSlicingConfig()
|
||||
*
|
||||
* Valid errors returned:
|
||||
* RadioError:NONE
|
||||
|
@ -35,5 +44,5 @@ interface IRadioConfigResponse extends @1.2::IRadioConfigResponse {
|
|||
* RadioError:INTERNAL_ERR
|
||||
*/
|
||||
oneway getHalDeviceCapabilitiesResponse(RadioResponseInfo info,
|
||||
HalDeviceCapabilities capabilities);
|
||||
bool modemReducedFeatureSet1);
|
||||
};
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
/*
|
||||
* Copyright (C) 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.
|
||||
*/
|
||||
|
||||
package android.hardware.radio.config@1.3;
|
||||
|
||||
/**
|
||||
* Contains the device capabilities with respect to the Radio HAL.
|
||||
*/
|
||||
struct HalDeviceCapabilities {
|
||||
/**
|
||||
* True indicates that the modem does NOT support the following features:
|
||||
* <ul>
|
||||
* <li>Providing either
|
||||
* android.hardware.radio@1.6::LinkCapacityEstimate:secondaryDownlinkCapacityKbps
|
||||
* or android.hardware.radio@1.6::LinkCapacityEstimate:secondaryUplinkCapacityKbps
|
||||
* when given from android.hardware.radio@1.6::RadioIndication:currentLinkCapacityEstimate
|
||||
* </li>
|
||||
* <li> calling android.hardware.radio@1.6::IRadio.setNrDualConnectivityState
|
||||
* or querying android.hardware.radio@1.6::IRadio.isNrDualConnectivityEnabled
|
||||
* </li>
|
||||
* <li>Requesting android.hardware.radio@1.6::IRadio.setDataThrottling()
|
||||
* </li>
|
||||
* <li>Providing android.hardware.radio@1.6::SlicingConfig through
|
||||
* android.hardware.radio@1.6::getSlicingConfig()
|
||||
* </li>
|
||||
* </ul>
|
||||
*/
|
||||
bool modemReducedFeatureSet1;
|
||||
};
|
|
@ -29,7 +29,6 @@
|
|||
#include <android/hardware/radio/config/1.2/types.h>
|
||||
#include <android/hardware/radio/config/1.3/IRadioConfig.h>
|
||||
#include <android/hardware/radio/config/1.3/IRadioConfigResponse.h>
|
||||
#include <android/hardware/radio/config/1.3/types.h>
|
||||
#include <gtest/gtest.h>
|
||||
#include <hidl/GtestPrinter.h>
|
||||
#include <hidl/ServiceManagement.h>
|
||||
|
@ -48,7 +47,6 @@ using ::android::hardware::radio::config::V1_1::ModemsConfig;
|
|||
using ::android::hardware::radio::config::V1_1::PhoneCapability;
|
||||
using ::android::hardware::radio::config::V1_2::IRadioConfigIndication;
|
||||
using ::android::hardware::radio::config::V1_2::SimSlotStatus;
|
||||
using ::android::hardware::radio::config::V1_3::HalDeviceCapabilities;
|
||||
using ::android::hardware::radio::config::V1_3::IRadioConfig;
|
||||
using ::android::hardware::radio::config::V1_3::IRadioConfigResponse;
|
||||
using ::android::hardware::radio::V1_0::RadioResponseInfo;
|
||||
|
@ -65,7 +63,7 @@ class RadioConfigResponse : public IRadioConfigResponse {
|
|||
public:
|
||||
RadioResponseInfo rspInfo;
|
||||
PhoneCapability phoneCap;
|
||||
HalDeviceCapabilities halDeviceCapabilities;
|
||||
bool modemReducedFeatureSet1;
|
||||
|
||||
RadioConfigResponse(RadioResponseWaiter& parent);
|
||||
virtual ~RadioConfigResponse() = default;
|
||||
|
@ -93,7 +91,7 @@ class RadioConfigResponse : public IRadioConfigResponse {
|
|||
|
||||
Return<void> getHalDeviceCapabilitiesResponse(
|
||||
const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
|
||||
const HalDeviceCapabilities& halDeviceCapabilities);
|
||||
bool modemReducedFeatureSet1);
|
||||
};
|
||||
|
||||
/* Callback class for radio config indication */
|
||||
|
|
|
@ -65,8 +65,8 @@ Return<void> RadioConfigResponse::setModemsConfigResponse(
|
|||
|
||||
Return<void> RadioConfigResponse::getHalDeviceCapabilitiesResponse(
|
||||
const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
|
||||
const ::android::hardware::radio::config::V1_3::HalDeviceCapabilities& capabilities) {
|
||||
halDeviceCapabilities = capabilities;
|
||||
bool modemReducedFeatures) {
|
||||
modemReducedFeatureSet1 = modemReducedFeatures;
|
||||
parent.notify(info.serial);
|
||||
return Void();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue