blob: 922b35d58c6e5f7c89813c6c74ac0efdf056c5cb [file] [log] [blame]
/*
* 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.
*/
package android.hardware.radio@1.3;
import @1.2::IRadio;
import @1.1::RadioAccessSpecifier;
/**
* Note: IRadio 1.3 is an intermediate layer between Android P and Android Q. It's specifically
* designed for CBRS related interfaces. All other interfaces for Q are added in IRadio 1.4.
*
* 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.
*/
interface IRadio extends @1.2::IRadio {
/**
* Specify which bands modem's background scan must act on.
* If specifyChannels is true, it only scans bands specified in specifiers.
* If specifyChannels is false, it scans all bands.
*
* For example, CBRS is only on LTE band 48. By specifying this band,
* modem saves more power.
*
* @param serial Serial number of request.
* @param specifyChannels whether to scan bands defined in specifiers.
* @param specifiers which bands to scan. Only used if specifyChannels is true.
*
* Response callback is IRadioResponse.setSystemSelectionChannelsResponse()
*/
oneway setSystemSelectionChannels(int32_t serial, bool specifyChannels,
vec<RadioAccessSpecifier> specifiers);
/**
* Toggle logical modem on/off. This is similar to @1.0::IRadio.setRadioPower(), however that
* does not enforce that radio power is toggled only for the corresponding radio and certain
* vendor implementations do it for all radios. This new API should affect only the modem for
* which it is called. A modem stack must be on/active only when both setRadioPower() and
* enableModem() are set to on for it.
*
* SIM must be read if available even if modem is off/inactive.
*
* @param serial Serial number of request.
* @param on True to turn on the logical modem, otherwise turn it off.
*
* Response function is IRadioResponse.enableModemResponse()
*/
oneway enableModem(int32_t serial, bool on);
/**
* Request status of logical modem. It returns isEnabled=true if the logical modem is on.
* This method is the getter method for enableModem.
*
* @param serial Serial number of request.
*
* Response function is IRadioResponse.getModemStackStatusResponse()
*/
oneway getModemStackStatus(int32_t serial);
};