Update IRadioIms HAL
- Replace notifyImsTraffic with startImsTraffic and stopImsTraffic.
- Remove performAcbCheck and onAccessAllowed
- Remove REGISTERING from ImsRegistration.
- Replace FEATURE_ with IMS_MMTEL_CAPABILITY_ in ImsRegistration
Bug: 216387835
Test: build & flash
Change-Id: I19999ef54609c1027879201e792691ddaea48bd3
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioIms.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioIms.aidl
index 5ccf584..8a0c210 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioIms.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioIms.aidl
@@ -36,8 +36,8 @@
interface IRadioIms {
oneway void setSrvccCallInfo(int serial, in android.hardware.radio.ims.SrvccCall[] srvccCalls);
oneway void updateImsRegistrationInfo(int serial, in android.hardware.radio.ims.ImsRegistration imsRegistration);
- oneway void notifyImsTraffic(int serial, int token, android.hardware.radio.ims.ImsTrafficType imsTrafficType, boolean isStart);
- oneway void performAcbCheck(int serial, int token, android.hardware.radio.ims.ImsTrafficType imsTrafficType);
+ oneway void startImsTraffic(int serial, in String token, android.hardware.radio.ims.ImsTrafficType imsTrafficType, android.hardware.radio.AccessNetwork accessNetworkType);
+ oneway void stopImsTraffic(int serial, in String token);
oneway void setResponseFunctions(in android.hardware.radio.ims.IRadioImsResponse radioImsResponse, in android.hardware.radio.ims.IRadioImsIndication radioImsIndication);
oneway void setAnbrEnabled(int serial, int qosSessionId, boolean isEnabled);
oneway void sendAnbrQuery(int serial, int qosSessionId, android.hardware.radio.ims.ImsStreamDirection direction, int bitsPerSecond);
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsIndication.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsIndication.aidl
index 252da50..d91fb0b 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsIndication.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsIndication.aidl
@@ -34,8 +34,7 @@
package android.hardware.radio.ims;
@VintfStability
interface IRadioImsIndication {
- oneway void onConnectionSetupFailure(in android.hardware.radio.RadioIndicationType type, int token, in android.hardware.radio.ims.ConnectionFailureInfo info);
- oneway void onAccessAllowed(in android.hardware.radio.RadioIndicationType type, int token);
+ oneway void onConnectionSetupFailure(in android.hardware.radio.RadioIndicationType type, in String token, in android.hardware.radio.ims.ConnectionFailureInfo info);
oneway void notifyAnbr(in android.hardware.radio.RadioIndicationType type, int qosSessionId, android.hardware.radio.ims.ImsStreamDirection direction, int bitsPerSecond);
oneway void triggerImsDeregistration(in android.hardware.radio.RadioIndicationType type);
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsResponse.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsResponse.aidl
index 60f396f..c75c7ea 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsResponse.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/IRadioImsResponse.aidl
@@ -36,8 +36,8 @@
interface IRadioImsResponse {
oneway void setSrvccCallInfoResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void updateImsRegistrationInfoResponse(in android.hardware.radio.RadioResponseInfo info);
- oneway void notifyImsTrafficResponse(in android.hardware.radio.RadioResponseInfo info);
- oneway void performAcbCheckResponse(in android.hardware.radio.RadioResponseInfo info);
+ oneway void startImsTrafficResponse(in android.hardware.radio.RadioResponseInfo info, in @nullable android.hardware.radio.ims.ConnectionFailureInfo failureInfo);
+ oneway void stopImsTrafficResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void setAnbrEnabledResponse(in android.hardware.radio.RadioResponseInfo info);
oneway void sendAnbrQueryResponse(in android.hardware.radio.RadioResponseInfo info);
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsFailureReason.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsFailureReason.aidl
new file mode 100644
index 0000000..63a3674
--- /dev/null
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsFailureReason.aidl
@@ -0,0 +1,41 @@
+/*
+ * Copyright (C) 2022 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.radio.ims;
+@Backing(type="int") @VintfStability
+enum ImsFailureReason {
+ NONE = 0,
+ FATAL_ERROR = 1,
+ REPEATED_ERROR = 2,
+ TEMPORARY_ERROR = 3,
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
index f843095..4ee106d 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistration.aidl
@@ -34,34 +34,13 @@
package android.hardware.radio.ims;
@VintfStability
parcelable ImsRegistration {
- android.hardware.radio.ims.ImsRegistration.State state;
- android.hardware.radio.ims.ImsRegistration.ImsAccessNetwork ipcan;
- android.hardware.radio.ims.ImsRegistration.FailureReason reason;
- int features;
- const int FEATURE_NONE = 0;
- const int FEATURE_VOICE = 1;
- const int FEATURE_VIDEO = 2;
- const int FEATURE_SMS = 4;
- @Backing(type="int") @VintfStability
- enum State {
- NOT_REGISTERED = 0,
- REGISTERING = 1,
- REGISTERED = 2,
- }
- @Backing(type="int") @VintfStability
- enum ImsAccessNetwork {
- NONE = 0,
- EUTRAN = 1,
- NGRAN = 2,
- UTRAN = 3,
- IWLAN = 4,
- CROSS_SIM = 5,
- }
- @Backing(type="int") @VintfStability
- enum FailureReason {
- NONE = 0,
- FATAL_ERROR = 1,
- REPEATED_ERROR = 2,
- TEMPORARY_ERROR = 3,
- }
+ android.hardware.radio.ims.ImsRegistrationState regState;
+ android.hardware.radio.AccessNetwork accessNetworkType;
+ android.hardware.radio.ims.ImsFailureReason reason;
+ int capabilities;
+ const int IMS_MMTEL_CAPABILITY_NONE = 0;
+ const int IMS_MMTEL_CAPABILITY_VOICE = 1;
+ const int IMS_MMTEL_CAPABILITY_VIDEO = 2;
+ const int IMS_MMTEL_CAPABILITY_SMS = 4;
+ const int IMS_RCS_CAPABILITIES = 8;
}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistrationState.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistrationState.aidl
new file mode 100644
index 0000000..58ffc6f
--- /dev/null
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsRegistrationState.aidl
@@ -0,0 +1,39 @@
+/*
+ * Copyright (C) 2022 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.
+ */
+///////////////////////////////////////////////////////////////////////////////
+// THIS FILE IS IMMUTABLE. DO NOT EDIT IN ANY CASE. //
+///////////////////////////////////////////////////////////////////////////////
+
+// This file is a snapshot of an AIDL file. Do not edit it manually. There are
+// two cases:
+// 1). this is a frozen version file - do not edit this in any case.
+// 2). this is a 'current' file. If you make a backwards compatible change to
+// the interface (from the latest frozen version), the build system will
+// prompt you to update this file with `m <name>-update-api`.
+//
+// You must not make a backward incompatible change to any AIDL file built
+// with the aidl_interface module type with versions property set. The module
+// type is used to build AIDL files in a way that they can be used across
+// independently updatable components of the system. If a device is shipped
+// with such a backward incompatible change, it has a high risk of breaking
+// later when a module using the interface is updated, e.g., Mainline modules.
+
+package android.hardware.radio.ims;
+@Backing(type="int") @VintfStability
+enum ImsRegistrationState {
+ NOT_REGISTERED = 0,
+ REGISTERED = 1,
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamDirection.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamDirection.aidl
index b5a33c7..2d41897 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamDirection.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsStreamDirection.aidl
@@ -34,6 +34,6 @@
package android.hardware.radio.ims;
@Backing(type="int") @VintfStability
enum ImsStreamDirection {
- UPLINK = 1,
- DOWNLINK = 2,
-}
\ No newline at end of file
+ UPLINK = 1,
+ DOWNLINK = 2,
+}
diff --git a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsTrafficType.aidl b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsTrafficType.aidl
index 413faa7..b0625c2 100644
--- a/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsTrafficType.aidl
+++ b/radio/aidl/aidl_api/android.hardware.radio.ims/current/android/hardware/radio/ims/ImsTrafficType.aidl
@@ -40,4 +40,5 @@
VIDEO = 3,
SMS = 4,
REGISTRATION = 5,
+ UT_XCAP = 6,
}
diff --git a/radio/aidl/android/hardware/radio/ims/IRadioIms.aidl b/radio/aidl/android/hardware/radio/ims/IRadioIms.aidl
index cae6bd0..77b6c9a 100644
--- a/radio/aidl/android/hardware/radio/ims/IRadioIms.aidl
+++ b/radio/aidl/android/hardware/radio/ims/IRadioIms.aidl
@@ -16,12 +16,13 @@
package android.hardware.radio.ims;
+import android.hardware.radio.AccessNetwork;
import android.hardware.radio.ims.ImsRegistration;
+import android.hardware.radio.ims.ImsStreamDirection;
import android.hardware.radio.ims.ImsTrafficType;
import android.hardware.radio.ims.IRadioImsIndication;
import android.hardware.radio.ims.IRadioImsResponse;
import android.hardware.radio.ims.SrvccCall;
-import android.hardware.radio.ims.ImsStreamDirection;
/**
* This interface is used by IMS telephony layer to talk to cellular radio.
@@ -66,37 +67,30 @@
* This API shall be used by modem
* 1. To set the appropriate establishment cause in RRC connection request.
* 2. To prioritize RF resources in case of DSDS. The service priority is
- * EMERGENCY > EMERGENCY SMS > VOICE > VIDEO > SMS > REGISTRATION > BACKGROUND
- * DATA. The RF shall be prioritized to the subscription which handles higher
- * priority service. When both subscriptions are handling the same type of
- * service then RF shall be prioritized to the voice preferred sub.
+ * EMERGENCY > EMERGENCY SMS > VOICE > VIDEO > SMS > REGISTRATION > Ut/XCAP. The RF
+ * shall be prioritized to the subscription which handles higher priority service.
+ * When both subscriptions are handling the same type of service then RF shall be
+ * prioritized to the voice preferred sub.
*
- * @param token Token number of the request
+ * @param token A nonce to identify the request
* @param imsTrafficType IMS traffic type like registration, voice, and video
- * @param isStart true when the traffic flow starts, false when traffic flow stops.
- * false will not be notified for SMS as it's a short traffic.
+ * @param accessNetworkType The type of the radio access network used
*
- * Response function is IRadioImsResponse.notifyImsTrafficResponse()
+ * Response function is IRadioImsResponse.startImsTrafficResponse()
*/
- void notifyImsTraffic(int serial, int token,
- ImsTrafficType imsTrafficType, boolean isStart);
+ void startImsTraffic(int serial, in String token,
+ ImsTrafficType imsTrafficType, AccessNetwork accessNetworkType);
/**
- * This API shall check access class barring checks based on ImsTrafficType.
- * In case of access class is allowed then
- * IRadioImsIndication#onAccessAllowed(token) shall be invoked by radio
- * so the IMS stack can transmit the data.
- * In case of access is denied
- * IRadioImsIndication#onConnectionSetupFailure(token, REASON_ACCESS_DENIED)
- * shall be invoked.
+ * Indicates IMS traffic has been stopped.
+ * For all IMS traffic, notified with startImsTraffic, IMS service shall notify
+ * stopImsTraffic when it completes the traffic specified by the token.
*
- * @param token Token number of the request
- * @param imsTrafficType IMS traffic type like registration, voice
- * video, SMS, emergency etc
+ * @param token The token assigned by startImsTraffic()
*
- * Response function is IRadioImsResponse.performAcbCheckResponse()
+ * Response function is IRadioImsResponse.stopImsTrafficResponse()
*/
- void performAcbCheck(int serial, int token, ImsTrafficType imsTrafficType);
+ void stopImsTraffic(int serial, in String token);
/**
* Set response functions for IMS radio requests and indications.
diff --git a/radio/aidl/android/hardware/radio/ims/IRadioImsIndication.aidl b/radio/aidl/android/hardware/radio/ims/IRadioImsIndication.aidl
index ae35f21..74a2107 100644
--- a/radio/aidl/android/hardware/radio/ims/IRadioImsIndication.aidl
+++ b/radio/aidl/android/hardware/radio/ims/IRadioImsIndication.aidl
@@ -27,25 +27,17 @@
oneway interface IRadioImsIndication {
/**
* Fired by radio when any IMS traffic is not sent to network due to any failure
- * on cellular networks.
+ * on cellular networks. IMS service shall call stopImsTraffic when receiving
+ * this indication.
*
- * @param token The token number of the notifyImsTraffic() or performACBcheck() APIs
+ * @param token The token of startImsTraffic() associated with this indication
* @param type Type of radio indication
* @param info Connection failure information
*/
- void onConnectionSetupFailure(in RadioIndicationType type, int token,
+ void onConnectionSetupFailure(in RadioIndicationType type, in String token,
in ConnectionFailureInfo info);
/**
- * Fired by radio in response to performAcbCheck(token, trafficType)
- * if the access class check is allowed for the requested traffic type.
- *
- * @param token The token of the operation of performAcbCheck() API
- * @param type Type of radio indication
- */
- void onAccessAllowed(in RadioIndicationType type, int token);
-
- /**
* Access Network Bitrate Recommendation (ANBR), see 3GPP TS 26.114.
* Notifies the bit rate received from the network via ANBR message
*
diff --git a/radio/aidl/android/hardware/radio/ims/IRadioImsResponse.aidl b/radio/aidl/android/hardware/radio/ims/IRadioImsResponse.aidl
index 7cc58a6..e5a3a6c 100644
--- a/radio/aidl/android/hardware/radio/ims/IRadioImsResponse.aidl
+++ b/radio/aidl/android/hardware/radio/ims/IRadioImsResponse.aidl
@@ -17,6 +17,7 @@
package android.hardware.radio.ims;
import android.hardware.radio.RadioResponseInfo;
+import android.hardware.radio.ims.ConnectionFailureInfo;
/**
* Interface declaring response functions to solicited radio requests for ims APIs.
@@ -60,6 +61,7 @@
/**
* @param info Response info struct containing response type, serial no. and error
+ * @param failureInfo Information about failure in detail
*
* Valid errors returned:
* RadioError:NONE
@@ -73,7 +75,8 @@
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:NO_RESOURCES
*/
- void notifyImsTrafficResponse(in RadioResponseInfo info);
+ void startImsTrafficResponse(in RadioResponseInfo info,
+ in @nullable ConnectionFailureInfo failureInfo);
/**
* @param info Response info struct containing response type, serial no. and error
@@ -90,7 +93,7 @@
* RadioError:REQUEST_NOT_SUPPORTED
* RadioError:NO_RESOURCES
*/
- void performAcbCheckResponse(in RadioResponseInfo info);
+ void stopImsTrafficResponse(in RadioResponseInfo info);
/**
* @param info Response info struct containing response type, serial no. and error
diff --git a/radio/aidl/android/hardware/radio/ims/ImsFailureReason.aidl b/radio/aidl/android/hardware/radio/ims/ImsFailureReason.aidl
new file mode 100644
index 0000000..a227dca
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/ims/ImsFailureReason.aidl
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2022 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.ims;
+
+@VintfStability
+@Backing(type="int")
+enum ImsFailureReason {
+ /** Default value */
+ NONE,
+
+ /**
+ * Indicates that the IMS registration is failed with fatal error such as 403 or 404
+ * on all P-CSCF addresses. The radio shall block the current PLMN or disable
+ * the RAT as per the carrier requirements.
+ */
+ FATAL_ERROR,
+
+ /**
+ * Indicates that the IMS registration on current PLMN failed multiple times.
+ * The radio shall block the current PLMN or disable the RAT as per the
+ * carrier requirements.
+ */
+ REPEATED_ERROR,
+
+ /**
+ * Indicates that IMS registration has failed temporarily. A retry will be done shortly.
+ */
+ TEMPORARY_ERROR,
+}
diff --git a/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl b/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
index a011b40..3982ac8 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsRegistration.aidl
@@ -16,90 +16,37 @@
package android.hardware.radio.ims;
+import android.hardware.radio.AccessNetwork;
+import android.hardware.radio.ims.ImsFailureReason;
+import android.hardware.radio.ims.ImsRegistrationState;
+
@VintfStability
parcelable ImsRegistration {
-
- @VintfStability
- @Backing(type="int")
- enum State {
- /** IMS is not registered */
- NOT_REGISTERED,
- /**
- * IMS registration procedure just started.
- * It could be used by radio to start IMS establishment timer based on carrier requirements.
- */
- REGISTERING,
- /** IMS is successfully registered */
- REGISTERED,
- }
-
- @VintfStability
- @Backing(type="int")
- enum ImsAccessNetwork {
- /**
- * Indicates the access network where IMS is registered. If IMS is registered on
- * cellular then the radio shall wait for IMS PDN disconnection for 4 seconds
- * before performing NAS detach procedure. This requirement is not applicable for
- * if access network IWLAN and CROSS_SIM.
- */
- NONE,
- EUTRAN,
- NGRAN,
- UTRAN,
- /** The IMS registration is done over WiFi network. */
- IWLAN,
- /**
- * The radio shall not consider the registration information with this type
- * while voice domain selection is performed.
- * The IMS registration is done over internet of the default data subscription.
- */
- CROSS_SIM,
- }
-
- @VintfStability
- @Backing(type="int")
- enum FailureReason {
- /** Default value */
- NONE,
- /**
- * Indicates that the IMS registration is failed with fatal error 403 or 404
- * on all P-CSCF addresses. The radio shall block the current PLMN or disable
- * the RAT as per the carrier requirements.
- */
- FATAL_ERROR,
- /**
- * Indicates that the IMS registration on current PLMN failed multiple times.
- * The radio shall block the current PLMN or disable the RAT as per the
- * carrier requirements.
- */
- REPEATED_ERROR,
- /*
- * Indicates that IMS registration has failed temporarily.
- */
- TEMPORARY_ERROR,
- }
-
/** Default value */
- const int FEATURE_NONE = 0;
- /** IMS voice feature */
- const int FEATURE_VOICE = 1 << 0;
- /** IMS video feature */
- const int FEATURE_VIDEO = 1 << 1;
- /** IMS SMS feature */
- const int FEATURE_SMS = 1 << 2;
+ const int IMS_MMTEL_CAPABILITY_NONE = 0;
+ /** IMS voice */
+ const int IMS_MMTEL_CAPABILITY_VOICE = 1 << 0;
+ /** IMS video */
+ const int IMS_MMTEL_CAPABILITY_VIDEO = 1 << 1;
+ /** IMS SMS */
+ const int IMS_MMTEL_CAPABILITY_SMS = 1 << 2;
+ /** IMS RCS */
+ const int IMS_RCS_CAPABILITIES = 1 << 3;
/** Indicates the current IMS registration state. */
- State state;
-
- /** Indicates the IP connectivity access network where IMS features are registered. */
- ImsAccessNetwork ipcan;
-
- /** Indicates a failure reason for IMS registration. */
- FailureReason reason;
+ ImsRegistrationState regState;
/**
- * Values are bitwise ORs of FEATURE_.
- * IMS features such as VOICE, VIDEO and SMS.
+ * Indicates the type of the radio access network where IMS is registered.
*/
- int features;
+ AccessNetwork accessNetworkType;
+
+ /** Indicates a failure reason for IMS registration. */
+ ImsFailureReason reason;
+
+ /**
+ * Values are bitwise ORs of IMS_MMTEL_CAPABILITY_* constants and IMS_RCS_CAPABILITIES.
+ * IMS capability such as VOICE, VIDEO, SMS and RCS.
+ */
+ int capabilities;
}
diff --git a/radio/aidl/android/hardware/radio/ims/ImsRegistrationState.aidl b/radio/aidl/android/hardware/radio/ims/ImsRegistrationState.aidl
new file mode 100644
index 0000000..21769d5
--- /dev/null
+++ b/radio/aidl/android/hardware/radio/ims/ImsRegistrationState.aidl
@@ -0,0 +1,27 @@
+/*
+ * Copyright (C) 2022 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.ims;
+
+@VintfStability
+@Backing(type="int")
+enum ImsRegistrationState {
+ /** IMS is not registered */
+ NOT_REGISTERED,
+
+ /** IMS is successfully registered */
+ REGISTERED,
+}
\ No newline at end of file
diff --git a/radio/aidl/android/hardware/radio/ims/ImsTrafficType.aidl b/radio/aidl/android/hardware/radio/ims/ImsTrafficType.aidl
index f6d16ca..32baa04 100644
--- a/radio/aidl/android/hardware/radio/ims/ImsTrafficType.aidl
+++ b/radio/aidl/android/hardware/radio/ims/ImsTrafficType.aidl
@@ -36,4 +36,7 @@
/** IMS registration and subscription for reg event package (signaling) */
REGISTRATION,
-}
+
+ /** Ut/XCAP (XML Configuration Access Protocol) */
+ UT_XCAP
+}
\ No newline at end of file
diff --git a/radio/aidl/vts/radio_ims_indication.cpp b/radio/aidl/vts/radio_ims_indication.cpp
index 6f6d4f2..9c821ff 100644
--- a/radio/aidl/vts/radio_ims_indication.cpp
+++ b/radio/aidl/vts/radio_ims_indication.cpp
@@ -19,12 +19,7 @@
RadioImsIndication::RadioImsIndication(RadioServiceTest& parent) : parent_ims(parent) {}
ndk::ScopedAStatus RadioImsIndication::onConnectionSetupFailure(RadioIndicationType /*type*/,
- int /*token*/, const ConnectionFailureInfo& /*info*/) {
- return ndk::ScopedAStatus::ok();
-}
-
-ndk::ScopedAStatus RadioImsIndication::onAccessAllowed(RadioIndicationType /*type*/,
- int /*token*/) {
+ const std::string& /*token*/, const ConnectionFailureInfo& /*info*/) {
return ndk::ScopedAStatus::ok();
}
diff --git a/radio/aidl/vts/radio_ims_response.cpp b/radio/aidl/vts/radio_ims_response.cpp
index dd629a5..fa34dc1 100644
--- a/radio/aidl/vts/radio_ims_response.cpp
+++ b/radio/aidl/vts/radio_ims_response.cpp
@@ -31,13 +31,15 @@
return ndk::ScopedAStatus::ok();
}
-ndk::ScopedAStatus RadioImsResponse::notifyImsTrafficResponse(const RadioResponseInfo& info) {
+ndk::ScopedAStatus RadioImsResponse::startImsTrafficResponse(const RadioResponseInfo& info,
+ const std::optional<ConnectionFailureInfo>& response) {
rspInfo = info;
+ startImsTrafficResp = response;
parent_ims.notify(info.serial);
return ndk::ScopedAStatus::ok();
}
-ndk::ScopedAStatus RadioImsResponse::performAcbCheckResponse(const RadioResponseInfo& info) {
+ndk::ScopedAStatus RadioImsResponse::stopImsTrafficResponse(const RadioResponseInfo& info) {
rspInfo = info;
parent_ims.notify(info.serial);
return ndk::ScopedAStatus::ok();
@@ -53,4 +55,4 @@
rspInfo = info;
parent_ims.notify(info.serial);
return ndk::ScopedAStatus::ok();
-}
\ No newline at end of file
+}
diff --git a/radio/aidl/vts/radio_ims_test.cpp b/radio/aidl/vts/radio_ims_test.cpp
index 52c5f02..84b7c6a 100644
--- a/radio/aidl/vts/radio_ims_test.cpp
+++ b/radio/aidl/vts/radio_ims_test.cpp
@@ -92,10 +92,10 @@
serial = GetRandomSerialNumber();
ImsRegistration regInfo;
- regInfo.state = ImsRegistration::State::NOT_REGISTERED;
- regInfo.ipcan = ImsRegistration::ImsAccessNetwork::NONE;
- regInfo.reason = ImsRegistration::FailureReason::NONE;
- regInfo.features = ImsRegistration::FEATURE_NONE;
+ regInfo.regState = ImsRegistrationState::NOT_REGISTERED;
+ regInfo.accessNetworkType = AccessNetwork::EUTRAN;
+ regInfo.reason = ImsFailureReason::NONE;
+ regInfo.capabilities = ImsRegistration::IMS_MMTEL_CAPABILITY_NONE;
ndk::ScopedAStatus res =
radio_ims->updateImsRegistrationInfo(serial, regInfo);
@@ -111,52 +111,53 @@
}
/*
- * Test IRadioIms.notifyImsTraffic() for the response returned.
+ * Test IRadioIms.startImsTraffic() for the response returned.
*/
-TEST_P(RadioImsTest, notifyImsTraffic) {
+TEST_P(RadioImsTest, startImsTraffic) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_IMS)) {
- ALOGI("Skipping notifyImsTraffic because ims is not supported in device");
+ ALOGI("Skipping startImsTraffic because ims is not supported in device");
return;
} else {
- ALOGI("Running notifyImsTraffic because ims is supported in device");
+ ALOGI("Running startImsTraffic because ims is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res =
- radio_ims->notifyImsTraffic(serial, 1, ImsTrafficType::REGISTRATION, false);
+ radio_ims->startImsTraffic(serial, std::string("1"),
+ ImsTrafficType::REGISTRATION, AccessNetwork::EUTRAN);
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_ims->rspInfo.type);
EXPECT_EQ(serial, radioRsp_ims->rspInfo.serial);
- ALOGI("notifyImsTraffic, rspInfo.error = %s\n",
+ ALOGI("startImsTraffic, rspInfo.error = %s\n",
toString(radioRsp_ims->rspInfo.error).c_str());
verifyError(radioRsp_ims->rspInfo.error);
}
/*
- * Test IRadioIms.performAcbCheck() for the response returned.
+ * Test IRadioIms.stopImsTraffic() for the response returned.
*/
-TEST_P(RadioImsTest, performAcbCheck) {
+TEST_P(RadioImsTest, stopImsTraffic) {
if (!deviceSupportsFeature(FEATURE_TELEPHONY_IMS)) {
- ALOGI("Skipping performAcbCheck because ims is not supported in device");
+ ALOGI("Skipping stopImsTraffic because ims is not supported in device");
return;
} else {
- ALOGI("Running performAcbCheck because ims is supported in device");
+ ALOGI("Running stopImsTraffic because ims is supported in device");
}
serial = GetRandomSerialNumber();
ndk::ScopedAStatus res =
- radio_ims->performAcbCheck(serial, 1, ImsTrafficType::REGISTRATION);
+ radio_ims->stopImsTraffic(serial, std::string("2"));
ASSERT_OK(res);
EXPECT_EQ(std::cv_status::no_timeout, wait());
EXPECT_EQ(RadioResponseType::SOLICITED, radioRsp_ims->rspInfo.type);
EXPECT_EQ(serial, radioRsp_ims->rspInfo.serial);
- ALOGI("performAcbCheck, rspInfo.error = %s\n",
+ ALOGI("stopImsTraffic, rspInfo.error = %s\n",
toString(radioRsp_ims->rspInfo.error).c_str());
verifyError(radioRsp_ims->rspInfo.error);
diff --git a/radio/aidl/vts/radio_ims_utils.h b/radio/aidl/vts/radio_ims_utils.h
index 541077f..2967476 100644
--- a/radio/aidl/vts/radio_ims_utils.h
+++ b/radio/aidl/vts/radio_ims_utils.h
@@ -36,15 +36,17 @@
virtual ~RadioImsResponse() = default;
RadioResponseInfo rspInfo;
+ std::optional<ConnectionFailureInfo> startImsTrafficResp;
virtual ndk::ScopedAStatus setSrvccCallInfoResponse(const RadioResponseInfo& info) override;
virtual ndk::ScopedAStatus updateImsRegistrationInfoResponse(
const RadioResponseInfo& info) override;
- virtual ndk::ScopedAStatus notifyImsTrafficResponse(const RadioResponseInfo& info) override;
+ virtual ndk::ScopedAStatus startImsTrafficResponse(const RadioResponseInfo& info,
+ const std::optional<ConnectionFailureInfo>& response) override;
- virtual ndk::ScopedAStatus performAcbCheckResponse(const RadioResponseInfo& info) override;
+ virtual ndk::ScopedAStatus stopImsTrafficResponse(const RadioResponseInfo& info) override;
virtual ndk::ScopedAStatus setAnbrEnabledResponse(const RadioResponseInfo& info) override;
@@ -60,10 +62,8 @@
RadioImsIndication(RadioServiceTest& parent_ims);
virtual ~RadioImsIndication() = default;
- virtual ndk::ScopedAStatus onConnectionSetupFailure(RadioIndicationType type, int token,
- const ConnectionFailureInfo& info) override;
-
- virtual ndk::ScopedAStatus onAccessAllowed(RadioIndicationType type, int token) override;
+ virtual ndk::ScopedAStatus onConnectionSetupFailure(RadioIndicationType type,
+ const std::string& token, const ConnectionFailureInfo& info) override;
virtual ndk::ScopedAStatus notifyAnbr(RadioIndicationType type, int qosSessionId,
ImsStreamDirection direction, int bitsPerSecond) override;