Merge "Allow null DataProfileInfo for IA APN to clear" am: 02ab7331ac

Original change: https://android-review.googlesource.com/c/platform/hardware/interfaces/+/1965919

Change-Id: I99b86c295a954b3a6c4668d99cb490c1e9bc3503
This commit is contained in:
Sarah Chin 2022-01-29 02:02:15 +00:00 committed by Automerger Merge Worker
commit 126c2cdae1
4 changed files with 19 additions and 15 deletions

View file

@ -44,7 +44,7 @@ interface IRadioData {
oneway void setDataAllowed(in int serial, in boolean allow);
oneway void setDataProfile(in int serial, in android.hardware.radio.data.DataProfileInfo[] profiles);
oneway void setDataThrottling(in int serial, in android.hardware.radio.data.DataThrottlingAction dataThrottlingAction, in long completionDurationMillis);
oneway void setInitialAttachApn(in int serial, in android.hardware.radio.data.DataProfileInfo dataProfileInfo);
oneway void setInitialAttachApn(in int serial, in @nullable android.hardware.radio.data.DataProfileInfo dataProfileInfo);
oneway void setResponseFunctions(in android.hardware.radio.data.IRadioDataResponse radioDataResponse, in android.hardware.radio.data.IRadioDataIndication radioDataIndication);
oneway void setupDataCall(in int serial, in android.hardware.radio.AccessNetwork accessNetwork, in android.hardware.radio.data.DataProfileInfo dataProfileInfo, in boolean roamingAllowed, in android.hardware.radio.data.DataRequestReason reason, in android.hardware.radio.data.LinkAddress[] addresses, in String[] dnses, in int pduSessionId, in @nullable android.hardware.radio.data.SliceInfo sliceInfo, in boolean matchAllRuleAllowed);
oneway void startHandover(in int serial, in int callId);

View file

@ -159,14 +159,15 @@ oneway interface IRadioData {
in long completionDurationMillis);
/**
* Set an APN to initial attach network.
* Set an APN to initial attach network or clear the existing initial attach APN.
*
* @param serial Serial number of request.
* @param dataProfileInfo data profile containing APN settings
* @param dataProfileInfo Data profile containing APN settings or null to clear the existing
* initial attach APN.
*
* Response function is IRadioDataResponse.setInitialAttachApnResponse()
*/
void setInitialAttachApn(in int serial, in DataProfileInfo dataProfileInfo);
void setInitialAttachApn(in int serial, in @nullable DataProfileInfo dataProfileInfo);
/**
* Set response functions for data radio requests and indications.

View file

@ -122,9 +122,10 @@ ScopedAStatus RadioData::setDataThrottling(int32_t serial, aidl::DataThrottlingA
return ok();
}
ScopedAStatus RadioData::setInitialAttachApn(int32_t serial, const aidl::DataProfileInfo& info) {
ScopedAStatus RadioData::setInitialAttachApn(int32_t serial,
const std::optional<aidl::DataProfileInfo>& info) {
LOG_CALL << serial;
mHal1_5->setInitialAttachApn_1_5(serial, toHidl(info));
mHal1_5->setInitialAttachApn_1_5(serial, toHidl(info.value()));
return ok();
}
@ -136,14 +137,15 @@ ScopedAStatus RadioData::setResponseFunctions(
return ok();
}
ScopedAStatus RadioData::setupDataCall( //
int32_t serial, aidlCommon::AccessNetwork accessNetwork,
const aidl::DataProfileInfo& dataProfileInfo, bool roamingAllowed,
aidl::DataRequestReason reason, const std::vector<aidl::LinkAddress>& addresses,
const std::vector<std::string>& dnses, int32_t pduSessId,
const std::optional<aidl::SliceInfo>& sliceInfo, bool matchAllRuleAllowed) {
ScopedAStatus RadioData::setupDataCall(int32_t serial, aidlCommon::AccessNetwork accessNetwork,
const aidl::DataProfileInfo& dataProfileInfo,
bool roamingAllowed, aidl::DataRequestReason reason,
const std::vector<aidl::LinkAddress>& addresses,
const std::vector<std::string>& dnses, int32_t pduSessId,
const std::optional<aidl::SliceInfo>& sliceInfo,
bool matchAllRuleAllowed) {
if (mHal1_6) {
mHal1_6->setupDataCall_1_6( //
mHal1_6->setupDataCall_1_6(
serial, V1_5::AccessNetwork(accessNetwork), toHidl(dataProfileInfo), roamingAllowed,
V1_2::DataRequestReason(reason), toHidl(addresses), toHidl(dnses), pduSessId,
toHidl<V1_6::OptionalSliceInfo>(sliceInfo),
@ -151,7 +153,7 @@ ScopedAStatus RadioData::setupDataCall( //
matchAllRuleAllowed);
mContext->addDataProfile(dataProfileInfo);
} else {
mHal1_5->setupDataCall_1_5( //
mHal1_5->setupDataCall_1_5(
serial, V1_5::AccessNetwork(accessNetwork), toHidl(dataProfileInfo), roamingAllowed,
V1_2::DataRequestReason(reason), toHidl(addresses), toHidl(dnses));
}

View file

@ -44,7 +44,8 @@ class RadioData : public RadioCompatBase, public aidl::android::hardware::radio:
int64_t completionDurationMillis) override;
::ndk::ScopedAStatus setInitialAttachApn(
int32_t serial,
const ::aidl::android::hardware::radio::data::DataProfileInfo& dpInfo) override;
const std::optional<::aidl::android::hardware::radio::data::DataProfileInfo>& dpInfo)
override;
::ndk::ScopedAStatus setResponseFunctions(
const std::shared_ptr<::aidl::android::hardware::radio::data::IRadioDataResponse>&
radioDataResponse,