2018-08-11 02:13:03 +02:00
|
|
|
/*
|
|
|
|
* Copyright (C) 2018 The Android Open Source Project
|
|
|
|
*
|
|
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* you may not use this file except in compliance with the License.
|
|
|
|
* You may obtain a copy of the License at
|
|
|
|
*
|
|
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
*
|
|
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* See the License for the specific language governing permissions and
|
|
|
|
* limitations under the License.
|
|
|
|
*/
|
|
|
|
|
2018-11-26 22:11:03 +01:00
|
|
|
package android.hardware.radio@1.4;
|
2018-08-11 02:13:03 +02:00
|
|
|
|
2018-08-30 05:26:03 +02:00
|
|
|
import @1.0::Dial;
|
2018-08-11 02:13:03 +02:00
|
|
|
import @1.2::DataRequestReason;
|
2019-01-03 00:55:29 +01:00
|
|
|
import @1.2::NetworkScanRequest;
|
2018-11-26 22:11:03 +01:00
|
|
|
import @1.3::IRadio;
|
|
|
|
import @1.4::AccessNetwork;
|
2018-11-28 04:01:59 +01:00
|
|
|
import @1.4::CarrierRestrictionsWithPriority;
|
2018-11-28 05:23:13 +01:00
|
|
|
import @1.4::DataProfileInfo;
|
2018-12-19 06:34:32 +01:00
|
|
|
import @1.4::EmergencyCallRouting;
|
2018-11-26 22:11:03 +01:00
|
|
|
import @1.4::EmergencyServiceCategory;
|
2018-12-11 03:22:47 +01:00
|
|
|
import @1.4::RadioAccessFamily;
|
2018-11-28 04:01:59 +01:00
|
|
|
import @1.4::SimLockMultiSimPolicy;
|
2018-08-11 02:13:03 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* This interface is used by telephony and telecom to talk to cellular radio.
|
|
|
|
* All the functions have minimum one parameter:
|
|
|
|
* serial: which corresponds to serial no. of request. Serial numbers must only be memorized for the
|
|
|
|
* duration of a method call. If clients provide colliding serials (including passing the same
|
|
|
|
* serial to different methods), multiple responses (one for each method call) must still be served.
|
|
|
|
* setResponseFunctions must work with @1.1::IRadioResponse and @1.1::IRadioIndication.
|
|
|
|
*/
|
2018-11-26 22:11:03 +01:00
|
|
|
interface IRadio extends @1.3::IRadio {
|
2018-08-11 02:13:03 +02:00
|
|
|
/**
|
|
|
|
* Setup a packet data connection. If DataCallResponse.status returns DataCallFailCause:NONE,
|
|
|
|
* the data connection must be added to data calls and a unsolDataCallListChanged() must be
|
|
|
|
* sent. The call remains until removed by subsequent unsolDataCallIstChanged(). It may be
|
|
|
|
* lost due to many factors, including deactivateDataCall() being issued, the radio powered
|
|
|
|
* off, reception lost or even transient factors like congestion. This data call list is
|
|
|
|
* returned by getDataCallList() and dataCallListChanged().
|
|
|
|
*
|
|
|
|
* The Radio is expected to:
|
|
|
|
* - Create one data call context.
|
|
|
|
* - Create and configure a dedicated interface for the context.
|
|
|
|
* - The interface must be point to point.
|
|
|
|
* - The interface is configured with one or more addresses and is capable of sending and
|
|
|
|
* receiving packets. The prefix length of the addresses must be /32 for IPv4 and /128
|
|
|
|
* for IPv6.
|
|
|
|
* - Must not modify routing configuration related to this interface; routing management is
|
|
|
|
* exclusively within the purview of the Android OS.
|
|
|
|
* - Support simultaneous data call contexts up to DataRegStateResult.maxDataCalls specified
|
|
|
|
* in the response of getDataRegistrationState.
|
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param accessNetwork The access network to setup the data call. If the data connection cannot
|
|
|
|
* be established on the specified access network, the setup request must be failed.
|
|
|
|
* @param dataProfileInfo Data profile info.
|
|
|
|
* @param roamingAllowed Indicates whether or not data roaming is allowed by the user.
|
|
|
|
* @param reason The request reason. Must be DataRequestReason.NORMAL or
|
|
|
|
* DataRequestReason.HANDOVER.
|
|
|
|
* @param addresses If the reason is DataRequestReason.HANDOVER, this indicates the list of link
|
|
|
|
* addresses of the existing data connection. The format is IP address with optional "/"
|
|
|
|
* prefix length (The format is defined in RFC-4291 section 2.3). For example, "192.0.1.3",
|
|
|
|
* "192.0.1.11/16", or "2001:db8::1/64". Typically one IPv4 or one IPv6 or one of each. If
|
|
|
|
* the prefix length is absent, then the addresses are assumed to be point to point with
|
|
|
|
* IPv4 with prefix length 32 or IPv6 with prefix length 128. This parameter must be ignored
|
|
|
|
* unless reason is DataRequestReason.HANDOVER.
|
|
|
|
* @param dnses If the reason is DataRequestReason.HANDOVER, this indicates the list of DNS
|
|
|
|
* addresses of the existing data connection. The format is defined in RFC-4291 section
|
|
|
|
* 2.2. For example, "192.0.1.3" or "2001:db8::1". This parameter must be ignored unless
|
|
|
|
* reason is DataRequestReason.HANDOVER.
|
|
|
|
*
|
|
|
|
* Response function is IRadioResponse.setupDataCallResponse()
|
|
|
|
*
|
2018-11-26 22:11:03 +01:00
|
|
|
* Note this API is same as 1.2 version except using the 1.4 AccessNetwork as the input param.
|
2018-08-11 02:13:03 +02:00
|
|
|
*/
|
2018-11-26 22:11:03 +01:00
|
|
|
oneway setupDataCall_1_4(int32_t serial, AccessNetwork accessNetwork,
|
2018-09-15 02:27:27 +02:00
|
|
|
DataProfileInfo dataProfileInfo, bool roamingAllowed,
|
|
|
|
DataRequestReason reason, vec<string> addresses, vec<string> dnses);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set an apn to initial attach network
|
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param dataProfileInfo data profile containing APN settings
|
|
|
|
*
|
|
|
|
* Response callback is IRadioResponse.setInitialAttachApnResponse()
|
|
|
|
*/
|
2018-11-26 22:11:03 +01:00
|
|
|
oneway setInitialAttachApn_1_4(int32_t serial, DataProfileInfo dataProfileInfo);
|
2018-09-15 02:27:27 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Send data profiles of the current carrier to the modem.
|
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param profiles Array of DataProfile to set.
|
|
|
|
*
|
|
|
|
* Response callback is IRadioResponse.setDataProfileResponse()
|
|
|
|
*/
|
2018-11-26 22:11:03 +01:00
|
|
|
oneway setDataProfile_1_4(int32_t serial, vec<DataProfileInfo> profiles);
|
2018-08-30 05:26:03 +02:00
|
|
|
|
|
|
|
/**
|
2018-12-19 06:34:32 +01:00
|
|
|
* Initiate emergency voice call, with zero or more emergency service category(s) and routing
|
|
|
|
* information for handling the call. Android uses this request to make its emergency call
|
|
|
|
* instead of using @1.0::IRadio.dial if the 'address' in the 'dialInfo' field is identified
|
|
|
|
* as an emergency number by Android.
|
|
|
|
*
|
|
|
|
* In multi-sim senario, this radio request is sent through the IRadio service that serves
|
|
|
|
* the subscription the emergency number belongs to, no matter of the PUK/PIN state of the
|
|
|
|
* subscription and the service state.
|
|
|
|
*
|
|
|
|
* Some countries or carriers require some emergency numbers that must be handled with normal
|
|
|
|
* call routing or emergency routing. If the 'routing' field is specified as
|
|
|
|
* @1.4::EmergencyNumberRouting#NORMAL, the implementation must use normal call routing to
|
|
|
|
* handle the call; if it is specified as @1.4::EmergencyNumberRouting#EMERGENCY, the
|
|
|
|
* implementation must use emergency routing to handle the call; if it is
|
|
|
|
* @1.4::EmergencyNumberRouting#UNKNOWN, Android does not know how to handle the call.
|
2018-12-08 07:00:12 +01:00
|
|
|
*
|
2018-09-19 23:10:42 +02:00
|
|
|
* If the dialed emergency number does not have a specified emergency service category, the
|
2018-12-19 06:34:32 +01:00
|
|
|
* 'categories' field is set to @1.4::EmergencyServiceCategory#UNSPECIFIED; if the underlying
|
2018-09-19 23:10:42 +02:00
|
|
|
* technology used to request emergency services does not support the emergency service
|
2018-12-19 06:34:32 +01:00
|
|
|
* category, the categories may be ignored.
|
2018-09-19 23:10:42 +02:00
|
|
|
*
|
|
|
|
* Reference: 3gpp TS 22.101, Section 10 - Emergency Calls
|
|
|
|
*
|
2018-08-30 05:26:03 +02:00
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param dialInfo the same @1.0::Dial information used by @1.0::IRadio.dial.
|
2018-11-26 22:11:03 +01:00
|
|
|
* @param categories bitfield<@1.4::EmergencyServiceCategory> the Emergency Service Category(s)
|
2018-08-30 05:26:03 +02:00
|
|
|
* of the call.
|
2018-12-19 06:34:32 +01:00
|
|
|
* @param routing @1.4::EmergencyCallRouting the emergency call routing information.
|
2018-08-30 05:26:03 +02:00
|
|
|
*
|
|
|
|
* Response function is IRadioResponse.emergencyDialResponse()
|
|
|
|
*/
|
|
|
|
oneway emergencyDial(int32_t serial, Dial dialInfo,
|
2018-12-19 06:34:32 +01:00
|
|
|
bitfield<EmergencyServiceCategory> categories, EmergencyCallRouting routing);
|
2018-12-11 03:22:47 +01:00
|
|
|
|
2019-01-03 00:55:29 +01:00
|
|
|
/**
|
|
|
|
* Starts a network scan
|
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param request Defines the radio networks/bands/channels which need to be scanned.
|
|
|
|
*
|
|
|
|
* Same API as @1.2::IRadio.startNetworkScan_1_2, except using the
|
|
|
|
* @1.4::IRadioResponse.startNetworkScanResponse_1_4 as the response.
|
|
|
|
*/
|
|
|
|
oneway startNetworkScan_1_4(int32_t serial, NetworkScanRequest request);
|
|
|
|
|
2018-12-11 03:22:47 +01:00
|
|
|
/**
|
|
|
|
* 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);
|
2018-11-28 04:01:59 +01:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Set carrier restrictions. Expected modem behavior:
|
|
|
|
* If never receives this command:
|
|
|
|
* - Must allow all carriers
|
|
|
|
* Receives this command:
|
|
|
|
* - Only allow carriers specified in carriers. The restriction persists across power cycles
|
|
|
|
* and FDR. If a present SIM is allowed, modem must not reload the SIM. If a present SIM is
|
|
|
|
* *not* allowed, modem must detach from the registered network and only keep emergency
|
|
|
|
* service, and notify Android SIM refresh reset with new SIM state being
|
|
|
|
* CardState:RESTRICTED. Emergency service must be enabled.
|
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
* @param carriers CarrierRestrictionsWithPriority consisting allowed and excluded carriers
|
|
|
|
* as defined in types.hal
|
|
|
|
* @param multiSimPolicy Policy to be used for devices with multiple SIMs.
|
|
|
|
*
|
|
|
|
* Response callback is IRadioResponse.setAllowedCarriersResponse()
|
|
|
|
*/
|
|
|
|
oneway setAllowedCarriers_1_4(int32_t serial, CarrierRestrictionsWithPriority carriers,
|
|
|
|
SimLockMultiSimPolicy multiSimPolicy);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get carrier restrictions.
|
|
|
|
*
|
|
|
|
* @param serial Serial number of request.
|
|
|
|
*
|
|
|
|
* Response callback is IRadioResponse.getAllowedCarriersResponse_1_3()
|
|
|
|
*/
|
|
|
|
oneway getAllowedCarriers_1_4(int32_t serial);
|
2018-08-11 02:13:03 +02:00
|
|
|
};
|