From 7224c5dc1cc671fa115ded7d1234988c2bd6c041 Mon Sep 17 00:00:00 2001 From: Youming Ye Date: Fri, 11 Jan 2019 14:57:44 -0800 Subject: [PATCH] Clean up error codes and add error description for IRadioResponse 1.4. Clean up some unneeded/confusing error codes in the 1.4 Radio HAL. Quoting description from aosp/616923: -Remove SYSTEM_ERROR. This is an ultra-generic error that also provides no meaningful distinction from INTERNAL_ERROR but is even less specified in scope. -Remove NO_MEMORY. This is very implementation specific, and should be essentially impossible to hit in the generic sense. Today we don't have a generic EBUSY error code, which this would map to. Since it should be essentially impossible to hit, the preference is to assert that it shouldn't be. If an implementation really has memory pressure then it can return INTERNAL_ERROR, of which this is a class. INTERNAL_ERROR will be treated as a temporary failure anyway, making NO_MEMORY a distinction without a difference. -Remove CANCELLED. We have no way to cancel an API call. If a persistent/ongoing request is cancelled by the caller using a separate API request, then that's a success case rather than an error case. Bug: 73174777 Change-Id: I5bf268f86ed52e7294f7127f24beba04c9159fea Test: Compilation --- radio/1.4/IRadioResponse.hal | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/radio/1.4/IRadioResponse.hal b/radio/1.4/IRadioResponse.hal index 77aad03730..6b8977d09c 100644 --- a/radio/1.4/IRadioResponse.hal +++ b/radio/1.4/IRadioResponse.hal @@ -40,7 +40,6 @@ interface IRadioResponse extends @1.3::IRadioResponse { * RadioError:DIAL_MODIFIED_TO_SS * RadioError:DIAL_MODIFIED_TO_DIAL * RadioError:INVALID_ARGUMENTS - * RadioError:NO_MEMORY * RadioError:NO_RESOURCES * RadioError:INTERNAL_ERR * RadioError:FDN_CHECK_FAILURE @@ -51,7 +50,6 @@ interface IRadioResponse extends @1.3::IRadioResponse { * RadioError:DEVICE_IN_USE * RadioError:ABORTED * RadioError:INVALID_MODEM_STATE - * RadioError:CANCELLED */ oneway emergencyDialResponse(RadioResponseInfo info); @@ -66,7 +64,6 @@ interface IRadioResponse extends @1.3::IRadioResponse { * RadioError:RADIO_NOT_AVAILABLE * RadioError:DEVICE_IN_USE * RadioError:INTERNAL_ERR - * RadioError:NO_MEMORY * RadioError:MODEM_ERR * RadioError:INVALID_ARGUMENTS */ @@ -105,9 +102,7 @@ interface IRadioResponse extends @1.3::IRadioResponse { * RadioError:NONE * RadioError:RADIO_NOT_AVAILABLE * RadioError:INTERNAL_ERR - * RadioError:NO_MEMORY * RadioError:NO_RESOURCES - * RadioError:CANCELLED * RadioError:REQUEST_NOT_SUPPORTED */ oneway getIccCardStatusResponse_1_4(RadioResponseInfo info, CardStatus cardStatus); @@ -119,14 +114,11 @@ interface IRadioResponse extends @1.3::IRadioResponse { * 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 networkTypeBitmap); @@ -141,14 +133,11 @@ interface IRadioResponse extends @1.3::IRadioResponse { * 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); @@ -160,9 +149,7 @@ interface IRadioResponse extends @1.3::IRadioResponse { * RadioError:NONE * RadioError:RADIO_NOT_AVAILABLE * RadioError:INTERNAL_ERR - * RadioError:NO_MEMORY * RadioError:NO_RESOURCES - * RadioError:CANCELLED * RadioError:REQUEST_NOT_SUPPORTED * RadioError:SIM_ABSENT */ @@ -182,9 +169,7 @@ interface IRadioResponse extends @1.3::IRadioResponse { * RadioError:REQUEST_NOT_SUPPORTED * RadioError:INVALID_ARGUMENTS * RadioError:INTERNAL_ERR - * RadioError:NO_MEMORY * RadioError:NO_RESOURCES - * RadioError:CANCELLED * RadioError:SIM_ABSENT */ oneway setupDataCallResponse_1_4(RadioResponseInfo info, SetupDataCallResult dcResponse);