Merge "Add a bitmap version for get/set PreferredNetworkType"

am: d25bffff74

Change-Id: I8e993cc1179eb065da593e84106f54aa3462998d
This commit is contained in:
Pengquan Meng
2018-12-13 22:15:13 -08:00
committed by android-build-merger
4 changed files with 90 additions and 1 deletions

View File

@@ -35,6 +35,8 @@ hidl_interface {
"LteVopsInfo",
"NetworkScanResult",
"PhysicalChannelConfig",
"RadioAccessFamily",
"RadioCapability",
"RadioFrequencyInfo",
"RadioTechnology",
"NrIndicators",

View File

@@ -22,6 +22,7 @@ import @1.3::IRadio;
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 @@ interface IRadio extends @1.3::IRadio {
*/
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);
};

View File

@@ -87,4 +87,44 @@ interface IRadioResponse extends @1.3::IRadioResponse {
* RadioError:REQUEST_NOT_SUPPORTED
*/
oneway getIccCardStatusResponse_1_4(RadioResponseInfo info, CardStatus cardStatus);
};
/**
* @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);
};

View File

@@ -22,6 +22,8 @@ import @1.0::CellInfoType;
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 @@ enum RadioTechnology : @1.0::RadioTechnology {
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 @@ struct CardStatus {
*/
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;
};