Merge "Migrate NNAPI to canonical types"
diff --git a/current.txt b/current.txt
index 688a323..ec1a788 100644
--- a/current.txt
+++ b/current.txt
@@ -771,7 +771,7 @@
cd84ab19c590e0e73dd2307b591a3093ee18147ef95e6d5418644463a6620076 android.hardware.neuralnetworks@1.2::IDevice
9625e85f56515ad2cf87b6a1847906db669f746ea4ab02cd3d4ca25abc9b0109 android.hardware.neuralnetworks@1.2::types
9e758e208d14f7256e0885d6d8ad0b61121b21d8c313864f981727ae55bffd16 android.hardware.neuralnetworks@1.3::types
-7da2707d4cf93818eaf8038eb65e2180116a399c310e594a00935c5c981aa340 android.hardware.radio@1.0::types
+0f53d70e1eadf8d987766db4bf6ae2048004682168f4cab118da576787def3fa android.hardware.radio@1.0::types
38d65fb20c60a5b823298560fc0825457ecdc49603a4b4e94bf81511790737da android.hardware.radio@1.4::types
954c334efd80e8869b66d1ce5fe2755712d96ba4b3c38d415739c330af5fb4cb android.hardware.radio@1.5::types
diff --git a/radio/1.0/types.hal b/radio/1.0/types.hal
index 025aa7c..cafa5a6 100644
--- a/radio/1.0/types.hal
+++ b/radio/1.0/types.hal
@@ -166,11 +166,15 @@
};
enum CardState : int32_t {
+ /* card is physically absent from device. (Some old modems use CardState.ABSENT when the SIM
+ is powered off. This is no longer correct, however the platform will still support this
+ legacy behavior.) */
ABSENT,
+ /* card is inserted in the device */
PRESENT,
ERROR,
- RESTRICTED, // card is present but not usable due to carrier
- // restrictions
+ /* card is present but not usable due to carrier restrictions */
+ RESTRICTED,
};
enum PinState : int32_t {
diff --git a/radio/1.6/IRadio.hal b/radio/1.6/IRadio.hal
index ca40a17..eb20542 100644
--- a/radio/1.6/IRadio.hal
+++ b/radio/1.6/IRadio.hal
@@ -19,6 +19,7 @@
import @1.0::CdmaSmsMessage;
import @1.0::GsmSmsMessage;
+import @1.1::CardPowerState;
import @1.2::DataRequestReason;
import @1.5::IRadio;
import @1.5::AccessNetwork;
@@ -183,6 +184,42 @@
oneway sendCdmaSmsExpectMore_1_6(int32_t serial, CdmaSmsMessage sms);
/**
+ * Set SIM card power state.
+ * Request is used to power off or power on the card. It should not generate
+ * a CardState.CARDSTATE_ABSENT indication, since the SIM is still physically
+ * inserted.
+ *
+ * @param serial Serial number of request
+ * @param powerUp POWER_DOWN if powering down the SIM card,
+ * POWER_UP if powering up the SIM card,
+ * POWER_UP_PASS_THROUGH if powering up the SIM card in
+ * pass through mode.
+ *
+ * When SIM card is in POWER_UP_PASS_THROUGH, the modem does not send
+ * any command to it (for example SELECT of MF, or TERMINAL
+ * CAPABILITY), and the SIM card is controlled completely by Telephony
+ * sending APDUs directly. The SIM card state must be
+ * RIL_CARDSTATE_PRESENT and the number of card apps will be 0.
+ * No new error code is generated. Emergency calls are supported in
+ * the same way as if the SIM card is absent.
+ * Pass-through mode is valid only for the specific card session where
+ * it is activated, and normal behavior occurs at the next SIM
+ * initialization, unless POWER_UP_PASS_THROUGH is requested again.
+ *
+ * The device is required to power down the SIM card before it can
+ * switch the mode between POWER_UP and POWER_UP_PASS_THROUGH.
+ * At device power up, the SIM interface is powered up automatically.
+ * Each subsequent request to this method is processed only after the
+ * completion of the previous one.
+ *
+ * Response callback is IRadioResponse.setSimCardPowerResponse_1_6().
+ * Note that this differs from setSimCardPower_1_1 in that the response
+ * callback should only be sent once the device has finished executing
+ * the request (the SIM has finished powering on or off).
+ */
+ oneway setSimCardPower_1_6(int32_t serial, CardPowerState powerUp);
+
+ /**
* Enable or disable E-UTRA-NR dual connectivity. If disabled then UE will not connect
* to secondary carrier.
*
@@ -205,4 +242,67 @@
* Response callback is IRadioResponse.isNRDualConnectivityEnabledResponse()
*/
oneway isNrDualConnectivityEnabled(int32_t serial);
+
+ /**
+ * Reserves an unallocated pdu session id from the pool of ids.
+ *
+ * The allocated id is returned in the response.
+ *
+ * When the id is no longer needed, call releasePduSessionId to
+ * return it to the pool.
+ *
+ * Reference: 3GPP TS 24.007 section 11.2.3.1b
+ *
+ * @param serial Serial number of request.
+ *
+ * Response function is IRadioResponse.allocatePduSessionIdResponse()
+ */
+ oneway allocatePduSessionId(int32_t serial);
+
+ /**
+ * Releases a pdu session id that was previously allocated using
+ * allocatePduSessionId.
+ *
+ * Reference: 3GPP TS 24.007 section 11.2.3.1b
+ * @param serial Serial number of request.
+ * @param id Pdu session id to release.
+ *
+ * Response function is IRadioResponse.releasePduSessionIdResponse()
+ */
+ oneway releasePduSessionId(int32_t serial, int32_t id);
+
+ /**
+ * Indicates that a handover to the IWLAN transport has begun.
+ *
+ * Any resources being transferred to the IWlan transport cannot be released while a
+ * handover is underway. For example, if a pdu session id needs to be
+ * transferred to IWlan, then, the modem should not release the id while
+ * the handover is in progress.
+ *
+ * If a handover was unsuccessful, then the framework calls IRadio::cancelHandover.
+ * The modem retains ownership over any of the resources being transferred to IWlan.
+ *
+ * If a handover was successful, the framework calls IRadio::deactivateDataCall with reason
+ * HANDOVER. The IWlan transport now owns the transferred resources and is responsible for
+ * releasing them.
+ *
+ * @param serial Serial number of request.
+ * @param id callId The identifier of the data call which is provided in SetupDataCallResult
+ *
+ * Response function is IRadioResponse.beginHandoverResponse()
+ */
+ oneway beginHandover(int32_t serial, int32_t callId);
+
+ /**
+ * Indicates that a handover was cancelled after a call to IRadio::beginHandover.
+ *
+ * Since the handover was unsuccessful, the modem retains ownership over any of the resources
+ * being transferred and is still responsible for releasing them.
+ *
+ * @param serial Serial number of request.
+ * @param id callId The identifier of the data call which is provided in SetupDataCallResult
+ *
+ * Response function is IRadioResponse.cancelHandoverResponse()
+ */
+ oneway cancelHandover(int32_t serial, int32_t callId);
};
diff --git a/radio/1.6/IRadioResponse.hal b/radio/1.6/IRadioResponse.hal
index 4ff7e47..07322be 100644
--- a/radio/1.6/IRadioResponse.hal
+++ b/radio/1.6/IRadioResponse.hal
@@ -207,6 +207,22 @@
* Valid errors returned:
* RadioError:NONE
* RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:SIM_ERR (indicates a timeout or other issue making the SIM unresponsive)
+ *
+ * Note that this differs from setSimCardPowerResponse_1_1 in that the response
+ * should only be sent once the request from setSimCardPower_1_6 is complete
+ * (the SIM has finished powering on or off).
+ */
+ oneway setSimCardPowerResponse_1_6(RadioResponseInfo info);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
* RadioError:INTERNAL_ERR
*/
oneway enableNrDualConnectivityResponse(RadioResponseInfo info);
@@ -222,4 +238,56 @@
* RadioError:INTERNAL_ERR
*/
oneway isNrDualConnectivityEnabledResponse(RadioResponseInfo info, bool isEnabled);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ * @param id The allocated id. On an error, this is set to -1
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INTERNAL_ERR
+ * RadioError:NO_RESOURCES- Indicates that no pdu session ids are available
+ * RadioError:REQUEST_NOT_SUPPORTED
+ */
+ oneway allocatePduSessionIdResponse(RadioResponseInfo info, int32_t id);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INTERNAL_ERR
+ * RadioError:NO_RESOURCES
+ * RadioError:REQUEST_NOT_SUPPORTED
+ */
+ oneway releasePduSessionIdResponse(RadioResponseInfo info);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INTERNAL_ERR
+ * RadioError:NO_RESOURCES
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_CALL_ID
+ */
+ oneway beginHandoverResponse(RadioResponseInfo info);
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ * @param dcResponse Attributes of data call
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:INTERNAL_ERR
+ * RadioError:NO_RESOURCES
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:INVALID_CALL_ID
+ */
+ oneway cancelHandoverResponse(RadioResponseInfo info);
};
diff --git a/radio/1.6/types.hal b/radio/1.6/types.hal
index 07b4977..a98cd1f 100644
--- a/radio/1.6/types.hal
+++ b/radio/1.6/types.hal
@@ -254,6 +254,14 @@
/** Specifies the fallback mode on an IWLAN handover failure. */
HandoverFailureMode handoverFailureMode;
+
+ /**
+ * The allocated pdu session id for this data call.
+ * A value of -1 means no pdu session id was attached to this call.
+ *
+ * Reference: 3GPP TS 24.007 section 11.2.3.1b
+ */
+ int32_t pduSessionId;
};
/**
diff --git a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
index 784bcd9..850425d 100644
--- a/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
+++ b/radio/1.6/vts/functional/radio_hidl_hal_utils_v1_6.h
@@ -80,6 +80,9 @@
bool enableModemResponseToggle;
bool isNRDualConnectivityEnabled;
+ // Pdu Session Id and Handover
+ int32_t allocatedPduSessionId;
+
::android::hardware::hidl_bitfield<::android::hardware::radio::V1_4::RadioAccessFamily>
networkTypeBitmapResponse;
@@ -763,6 +766,9 @@
const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
const SendSmsResult& sms);
+ Return<void> setSimCardPowerResponse_1_6(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
+
Return<void> sendCdmaSmsExpectMoreResponse_1_6(
const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
const SendSmsResult& sms);
@@ -771,6 +777,18 @@
const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
Return<void> isNrDualConnectivityEnabledResponse(
const ::android::hardware::radio::V1_6::RadioResponseInfo& info, bool isEnabled);
+
+ Return<void> allocatePduSessionIdResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info, int32_t id);
+
+ Return<void> releasePduSessionIdResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
+
+ Return<void> beginHandoverResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
+
+ Return<void> cancelHandoverResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info);
};
/* Callback class for radio indication */
diff --git a/radio/1.6/vts/functional/radio_response.cpp b/radio/1.6/vts/functional/radio_response.cpp
index ffa384e..fc56947 100644
--- a/radio/1.6/vts/functional/radio_response.cpp
+++ b/radio/1.6/vts/functional/radio_response.cpp
@@ -1097,6 +1097,13 @@
return Void();
}
+Return<void> RadioResponse_v1_6::setSimCardPowerResponse_1_6(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}
+
Return<void> RadioResponse_v1_6::sendCdmaSmsExpectMoreResponse_1_6(
const ::android::hardware::radio::V1_6::RadioResponseInfo& info,
const SendSmsResult& sms) {
@@ -1113,3 +1120,32 @@
parent_v1_6.notify(info.serial);
return Void();
}
+
+Return<void> RadioResponse_v1_6::allocatePduSessionIdResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info, int32_t id) {
+ rspInfo = info;
+ allocatedPduSessionId = id;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}
+
+Return<void> RadioResponse_v1_6::releasePduSessionIdResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}
+
+Return<void> RadioResponse_v1_6::beginHandoverResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}
+
+Return<void> RadioResponse_v1_6::cancelHandoverResponse(
+ const ::android::hardware::radio::V1_6::RadioResponseInfo& info) {
+ rspInfo = info;
+ parent_v1_6.notify(info.serial);
+ return Void();
+}