From 968f5312673df3c22e95d8442b5e37645b7365db Mon Sep 17 00:00:00 2001 From: sqian Date: Wed, 19 Sep 2018 14:10:42 -0700 Subject: [PATCH] Emergency Function HAL (continued) - Add Emergency Number source for Emergency number, which is critical for management and display priority. - Remove solicited request for getting emergency number list. - Rephrasing the documentations. Test: Treehugger (will add VTS later) Bug: 112657134 Change-Id: Idbfebf8d246de06fd91e8de89088f5cc2c70227b --- radio/1.3/Android.bp | 1 + radio/1.3/IRadio.hal | 35 +++++--------------- radio/1.3/IRadioIndication.hal | 33 +++++++++---------- radio/1.3/IRadioResponse.hal | 24 -------------- radio/1.3/types.hal | 60 ++++++++++++++++++++++++++++------ 5 files changed, 76 insertions(+), 77 deletions(-) diff --git a/radio/1.3/Android.bp b/radio/1.3/Android.bp index 5ac38cd90a..9424a85756 100644 --- a/radio/1.3/Android.bp +++ b/radio/1.3/Android.bp @@ -22,6 +22,7 @@ hidl_interface { "AccessNetwork", "DataRegStateResult", "EmergencyNumber", + "EmergencyNumberSource", "EmergencyServiceCategory", "LteVopsInfo", ], diff --git a/radio/1.3/IRadio.hal b/radio/1.3/IRadio.hal index 480a61fb08..2b14488f3e 100644 --- a/radio/1.3/IRadio.hal +++ b/radio/1.3/IRadio.hal @@ -86,36 +86,19 @@ interface IRadio extends @1.2::IRadio { bool isRoaming, DataRequestReason reason, vec addresses, vec dnses); /** - * Request the current emergency number list. - * - * Each emergency number (@1.3::EmergencyNumber) in the emergency number list contains a - * dialing number, one or more service category(s), and mobile country code. - * - * Radio must collect all sources of the emergency number to build the response. - * For example, network operator signals, sim card information, modem configuration, OEM - * configuration (for example, OEM system properties), always-available emergency numbers and - * sim-absence emergency numbers, etc. - * - * 112, 911 are always available. Besides, 000, 08, 110, 999, 118 and 119 should be available - * when sim is not present. - * - * Please refer the document of @1.3::EmergencyNumber to construct each emergency number to be - * returned. - * - * Reference: 3GPP TS 22.101 version 9.1.0 Release 9 - * - * @param serial Serial number of request. - * - * Response function is IRadioResponse.getCurrentEmergencyNumberListResponse() - */ - oneway getCurrentEmergencyNumberList(int32_t serial); - - /** - * Initiate emergency voice call, with one or more emergency service category(s). + * Initiate emergency voice call, with zero or more emergency service category(s). * * Note this API is the same as IRadio.dial except using the * @1.3::EmergencyServiceCategory as the input param. * + * If the dialed emergency number does not have a specified emergency service category, the + * 'categories' field is set to @1.3::EmergencyServiceCategory#UNSPECIFIED; iff either the + * 'categories' field is set to @1.3::EmergencyServiceCategory#UNSPECIFIED or the underlying + * technology used to request emergency services does not support the emergency service + * category, the interpretation of the categories is defined by implementation. + * + * Reference: 3gpp TS 22.101, Section 10 - Emergency Calls + * * @param serial Serial number of request. * @param dialInfo the same @1.0::Dial information used by @1.0::IRadio.dial. * @param categories bitfield<@1.3::EmergencyServiceCategory> the Emergency Service Category(s) diff --git a/radio/1.3/IRadioIndication.hal b/radio/1.3/IRadioIndication.hal index c80e762611..509eef8f7d 100644 --- a/radio/1.3/IRadioIndication.hal +++ b/radio/1.3/IRadioIndication.hal @@ -24,29 +24,28 @@ import @1.2::IRadioIndication; */ interface IRadioIndication extends @1.2::IRadioIndication { /** - * Indicate and update all of the current Emergency Number information known to the radio, - * when any of the Emergency Number sources (For example, network operator signals, sim card - * information, modem configuration, OEM configuration or system properties, etc.) change the - * list of emergency numbers. + * Report the current list of emergency numbers * - * 112, 911 are always available. Besides, 000, 08, 110, 999, 118 and 119 should be available - * when sim is not present. + * Each emergency number (@1.3::EmergencyNumber) in the emergency number list contains a + * dialing number, zero or more service category(s), mobile country code, and source(s) that + * indicate where it comes from. * - * This should be the same information as returned by getCurrentEmergencyNumberList() in - * 1.3::IRadio. + * Radio must report all the valid emergency numbers with known mobile country code and + * emergency service categories from all available sources including network signaling, sim, + * modem/oem configuration, and default configuration (112 and 911 must be always available; + * additionally, 000, 08, 110, 999, 118 and 119 must be available when sim is not present). + * Radio shall not report emergency numbers that are invalid in the current locale. The + * reported emergency number list must not have duplicate @1.3::EmergencyNumber entries. Please + * refer the documentation of @1.3::EmergencyNumber to construct each emergency number to + * report. * - * The indicated list of emergency numbers should not have duplicate @1.3::EmergencyNumber. - * Please refer the document of @1.3::EmergencyNumber to construct each emergency number to be - * returned. + * Radio must report the complete list of emergency numbers whenever the emergency numbers in + * the list are changed or whenever the client and the radio server are connected. * - * Reference: 3GPP TS 22.101 version 9.1.0 Release 9 + * Reference: 3gpp 22.101, Section 10 - Emergency Calls * * @param type Type of radio indication - * @param emergencyNumberList List of current Emergency Number information - * (@1.3::EmergencyNumber) known to radio. Radio must collect all sources of the emergency - * numbers to build the indication. For example, network operator signals, sim card - * information, modem configuration, OEM configuration (for example, OEM specific system - * properties), always-available emergency numbers and sim-absence emergency numbers, etc. + * @param emergencyNumberList Current list of emergency numbers known to radio. */ oneway currentEmergencyNumberList(RadioIndicationType type, vec emergencyNumberList); diff --git a/radio/1.3/IRadioResponse.hal b/radio/1.3/IRadioResponse.hal index 3604953e14..10e7d63cf1 100644 --- a/radio/1.3/IRadioResponse.hal +++ b/radio/1.3/IRadioResponse.hal @@ -23,30 +23,6 @@ import @1.2::IRadioResponse; * Interface declaring response functions to solicited radio requests. */ interface IRadioResponse extends @1.2::IRadioResponse { - /** - * @param info Response info struct containing response type, serial no. and error - * @param emergencyNumberList List of current Emergency Number information known to radio. - * - * Radio must collect all sources of the emergency number to build the response. For example, - * network operator signals, sim card information, modem configuration, OEM configuration (for - * example, OEM system properties), always-available emergency numbers and sim-absence - * emergency numbers, etc. - * - * The returned list of emergency numbers must not have duplicate @1.3::EmergencyNumber. Please - * refer the document of @1.3::EmergencyNumber to construct each emergency number to be - * returned. - * - * Reference: 3GPP TS 22.101 version 9.1.0 Release 9 - * - * Valid errors returned: - * RadioError:NONE - * RadioError:RADIO_NOT_AVAILABLE - * RadioError:NO_MEMORY - * RadioError:MODEM_ERR - */ - oneway getCurrentEmergencyNumberListResponse(RadioResponseInfo info, - vec emergencyNumberList); - /** * @param info Response info struct containing response type, serial no. and error * diff --git a/radio/1.3/types.hal b/radio/1.3/types.hal index d472ca72f4..09202a5cbb 100644 --- a/radio/1.3/types.hal +++ b/radio/1.3/types.hal @@ -29,14 +29,14 @@ enum AccessNetwork : @1.2::AccessNetwork { }; /** - * Emergency number contains information of number, one or more service category(s), and mobile - * country code (mcc). + * Emergency number contains information of number, one or more service category(s), mobile country + * code (mcc), and source(s) that indicate where it comes from. * * If the source of the emergency number is associated with country, field ‘mcc’ must be * provided; otherwise the field ‘mcc’ must be an empty string. * - * A unique EmergencyNumber has a unique combination of ‘number’ and ‘mcc’ fields. - * Multiple @1.3::EmergencyServiceCategory should be merged into the bitfield for the same + * A unique EmergencyNumber has a unique combination of ‘number’, ‘mcc’ and 'categories' fields. + * Multiple @1.3::EmergencyNumberSource should be merged into the bitfield for the same * EmergencyNumber. * * Reference: 3GPP TS 22.101 version 9.1.0 Release 9 @@ -56,6 +56,11 @@ struct EmergencyNumber{ * the value of each bit. */ bitfield categories; + /** + * The bitfield of @1.3::EmergencyNumberSource(s). See @1.3::EmergencyNumberSource for the + * value of each bit. + */ + bitfield sources; }; /** @@ -69,20 +74,55 @@ struct EmergencyNumber{ * - Manually Initiated eCall (MIeC); * - Automatically Initiated eCall (AIeC); * - * Type GENERIC (General emergency call, all categories) is considered to use if the reported type - * is not any of the other specific types. + * Category UNSPECIFIED (General emergency call, all categories) indicates that no specific + * services are associated with this emergency number. * - * Reference: 3GPP TS 22.101 version 9.1.0 Release 9 + * Reference: 3gpp 22.101, Section 10 - Emergency Calls */ enum EmergencyServiceCategory : int32_t { - GENERIC = 0, // General emergency call, all categories + /** + * General emergency call, all categories + */ + UNSPECIFIED = 0, POLICE = 1 << 0, AMBULANCE = 1 << 1, FIRE_BRIGADE = 1 << 2, MARINE_GUARD = 1 << 3, MOUNTAIN_RESCUE = 1 << 4, - MIEC = 1 << 5, // Manually Initiated eCall (MIeC) - AIEC = 1 << 6, // Automatically Initiated eCall (AIeC) + /** + * Manually Initiated eCall (MIeC) + */ + MIEC = 1 << 5, + /** + * Automatically Initiated eCall (AIeC) + */ + AIEC = 1 << 6, +}; + +/** + * The source to tell where the corresponding @1.3::EmergencyNumber comes from. + * + * Reference: 3gpp 22.101, Section 10 - Emergency Calls + */ +enum EmergencyNumberSource : int32_t { + /** + * Indicates the number is from the network signal. + */ + NETWORK_SIGNALING = 1 << 0, + /** + * Indicates the number is from the sim card. + */ + SIM = 1 << 1, + /** + * Indicates the number is from the modem config. + */ + MODEM_CONFIG = 1 << 2, + /** + * Indicates the number is available as default. Per the reference, 112, 911 must always be + * available; additionally, 000, 08, 110, 999, 118 and 119 must be available when sim is not + * present. + */ + DEFAULT = 1 << 3, }; /**