Merge "Add 1.2 NN HAL: IPreparedModel & callbacks."
diff --git a/radio/1.4/Android.bp b/radio/1.4/Android.bp
index c2ba47e..6257112 100644
--- a/radio/1.4/Android.bp
+++ b/radio/1.4/Android.bp
@@ -35,6 +35,8 @@
"LteVopsInfo",
"NetworkScanResult",
"PhysicalChannelConfig",
+ "RadioAccessFamily",
+ "RadioCapability",
"RadioFrequencyInfo",
"RadioTechnology",
"NrIndicators",
diff --git a/radio/1.4/IRadio.hal b/radio/1.4/IRadio.hal
index 8854453..c7a2c6b 100644
--- a/radio/1.4/IRadio.hal
+++ b/radio/1.4/IRadio.hal
@@ -22,6 +22,7 @@
import @1.4::AccessNetwork;
import @1.4::DataProfileInfo;
import @1.4::EmergencyServiceCategory;
+import @1.4::RadioAccessFamily;
/**
* This interface is used by telephony and telecom to talk to cellular radio.
@@ -122,4 +123,24 @@
*/
oneway emergencyDial(int32_t serial, Dial dialInfo,
bitfield<EmergencyServiceCategory> categories);
+
+ /**
+ * Query the preferred network type bitmap.
+ *
+ * @param serial Serial number of request.
+ *
+ * Response callback is IRadioResponse.getPreferredNetworkTypeBitmapResponse()
+ */
+ oneway getPreferredNetworkTypeBitmap(int32_t serial);
+
+ /**
+ * Requests to set the preferred network type for searching and registering.
+ *
+ * @param serial Serial number of request.
+ * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily.
+ *
+ * Response callback is IRadioResponse.setPreferredNetworkTypeBitmapResponse()
+ */
+ oneway setPreferredNetworkTypeBitmap(
+ int32_t serial, bitfield<RadioAccessFamily> networkTypeBitmap);
};
diff --git a/radio/1.4/IRadioResponse.hal b/radio/1.4/IRadioResponse.hal
index d971850..d9a2bad 100644
--- a/radio/1.4/IRadioResponse.hal
+++ b/radio/1.4/IRadioResponse.hal
@@ -87,4 +87,44 @@
* RadioError:REQUEST_NOT_SUPPORTED
*/
oneway getIccCardStatusResponse_1_4(RadioResponseInfo info, CardStatus cardStatus);
-};
\ No newline at end of file
+
+ /**
+ * @param info Response info struct containing response type, serial no. and error
+ * @param networkTypeBitmap a 32-bit bitmap of RadioAccessFamily.
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:NO_MEMORY
+ * RadioError:INTERNAL_ERR
+ * RadioError:SYSTEM_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:MODEM_ERR
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:NO_RESOURCES
+ * RadioError:CANCELLED
+ */
+ oneway getPreferredNetworkTypeBitmapResponse(RadioResponseInfo info,
+ bitfield<RadioAccessFamily> networkTypeBitmap);
+
+ /**
+ * Callback of IRadio.setPreferredNetworkTypeBitmap(int, bitfield<RadioAccessFamily>)
+ *
+ * @param info Response info struct containing response type, serial no. and error
+ *
+ * Valid errors returned:
+ * RadioError:NONE
+ * RadioError:RADIO_NOT_AVAILABLE
+ * RadioError:OPERATION_NOT_ALLOWED
+ * RadioError:MODE_NOT_SUPPORTED
+ * RadioError:NO_MEMORY
+ * RadioError:INTERNAL_ERR
+ * RadioError:SYSTEM_ERR
+ * RadioError:INVALID_ARGUMENTS
+ * RadioError:MODEM_ERR
+ * RadioError:REQUEST_NOT_SUPPORTED
+ * RadioError:NO_RESOURCES
+ * RadioError:CANCELLED
+ */
+ oneway setPreferredNetworkTypeBitmapResponse(RadioResponseInfo info);
+};
diff --git a/radio/1.4/types.hal b/radio/1.4/types.hal
index 4e5b288..9c4f08c 100644
--- a/radio/1.4/types.hal
+++ b/radio/1.4/types.hal
@@ -22,6 +22,8 @@
import @1.0::DataProfileId;
import @1.0::DataProfileInfoType;
import @1.0::RadioAccessFamily;
+import @1.0::RadioCapabilityPhase;
+import @1.0::RadioCapabilityStatus ;
import @1.0::RadioError;
import @1.0::RadioTechnology;
import @1.0::RegState;
@@ -150,6 +152,11 @@
NR = 20,
};
+enum RadioAccessFamily : @1.0::RadioAccessFamily {
+ /** 5G NR. */
+ NR = 1 << RadioTechnology:NR,
+};
+
/** Mapping the frequency to a rough range. */
enum FrequencyRange : int32_t {
/** Indicates the frequency range is below 1GHz. */
@@ -420,3 +427,22 @@
*/
string eid;
};
+
+/** Overwritten from @1.0::RadioCapability in order to use the latest RadioAccessFamily. */
+struct RadioCapability {
+ /** Unique session value defined by fr amework returned in all "responses/unslo". */
+ int32_t session;
+
+ RadioCapabilityPhase phase;
+
+ /** 32-bit bitmap of RadioAccessFamily. */
+ bitfield<RadioAccessFamily> raf;
+
+ /**
+ * A UUID typically "com.xxxx.lmX" where X is the logical modem.
+ * RadioConst:MAX_UUID_LENGTH is the max length.
+ */
+ string logicalModemUuid;
+
+ RadioCapabilityStatus status;
+};