ITelephony.aidl revision 12312f6d758ab0fcd1b5a1c7c885cf4997098402
19066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/* 29066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Copyright (C) 2007 The Android Open Source Project 39066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 49066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Licensed under the Apache License, Version 2.0 (the "License"); 59066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * you may not use this file except in compliance with the License. 69066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * You may obtain a copy of the License at 79066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 89066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * http://www.apache.org/licenses/LICENSE-2.0 99066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Unless required by applicable law or agreed to in writing, software 119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * distributed under the License is distributed on an "AS IS" BASIS, 129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * See the License for the specific language governing permissions and 149066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * limitations under the License. 159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectpackage com.android.internal.telephony; 189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 19485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yenimport android.app.PendingIntent; 2063c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawalimport android.content.Intent; 219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectimport android.os.Bundle; 22010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinskiimport android.os.ResultReceiver; 23740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chenimport android.net.Uri; 2464997623bfa04e80064b6056fab0fb23144acb44Meng Wangimport android.service.carrier.CarrierIdentifier; 25ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordonimport android.telecom.PhoneAccount; 26740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chenimport android.telecom.PhoneAccountHandle; 27fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Savilleimport android.telephony.CellInfo; 288347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindranimport android.telephony.ClientRequestStats; 29a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawalimport android.telephony.IccOpenLogicalChannelResponse; 3039daf8d6f14a01d2854352fe08d14195f7a2056bJack Yuimport android.telephony.ModemActivityInfo; 31a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawalimport android.telephony.NeighboringCellInfo; 322af2d57d578e0c3a2740628e7c6336b19961cc49Wink Savilleimport android.telephony.RadioAccessFamily; 3339daf8d6f14a01d2854352fe08d14195f7a2056bJack Yuimport android.telephony.ServiceState; 3406e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padaweimport android.telephony.TelephonyHistogram; 3567ab168b78782c4de5de3f44817961468533757cTa-wei Yenimport android.telephony.VisualVoicemailSmsFilterSettings; 36e37ebbffb01042b667633362459c3a069575ad46Brad Ebingerimport com.android.ims.internal.IImsServiceController; 37e37ebbffb01042b667633362459c3a069575ad46Brad Ebingerimport com.android.ims.internal.IImsServiceFeatureListener; 38d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawalimport com.android.internal.telephony.CellNetworkScanResult; 39d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawalimport com.android.internal.telephony.OperatorInfo; 4006e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe 41a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawalimport java.util.List; 429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 43aae9216320328e6b865725219a31a029ea46c1b0Sailesh Nepal 449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/** 45767a662ecde33c3979bf02b793d392aca0403162Wink Saville * Interface used to interact with the phone. Mostly this is used by the 469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * TelephonyManager class. A few places are still using this directly. 474a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee * Please clean them up if possible and use TelephonyManager instead. 489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@hide} 509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectinterface ITelephony { 529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Dial a number. This doesn't place the call. It displays 559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * the Dialer screen. 569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @param number the number to be dialed. If null, this 579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * would display the Dialer screen with no number pre-filled. 589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project void dial(String number); 609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Place a call to the specified number. 6316a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov * @param callingPackage The package making the call. 649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @param number the number to be called. 659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 66f265ea9d8307282ff1da3915978625a94fc2859eDianne Hackborn void call(String callingPackage, String number); 679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 694d396052deb54399cbadbeb8abd873df6f3af342Jeff Brown * End call if there is a call in progress, otherwise does nothing. 709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return whether it hung up 729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project boolean endCall(); 749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 76fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * End call on particular subId or go to the Home screen 77fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 78fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return whether it hung up 79fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 8063f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville boolean endCallForSubscriber(int subId); 81fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 82fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Answer the currently-ringing call. 849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * If there's already a current active call, that call will be 869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * automatically put on hold. If both lines are currently in use, the 879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * current active call will be ended. 889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * TODO: provide a flag to let the caller specify what policy to use 909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * if both lines are in use. (The current behavior is hardwired to 919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * "answer incoming, end ongoing", which is how the CALL button 929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * is specced to behave.) 939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * TODO: this should be a oneway call (especially since it's called 959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * directly from the key queue thread). 969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project void answerRingingCall(); 989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 10005e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * Answer the currently-ringing call on particular subId . 10105e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * 10205e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * If there's already a current active call, that call will be 10305e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * automatically put on hold. If both lines are currently in use, the 10405e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * current active call will be ended. 10505e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * 10605e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * TODO: provide a flag to let the caller specify what policy to use 10705e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * if both lines are in use. (The current behavior is hardwired to 10805e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * "answer incoming, end ongoing", which is how the CALL button 10905e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * is specced to behave.) 11005e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * 11105e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * TODO: this should be a oneway call (especially since it's called 11205e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville * directly from the key queue thread). 11305e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville */ 11463f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville void answerRingingCallForSubscriber(int subId); 11505e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville 11605e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville /** 1179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Silence the ringer if an incoming call is currently ringing. 1189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * (If vibrating, stop the vibrator also.) 1199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 1209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * It's safe to call this if the ringer has already been silenced, or 1219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * even if there's no incoming call. (If so, this method will do nothing.) 1229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * 1239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * TODO: this should be a oneway call too (see above). 1249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * (Actually *all* the methods here that return void can 1259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * probably be oneway.) 1269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project void silenceRinger(); 1289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Check if we are in either an active or holding call 1316e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage the name of the package making the call. 1329066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return true if the phone state is OFFHOOK. 1339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1346e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt boolean isOffhook(String callingPackage); 1359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 137fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Check if a particular subId has an active or holding call 138fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * 139fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 1406e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage the name of the package making the call. 141fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return true if the phone state is OFFHOOK. 142fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 1436e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt boolean isOffhookForSubscriber(int subId, String callingPackage); 144fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 145fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 146fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Check if an incoming phone call is ringing or call waiting 147fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * on a particular subId. 148fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * 149fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 1506e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage the name of the package making the call. 151fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return true if the phone state is RINGING. 152fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 1536e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt boolean isRingingForSubscriber(int subId, String callingPackage); 154fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 155fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 1569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Check if an incoming phone call is ringing or call waiting. 1576e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage the name of the package making the call. 1589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return true if the phone state is RINGING. 1599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1606e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt boolean isRinging(String callingPackage); 1619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 1639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Check if the phone is idle. 1646e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage the name of the package making the call. 1659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return true if the phone state is IDLE. 1669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1676e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt boolean isIdle(String callingPackage); 1689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 170fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Check if the phone is idle on a particular subId. 171fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * 172fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 1736e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage the name of the package making the call. 174fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return true if the phone state is IDLE. 175fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 1766e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt boolean isIdleForSubscriber(int subId, String callingPackage); 177fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 178fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 1799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Check to see if the radio is on or not. 1806e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage the name of the package making the call. 1819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return returns true if the radio is on. 1829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1836e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt boolean isRadioOn(String callingPackage); 1849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 1859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 186fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Check to see if the radio is on or not on particular subId. 187fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 1886e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage the name of the package making the call. 189fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return returns true if the radio is on. 190fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 1916e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt boolean isRadioOnForSubscriber(int subId, String callingPackage); 192fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 193fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 1949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Supply a pin to unlock the SIM. Blocks until a result is determined. 1959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @param pin The pin to check. 1969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return whether the operation was a success. 1979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 1989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project boolean supplyPin(String pin); 1999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 2009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 201fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Supply a pin to unlock the SIM for particular subId. 202fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Blocks until a result is determined. 203fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param pin The pin to check. 204fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 205fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return whether the operation was a success. 206fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 20763f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville boolean supplyPinForSubscriber(int subId, String pin); 208fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 209fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 21098c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang * Supply puk to unlock the SIM and set SIM pin to new pin. 21198c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang * Blocks until a result is determined. 21298c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang * @param puk The puk to check. 21398c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang * pin The new pin to be set in SIM 21498c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang * @return whether the operation was a success. 21598c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang */ 21698c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang boolean supplyPuk(String puk, String pin); 21798c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang 21898c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang /** 219fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Supply puk to unlock the SIM and set SIM pin to new pin. 220fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Blocks until a result is determined. 221fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param puk The puk to check. 222fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * pin The new pin to be set in SIM 223fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 224fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return whether the operation was a success. 225fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 22663f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville boolean supplyPukForSubscriber(int subId, String puk, String pin); 227fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 228fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 229b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * Supply a pin to unlock the SIM. Blocks until a result is determined. 230b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * Returns a specific success/error code. 231b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * @param pin The pin to check. 232b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code 233b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * retValue[1] = number of attempts remaining if known otherwise -1 234b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville */ 235b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville int[] supplyPinReportResult(String pin); 236b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville 237b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville /** 238fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Supply a pin to unlock the SIM. Blocks until a result is determined. 239fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Returns a specific success/error code. 240fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param pin The pin to check. 241fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code 242fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * retValue[1] = number of attempts remaining if known otherwise -1 243fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 24463f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville int[] supplyPinReportResultForSubscriber(int subId, String pin); 245fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 246fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 247b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * Supply puk to unlock the SIM and set SIM pin to new pin. 248b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * Blocks until a result is determined. 249b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * Returns a specific success/error code 250b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * @param puk The puk to check 251b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * pin The pin to check. 252b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code 253b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville * retValue[1] = number of attempts remaining if known otherwise -1 254b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville */ 255b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville int[] supplyPukReportResult(String puk, String pin); 256b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville 257b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville /** 258fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Supply puk to unlock the SIM and set SIM pin to new pin. 259fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Blocks until a result is determined. 260fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Returns a specific success/error code 261fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param puk The puk to check 262fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * pin The pin to check. 263fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code 264fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * retValue[1] = number of attempts remaining if known otherwise -1 265fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 26663f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville int[] supplyPukReportResultForSubscriber(int subId, String puk, String pin); 267fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 268fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 2699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated 2709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * without SEND (so <code>dial</code> is not appropriate). 271767a662ecde33c3979bf02b793d392aca0403162Wink Saville * 2729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @param dialString the MMI command to be executed. 2739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * @return true if MMI command is executed. 2749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 2759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project boolean handlePinMmi(String dialString); 2769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 27719ba736c22869ec678ce0a79858ab3624fedee1bpkanwar 27819ba736c22869ec678ce0a79858ab3624fedee1bpkanwar /** 27919ba736c22869ec678ce0a79858ab3624fedee1bpkanwar * Handles USSD commands. 28019ba736c22869ec678ce0a79858ab3624fedee1bpkanwar * 281d570f63b72507a4c2a6d53d941f6d67dd72711e5pkanwar * @param subId The subscription to use. 28219ba736c22869ec678ce0a79858ab3624fedee1bpkanwar * @param ussdRequest the USSD command to be executed. 28319ba736c22869ec678ce0a79858ab3624fedee1bpkanwar * @param wrappedCallback receives a callback result. 28419ba736c22869ec678ce0a79858ab3624fedee1bpkanwar */ 285d570f63b72507a4c2a6d53d941f6d67dd72711e5pkanwar void handleUssdRequest(int subId, String ussdRequest, in ResultReceiver wrappedCallback); 28619ba736c22869ec678ce0a79858ab3624fedee1bpkanwar 2879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 288fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated 289fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * without SEND (so <code>dial</code> is not appropriate) for 290fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * a particular subId. 291fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param dialString the MMI command to be executed. 292fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 293fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return true if MMI command is executed. 294fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 29563f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville boolean handlePinMmiForSubscriber(int subId, String dialString); 296fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 297fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 2989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Toggles the radio on or off. 2999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project void toggleRadioOnOff(); 3019066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 3029066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 303fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Toggles the radio on or off on particular subId. 304fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 305fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 30663f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville void toggleRadioOnOffForSubscriber(int subId); 307fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 308fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 3099066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Set the radio to on or off 3109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project boolean setRadio(boolean turnOn); 3129066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 3139066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 314fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Set the radio to on or off on particular subId. 315fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 316fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 31763f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville boolean setRadioForSubscriber(int subId, boolean turnOn); 318fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 319fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 32045ac9645da0ceafbae8c00b0dd0a09800fdcefdfWink Saville * Set the radio to on or off unconditionally 32145ac9645da0ceafbae8c00b0dd0a09800fdcefdfWink Saville */ 32245ac9645da0ceafbae8c00b0dd0a09800fdcefdfWink Saville boolean setRadioPower(boolean turnOn); 32345ac9645da0ceafbae8c00b0dd0a09800fdcefdfWink Saville 32445ac9645da0ceafbae8c00b0dd0a09800fdcefdfWink Saville /** 3259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Request to update location information in service state 3269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project void updateServiceLocation(); 3289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 3299066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 330fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Request to update location information for a subscrition in service state 331fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 332fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 33363f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville void updateServiceLocationForSubscriber(int subId); 334fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 335fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 3369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Enable location update notifications. 3379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project void enableLocationUpdates(); 3399066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 3409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 341fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Enable location update notifications. 342fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 343fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 34463f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville void enableLocationUpdatesForSubscriber(int subId); 345fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 346fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 3479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Disable location update notifications. 3489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project void disableLocationUpdates(); 3509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 3519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 352fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Disable location update notifications. 353fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 354fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 35563f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville void disableLocationUpdatesForSubscriber(int subId); 356fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 357fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 3589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Allow mobile data connections. 3599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project boolean enableDataConnectivity(); 3619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 3629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 3639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Disallow mobile data connections. 3649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project boolean disableDataConnectivity(); 3669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 3679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 3689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Report whether data connectivity is possible. 3699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 3709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project boolean isDataConnectivityPossible(); 3719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 372275b5635ad98a411d511894e98f80e8b8bc41799Svetoslav Bundle getCellLocation(String callingPkg); 3739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 3749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project /** 3759066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * Returns the neighboring cell information of the device. 3769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */ 377f265ea9d8307282ff1da3915978625a94fc2859eDianne Hackborn List<NeighboringCellInfo> getNeighboringCellInfo(String callingPkg); 3789066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project 3799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project int getCallState(); 380fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 381fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 382dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * Returns the call state for a slot. 383fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 384dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal int getCallStateForSlot(int slotId); 385fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 3869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project int getDataActivity(); 3879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project int getDataState(); 388767a662ecde33c3979bf02b793d392aca0403162Wink Saville 389767a662ecde33c3979bf02b793d392aca0403162Wink Saville /** 390767a662ecde33c3979bf02b793d392aca0403162Wink Saville * Returns the current active phone type as integer. 391767a662ecde33c3979bf02b793d392aca0403162Wink Saville * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE 392767a662ecde33c3979bf02b793d392aca0403162Wink Saville * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE 393767a662ecde33c3979bf02b793d392aca0403162Wink Saville */ 394767a662ecde33c3979bf02b793d392aca0403162Wink Saville int getActivePhoneType(); 395767a662ecde33c3979bf02b793d392aca0403162Wink Saville 396e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville /** 397dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * Returns the current active phone type as integer for particular slot. 398fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE 399fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE 400dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * @param slotId - slot to query. 401fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 402dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal int getActivePhoneTypeForSlot(int slotId); 403fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 404fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 405e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville * Returns the CDMA ERI icon index to display 4066e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage package making the call. 407e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville */ 4086e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt int getCdmaEriIconIndex(String callingPackage); 409e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville 410e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville /** 411fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Returns the CDMA ERI icon index to display on particular subId. 412fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 4136e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage package making the call. 414fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 4156e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt int getCdmaEriIconIndexForSubscriber(int subId, String callingPackage); 416fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 417fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 418e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville * Returns the CDMA ERI icon mode, 419e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville * 0 - ON 420e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville * 1 - FLASHING 4216e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage package making the call. 422e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville */ 4236e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt int getCdmaEriIconMode(String callingPackage); 424e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville 425e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville /** 426fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Returns the CDMA ERI icon mode on particular subId, 427fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * 0 - ON 428fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * 1 - FLASHING 429fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 4306e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage package making the call. 431fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 4326e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt int getCdmaEriIconModeForSubscriber(int subId, String callingPackage); 433fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 434fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 435e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville * Returns the CDMA ERI text, 4366e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage package making the call. 437e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville */ 4386e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt String getCdmaEriText(String callingPackage); 439e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville 440dda5391d5079537e275c9f4ed2637a1484d0e4e8Wink Saville /** 441fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Returns the CDMA ERI text for particular subId, 442fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 4436e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage package making the call. 444fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 4456e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt String getCdmaEriTextForSubscriber(int subId, String callingPackage); 446fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 447fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 4484d8ae85b5de8a90a597e4b649c6ee7208e446e3bWink Saville * Returns true if OTA service provisioning needs to run. 4494d8ae85b5de8a90a597e4b649c6ee7208e446e3bWink Saville * Only relevant on some technologies, others will always 4504d8ae85b5de8a90a597e4b649c6ee7208e446e3bWink Saville * return false. 451767be5f0b929cc1eeb8a7d5aa7a02e228053e9bbJim Miller */ 4524d8ae85b5de8a90a597e4b649c6ee7208e446e3bWink Saville boolean needsOtaServiceProvisioning(); 453767be5f0b929cc1eeb8a7d5aa7a02e228053e9bbJim Miller 454767be5f0b929cc1eeb8a7d5aa7a02e228053e9bbJim Miller /** 4555c1a63c2235c36ce0b520fa88a9d21ffe255756eShishir Agrawal * Sets the voicemail number for a particular subscriber. 4565c1a63c2235c36ce0b520fa88a9d21ffe255756eShishir Agrawal */ 4575c1a63c2235c36ce0b520fa88a9d21ffe255756eShishir Agrawal boolean setVoiceMailNumber(int subId, String alphaTag, String number); 4585c1a63c2235c36ce0b520fa88a9d21ffe255756eShishir Agrawal 45912312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu /** 46012312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu * Sets the voice activation state for a particular subscriber. 46112312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu */ 46212312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu void setVoiceActivationState(int subId, int activationState); 46312312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu 46412312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu /** 46512312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu * Sets the data activation state for a particular subscriber. 46612312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu */ 46712312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu void setDataActivationState(int subId, int activationState); 46812312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu 46912312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu /** 47012312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu * Returns the voice activation state for a particular subscriber. 47112312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu * @param subId user preferred sub 47212312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu * @param callingPackage package queries voice activation state 47312312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu */ 47412312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu int getVoiceActivationState(int subId, String callingPackage); 47512312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu 47612312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu /** 47712312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu * Returns the data activation state for a particular subscriber. 47812312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu * @param subId user preferred sub 47912312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu * @param callingPackage package queris data activation state 48012312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu */ 48112312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu int getDataActivationState(int subId, String callingPackage); 48212312f6d758ab0fcd1b5a1c7c885cf4997098402fionaxu 4835c1a63c2235c36ce0b520fa88a9d21ffe255756eShishir Agrawal /** 484dda5391d5079537e275c9f4ed2637a1484d0e4e8Wink Saville * Returns the unread count of voicemails 485dda5391d5079537e275c9f4ed2637a1484d0e4e8Wink Saville */ 486ce099c3226b33b43e0dd5d1f24347b14a2223ee1David Krause int getVoiceMessageCount(); 487dda5391d5079537e275c9f4ed2637a1484d0e4e8Wink Saville 488ebe66345e7099ca6fc95e8aa4d31a5b5cbbd6224Li Zhe /** 489fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Returns the unread count of voicemails for a subId. 490fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 491fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Returns the unread count of voicemails 492fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 49363f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville int getVoiceMessageCountForSubscriber(int subId); 494fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 495a28dcbcd871ba3bb1fce4e2e4336712272d640e7pkanwar /** 496a28dcbcd871ba3bb1fce4e2e4336712272d640e7pkanwar * Returns true if current state supports both voice and data 497a28dcbcd871ba3bb1fce4e2e4336712272d640e7pkanwar * simultaneously. This can change based on location or network condition. 498a28dcbcd871ba3bb1fce4e2e4336712272d640e7pkanwar */ 499a28dcbcd871ba3bb1fce4e2e4336712272d640e7pkanwar boolean isConcurrentVoiceAndDataAllowed(int subId); 500a28dcbcd871ba3bb1fce4e2e4336712272d640e7pkanwar 50120f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen oneway void setVisualVoicemailEnabled(String callingPackage, 50220f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen in PhoneAccountHandle accountHandle, boolean enabled); 50320f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen 50420f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen boolean isVisualVoicemailEnabled(String callingPackage, 50520f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen in PhoneAccountHandle accountHandle); 50620f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen 507812188ad06660ec1b3b2b027ccfa291335021664Ta-wei Yen String getVisualVoicemailPackageName(String callingPackage, 508812188ad06660ec1b3b2b027ccfa291335021664Ta-wei Yen in PhoneAccountHandle phoneAccountHandle); 509812188ad06660ec1b3b2b027ccfa291335021664Ta-wei Yen 510349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen // Not oneway, caller needs to make sure the vaule is set before receiving a SMS 51167ab168b78782c4de5de3f44817961468533757cTa-wei Yen void enableVisualVoicemailSmsFilter(String callingPackage, int subId, 51267ab168b78782c4de5de3f44817961468533757cTa-wei Yen in VisualVoicemailSmsFilterSettings settings); 513349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen 51467ab168b78782c4de5de3f44817961468533757cTa-wei Yen oneway void disableVisualVoicemailSmsFilter(String callingPackage, int subId); 515349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen 51667ab168b78782c4de5de3f44817961468533757cTa-wei Yen // Get settings set by the calling package 51767ab168b78782c4de5de3f44817961468533757cTa-wei Yen VisualVoicemailSmsFilterSettings getVisualVoicemailSmsFilterSettings(String callingPackage, 51867ab168b78782c4de5de3f44817961468533757cTa-wei Yen int subId); 519349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen 520485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen /** 521485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen * Get settings set by the current default dialer, Internal use only. 522485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen * Requires READ_PRIVILEGED_PHONE_STATE permission. 523485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen */ 524485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen VisualVoicemailSmsFilterSettings getActiveVisualVoicemailSmsFilterSettings(int subId); 525485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen 526485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen /** 527485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen * Send a visual voicemail SMS. Internal use only. 528485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen * Requires caller to be the default dialer and have SEND_SMS permission 529485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen */ 530485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen oneway void sendVisualVoicemailSmsForSubscriber(in String callingPackage, in int subId, 531485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen in String number, in int port, in String text, in PendingIntent sentIntent); 532349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen 533de56b1f00a8f8ded8bde7001cc59a2c277651ea8fionaxu // Send the special dialer code. The IPC caller must be the current default dialer. 534de56b1f00a8f8ded8bde7001cc59a2c277651ea8fionaxu boolean sendDialerCode(String callingPackageName, String inputCode); 535de56b1f00a8f8ded8bde7001cc59a2c277651ea8fionaxu 536fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 5376e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * Returns the network type for data transmission 5389bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt * Legacy call, permission-free 5396e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt */ 5409bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt int getNetworkType(); 54198c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang 542e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville /** 543fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Returns the network type of a subId. 544fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 5456e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage package making the call. 546fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 5476e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt int getNetworkTypeForSubscriber(int subId, String callingPackage); 548fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 549fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 5506e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * Returns the network type for data transmission 5516e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage package making the call. 5526e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt */ 5536e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt int getDataNetworkType(String callingPackage); 5540dde2c20a07770bc2f1b21e49222c968f3d8b39aWink Saville 5550dde2c20a07770bc2f1b21e49222c968f3d8b39aWink Saville /** 5566e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * Returns the data network type of a subId 5576e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param subId user preferred subId. 5586e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage package making the call. 5596e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt */ 5606e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt int getDataNetworkTypeForSubscriber(int subId, String callingPackage); 561fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 562fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 563fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Returns the voice network type of a subId 564fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param subId user preferred subId. 5659bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt * @param callingPackage package making the call. 566fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Returns the network type 567fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 5689bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt int getVoiceNetworkTypeForSubscriber(int subId, String callingPackage); 569fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 570fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 571e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville * Return true if an ICC card is present 572e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville */ 573e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville boolean hasIccCard(); 5745e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville 5755e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville /** 576fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Return true if an ICC card is present for a subId. 577fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @param slotId user preferred slotId. 578fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Return true if an ICC card is present 579fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 58063f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville boolean hasIccCardUsingSlotId(int slotId); 581fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 582fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 5835e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville * Return if the current radio is LTE on CDMA. This 5845e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville * is a tri-state return value as for a period of time 5855e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville * the mode may be unknown. 5865e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville * 5876e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage the name of the calling package 5885e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE} 5895e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville * or {@link PHone#LTE_ON_CDMA_TRUE} 5905e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville */ 5916e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt int getLteOnCdmaMode(String callingPackage); 592963db55d59a170f4b17ff907c96615a19ef6fe17John Wang 593963db55d59a170f4b17ff907c96615a19ef6fe17John Wang /** 594fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Return if the current radio is LTE on CDMA. This 595fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * is a tri-state return value as for a period of time 596fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * the mode may be unknown. 597fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * 5986e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage the name of the calling package 599fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE} 600fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * or {@link PHone#LTE_ON_CDMA_TRUE} 601fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 6026e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt int getLteOnCdmaModeForSubscriber(int subId, String callingPackage); 603fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 604fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 605963db55d59a170f4b17ff907c96615a19ef6fe17John Wang * Returns the all observed cell information of the device. 606963db55d59a170f4b17ff907c96615a19ef6fe17John Wang */ 607275b5635ad98a411d511894e98f80e8b8bc41799Svetoslav List<CellInfo> getAllCellInfo(String callingPkg); 608094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville 609094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville /** 610094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville * Sets minimum time in milli-seconds between onCellInfoChanged 611094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville */ 612094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville void setCellInfoListRate(int rateInMillis); 613767a662ecde33c3979bf02b793d392aca0403162Wink Saville 61457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal /** 615fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * get default sim 616fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * @return sim id 617fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 618fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville int getDefaultSim(); 619fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 620fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 62157f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * Opens a logical channel to the ICC card. 62257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * 62357f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * Input parameters equivalent to TS 27.007 AT+CCHO command. 62457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * 62552103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal * @param subId The subscription to use. 62657f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * @param AID Application id. See ETSI 102.221 and 101.220. 627a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @return an IccOpenLogicalChannelResponse object. 62857f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal */ 62952103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID); 63057f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal 63157f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal /** 63257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * Closes a previously opened logical channel to the ICC card. 63357f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * 63457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * Input parameters equivalent to TS 27.007 AT+CCHC command. 63557f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * 63652103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal * @param subId The subscription to use. 63757f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * @param channel is the channel id to be closed as retruned by a 63857f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * successful iccOpenLogicalChannel. 63957f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * @return true if the channel was closed successfully. 64057f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal */ 64152103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal boolean iccCloseLogicalChannel(int subId, int channel); 64257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal 64357f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal /** 64457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * Transmit an APDU to the ICC card over a logical channel. 64557f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * 64657f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * Input parameters equivalent to TS 27.007 AT+CGLA command. 64757f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * 64852103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal * @param subId The subscription to use. 64957f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * @param channel is the channel id to be closed as retruned by a 65057f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * successful iccOpenLogicalChannel. 65157f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * @param cla Class of the APDU command. 65257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * @param instruction Instruction of the APDU command. 65357f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * @param p1 P1 value of the APDU command. 65457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * @param p2 P2 value of the APDU command. 65557f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 65657f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * is sent to the SIM. 65757f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * @param data Data to be sent with the APDU. 65857f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal * @return The APDU response from the ICC card with the status appended at 65943d94347a6feb14870a4ffd7682a816210e5e676Shishir Agrawal * the end. 66057f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal */ 66152103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal String iccTransmitApduLogicalChannel(int subId, int channel, int cla, int instruction, 66257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal int p1, int p2, int p3, String data); 6638f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby 6648f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby /** 665a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * Transmit an APDU to the ICC card over the basic channel. 666a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * 667a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * Input parameters equivalent to TS 27.007 AT+CSIM command. 668a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * 66952103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal * @param subId The subscription to use. 670a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param cla Class of the APDU command. 671a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param instruction Instruction of the APDU command. 672a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param p1 P1 value of the APDU command. 673a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param p2 P2 value of the APDU command. 674a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU 675a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * is sent to the SIM. 676a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param data Data to be sent with the APDU. 677a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @return The APDU response from the ICC card with the status appended at 67843d94347a6feb14870a4ffd7682a816210e5e676Shishir Agrawal * the end. 679a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal */ 68052103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal String iccTransmitApduBasicChannel(int subId, int cla, int instruction, 681a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal int p1, int p2, int p3, String data); 682a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal 683a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal /** 684a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * Returns the response APDU for a command APDU sent through SIM_IO. 685a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * 68652103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal * @param subId The subscription to use. 687a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param fileID 688a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param command 689a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param p1 P1 value of the APDU command. 690a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param p2 P2 value of the APDU command. 691a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param p3 P3 value of the APDU command. 692a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @param filePath 693a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal * @return The APDU response. 694a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal */ 69552103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal byte[] iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2, int p3, 696a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal String filePath); 697a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal 698a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal /** 699b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton * Send ENVELOPE to the SIM and returns the response. 700210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton * 70152103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal * @param subId The subscription to use. 702210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton * @param contents String containing SAT/USAT response in hexadecimal 703210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton * format starting with command tag. See TS 102 223 for 704210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton * details. 705b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton * @return The APDU response from the ICC card, with the last 4 bytes 706b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton * being the status word. If the command fails, returns an empty 707b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton * string. 708210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton */ 70952103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal String sendEnvelopeWithStatus(int subId, String content); 710210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton 711210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton /** 7128f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 7138f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * Used for device configuration by some CDMA operators. 7148f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * 7158f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * @param itemID the ID of the item to read. 7168f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * @return the NV item as a String, or null on any failure. 7178f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby */ 7188f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby String nvReadItem(int itemID); 7198f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby 7208f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby /** 7218f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}. 7228f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * Used for device configuration by some CDMA operators. 7238f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * 7248f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * @param itemID the ID of the item to read. 7258f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * @param itemValue the value to write, as a String. 7268f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * @return true on success; false on any failure. 7278f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby */ 7288f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby boolean nvWriteItem(int itemID, String itemValue); 7298f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby 7308f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby /** 7318f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage. 7328f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * Used for device configuration by some CDMA operators. 7338f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * 7348f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * @param preferredRoamingList byte array containing the new PRL. 7358f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * @return true on success; false on any failure. 7368f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby */ 7378f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby boolean nvWriteCdmaPrl(in byte[] preferredRoamingList); 7388f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby 7398f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby /** 740786e71ab11f2d89afffc9db7473f16206395c813Jake Hamby * Perform the specified type of NV config reset. The radio will be taken offline 741786e71ab11f2d89afffc9db7473f16206395c813Jake Hamby * and the device must be rebooted after the operation. Used for device 742786e71ab11f2d89afffc9db7473f16206395c813Jake Hamby * configuration by some CDMA operators. 7438f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * 7448f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * @param resetType the type of reset to perform (1 == factory reset; 2 == NV-only reset). 7458f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby * @return true on success; false on any failure. 7468f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby */ 7478f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby boolean nvResetConfig(int resetType); 7488f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby 7499bbb37116d2c5b597f9b5e3094ff328971e03c0bEvan Charlton /* 7501365703d4964466472904dc84117a0946d9e1a44Junda Liu * Get the calculated preferred network type. 7511365703d4964466472904dc84117a0946d9e1a44Junda Liu * Used for device configuration by some CDMA operators. 75216a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov * @param callingPackage The package making the call. 7531365703d4964466472904dc84117a0946d9e1a44Junda Liu * 7541365703d4964466472904dc84117a0946d9e1a44Junda Liu * @return the calculated preferred network type, defined in RILConstants.java. 7551365703d4964466472904dc84117a0946d9e1a44Junda Liu */ 75616a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov int getCalculatedPreferredNetworkType(String callingPackage); 7571365703d4964466472904dc84117a0946d9e1a44Junda Liu 7581365703d4964466472904dc84117a0946d9e1a44Junda Liu /* 7594a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby * Get the preferred network type. 7604a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby * Used for device configuration by some CDMA operators. 7614a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby * 762984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott * @param subId the id of the subscription to query. 7634a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby * @return the preferred network type, defined in RILConstants.java. 7644a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby */ 765984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott int getPreferredNetworkType(int subId); 7664a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby 7674a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby /** 76838531581fc19f9172fabe56047b326e5dab88625Junda Liu * Check TETHER_DUN_REQUIRED and TETHER_DUN_APN settings, net.tethering.noprovisioning 76938531581fc19f9172fabe56047b326e5dab88625Junda Liu * SystemProperty, and config_tether_apndata to decide whether DUN APN is required for 77038531581fc19f9172fabe56047b326e5dab88625Junda Liu * tethering. 77138531581fc19f9172fabe56047b326e5dab88625Junda Liu * 77238531581fc19f9172fabe56047b326e5dab88625Junda Liu * @return 0: Not required. 1: required. 2: Not set. 77338531581fc19f9172fabe56047b326e5dab88625Junda Liu */ 77438531581fc19f9172fabe56047b326e5dab88625Junda Liu int getTetherApnRequired(); 77538531581fc19f9172fabe56047b326e5dab88625Junda Liu 77638531581fc19f9172fabe56047b326e5dab88625Junda Liu /** 777e37ebbffb01042b667633362459c3a069575ad46Brad Ebinger * Get ImsServiceController binder from ImsResolver that corresponds to the subId and feature 778e37ebbffb01042b667633362459c3a069575ad46Brad Ebinger * requested as well as registering the ImsServiceController for callbacks using the 779e37ebbffb01042b667633362459c3a069575ad46Brad Ebinger * IImsServiceFeatureListener interface. 780e37ebbffb01042b667633362459c3a069575ad46Brad Ebinger */ 781e37ebbffb01042b667633362459c3a069575ad46Brad Ebinger IImsServiceController getImsServiceControllerAndListen(int slotId, int feature, 782e37ebbffb01042b667633362459c3a069575ad46Brad Ebinger IImsServiceFeatureListener callback); 783e37ebbffb01042b667633362459c3a069575ad46Brad Ebinger 784e37ebbffb01042b667633362459c3a069575ad46Brad Ebinger /** 785984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott * Set the network selection mode to automatic. 786984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott * 787984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott * @param subId the id of the subscription to update. 788984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott */ 789984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott void setNetworkSelectionModeAutomatic(int subId); 790984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott 791984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott /** 792d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal * Perform a radio scan and return the list of avialble networks. 793d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal * 794d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal * @param subId the id of the subscription. 795d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal * @return CellNetworkScanResult containing status of scan and networks. 796d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal */ 797d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal CellNetworkScanResult getCellNetworkScanResults(int subId); 798d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal 799d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal /** 800d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal * Ask the radio to connect to the input network and change selection mode to manual. 801d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal * 802d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal * @param subId the id of the subscription. 803d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal * @param operatorInfo the operator to attach to. 804e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal * @param persistSelection should the selection persist till reboot or its 805e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal * turned off? Will also result in notification being not shown to 806e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal * the user if the signal is lost. 807d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal * @return true if the request suceeded. 808d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal */ 809e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal boolean setNetworkSelectionModeManual(int subId, in OperatorInfo operator, 810e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal boolean persistSelection); 811d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal 812d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal /** 8134a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby * Set the preferred network type. 8144a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby * Used for device configuration by some CDMA operators. 8154a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby * 816984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott * @param subId the id of the subscription to update. 8174a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby * @param networkType the preferred network type, defined in RILConstants.java. 8184a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby * @return true on success; false on any failure. 8194a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby */ 820984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott boolean setPreferredNetworkType(int subId, int networkType); 821afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt 822afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt /** 823afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt * User enable/disable Mobile Data. 824afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt * 825afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt * @param enable true to turn on, else false 826afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt */ 82736ffb0494dd1045c164b7479b68165e206f8c759Wink Saville void setDataEnabled(int subId, boolean enable); 828afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt 829afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt /** 830afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt * Get the user enabled state of Mobile Data. 831afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt * 832afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt * @return true on enabled 833afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt */ 83436ffb0494dd1045c164b7479b68165e206f8c759Wink Saville boolean getDataEnabled(int subId); 835fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 836fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 837fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Get P-CSCF address from PCO after data connection is established or modified. 838e647099e14114475e9a2827a10dab2d2e36308c4ram * @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN 83916a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov * @param callingPackage The package making the call. 840fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 84116a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov String[] getPcscfAddress(String apnType, String callingPackage); 842fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 843fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville /** 844fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville * Set IMS registration state 845fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville */ 846fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville void setImsRegistrationState(boolean registered); 847fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 848762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal /** 8492b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu * Return MDN string for CDMA phone. 8502b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu * @param subId user preferred subId. 8512b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu */ 85263f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville String getCdmaMdn(int subId); 8532b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu 8542b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu /** 8552b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu * Return MIN string for CDMA phone. 8562b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu * @param subId user preferred subId. 8572b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu */ 85863f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville String getCdmaMin(int subId); 8592b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu 8602b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu /** 861762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal * Has the calling application been granted special privileges by the carrier. 862762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal * 863762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal * If any of the packages in the calling UID has carrier privileges, the 864762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal * call will return true. This access is granted by the owner of the UICC 865762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal * card and does not depend on the registered carrier. 866762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal * 867762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal * TODO: Add a link to documentation. 868762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal * 86952103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal * @param subId The subscription to use. 870fc3646f58e5851e7a483b8388bdd826078166d10Shishir Agrawal * @return carrier privilege status defined in TelephonyManager. 871762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal */ 87252103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal int getCarrierPrivilegeStatus(int subId); 873142529702dad9a6612271f487d500db80173ba7bJunda Liu 874142529702dad9a6612271f487d500db80173ba7bJunda Liu /** 875b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson * Similar to above, but check for the package whose name is pkgName. 876142529702dad9a6612271f487d500db80173ba7bJunda Liu */ 877b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson int checkCarrierPrivilegesForPackage(String pkgName); 878b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson 879b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson /** 880b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson * Similar to above, but check across all phones. 881b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson */ 882b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson int checkCarrierPrivilegesForPackageAnyPhone(String pkgName); 883f9aefdb534c6cb2af22dfb7614a1c15c2d67dd9cDerek Tan 884f9aefdb534c6cb2af22dfb7614a1c15c2d67dd9cDerek Tan /** 885f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu * Returns list of the package names of the carrier apps that should handle the input intent 886f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu * and have carrier privileges for the given phoneId. 88763c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal * 8883892fc0349a91097f53152eaf2801dfebb2066caDiego Pontoriero * @param intent Intent that will be sent. 889f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu * @param phoneId The phoneId on which the carrier app has carrier privileges. 890f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu * @return list of carrier app package names that can handle the intent on phoneId. 89163c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal * Returns null if there is an error and an empty list if there 89263c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal * are no matching packages. 89363c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal */ 894f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu List<String> getCarrierPackageNamesForIntentAndPhone(in Intent intent, int phoneId); 89563c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal 89663c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal /** 8972bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan * Set the line 1 phone number string and its alphatag for the current ICCID 8982bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan * for display purpose only, for example, displayed in Phone Status. It won't 8992bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan * change the actual MSISDN/MDN. To unset alphatag or number, pass in a null 9002bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan * value. 901818631b679171ffb49eaa641bee06b9c953651daDerek Tan * 902818631b679171ffb49eaa641bee06b9c953651daDerek Tan * @param subId the subscriber that the alphatag and dialing number belongs to. 903818631b679171ffb49eaa641bee06b9c953651daDerek Tan * @param alphaTag alpha-tagging of the dailing nubmer 904818631b679171ffb49eaa641bee06b9c953651daDerek Tan * @param number The dialing number 9050201a6f6f16a872405a5f9ee65026e948eb162d0Shishir Agrawal * @return true if the operation was executed correctly. 906818631b679171ffb49eaa641bee06b9c953651daDerek Tan */ 9070201a6f6f16a872405a5f9ee65026e948eb162d0Shishir Agrawal boolean setLine1NumberForDisplayForSubscriber(int subId, String alphaTag, String number); 908818631b679171ffb49eaa641bee06b9c953651daDerek Tan 909818631b679171ffb49eaa641bee06b9c953651daDerek Tan /** 910818631b679171ffb49eaa641bee06b9c953651daDerek Tan * Returns the displayed dialing number string if it was set previously via 911818631b679171ffb49eaa641bee06b9c953651daDerek Tan * {@link #setLine1NumberForDisplay}. Otherwise returns null. 912818631b679171ffb49eaa641bee06b9c953651daDerek Tan * 913818631b679171ffb49eaa641bee06b9c953651daDerek Tan * @param subId whose dialing number for line 1 is returned. 91416a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov * @param callingPackage The package making the call. 915818631b679171ffb49eaa641bee06b9c953651daDerek Tan * @return the displayed dialing number if set, or null if not set. 916818631b679171ffb49eaa641bee06b9c953651daDerek Tan */ 91716a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov String getLine1NumberForDisplay(int subId, String callingPackage); 918818631b679171ffb49eaa641bee06b9c953651daDerek Tan 919818631b679171ffb49eaa641bee06b9c953651daDerek Tan /** 920818631b679171ffb49eaa641bee06b9c953651daDerek Tan * Returns the displayed alphatag of the dialing number if it was set 921818631b679171ffb49eaa641bee06b9c953651daDerek Tan * previously via {@link #setLine1NumberForDisplay}. Otherwise returns null. 922818631b679171ffb49eaa641bee06b9c953651daDerek Tan * 923818631b679171ffb49eaa641bee06b9c953651daDerek Tan * @param subId whose alphatag associated with line 1 is returned. 92416a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov * @param callingPackage The package making the call. 925818631b679171ffb49eaa641bee06b9c953651daDerek Tan * @return the displayed alphatag of the dialing number if set, or null if 926818631b679171ffb49eaa641bee06b9c953651daDerek Tan * not set. 927818631b679171ffb49eaa641bee06b9c953651daDerek Tan */ 92816a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov String getLine1AlphaTagForDisplay(int subId, String callingPackage); 92986578cca383562c72751d747905280afdeb2bdfbShishir Agrawal 930d24e4eafdb3e42de5a8fd080fcd50ebf4c7bcb71Fyodor Kupolov String[] getMergedSubscriberIds(String callingPackage); 9313256601f5e4d94713f59e97b9d4912875c1bdcafJeff Sharkey 93286578cca383562c72751d747905280afdeb2bdfbShishir Agrawal /** 933d2cfa92146ecfa5e00d4a3ce8e63b1a588845fe2Shishir Agrawal * Override the operator branding for the current ICCID. 93486578cca383562c72751d747905280afdeb2bdfbShishir Agrawal * 935d2cfa92146ecfa5e00d4a3ce8e63b1a588845fe2Shishir Agrawal * Once set, whenever the SIM is present in the device, the service 93686578cca383562c72751d747905280afdeb2bdfbShishir Agrawal * provider name (SPN) and the operator name will both be replaced by the 93786578cca383562c72751d747905280afdeb2bdfbShishir Agrawal * brand value input. To unset the value, the same function should be 93886578cca383562c72751d747905280afdeb2bdfbShishir Agrawal * called with a null brand value. 93986578cca383562c72751d747905280afdeb2bdfbShishir Agrawal * 94086578cca383562c72751d747905280afdeb2bdfbShishir Agrawal * <p>Requires Permission: 94186578cca383562c72751d747905280afdeb2bdfbShishir Agrawal * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} 94286578cca383562c72751d747905280afdeb2bdfbShishir Agrawal * or has to be carrier app - see #hasCarrierPrivileges. 94386578cca383562c72751d747905280afdeb2bdfbShishir Agrawal * 94452103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal * @param subId The subscription to use. 94586578cca383562c72751d747905280afdeb2bdfbShishir Agrawal * @param brand The brand name to display/set. 94686578cca383562c72751d747905280afdeb2bdfbShishir Agrawal * @return true if the operation was executed correctly. 94786578cca383562c72751d747905280afdeb2bdfbShishir Agrawal */ 94852103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal boolean setOperatorBrandOverride(int subId, String brand); 9493099c831441e861328cd4965011c854e060ce56aSteven Liu 9503099c831441e861328cd4965011c854e060ce56aSteven Liu /** 9515fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * Override the roaming indicator for the current ICCID. 9525fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * 9535fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * Using this call, the carrier app (see #hasCarrierPrivileges) can override 9545fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * the platform's notion of a network operator being considered roaming or not. 9555fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * The change only affects the ICCID that was active when this call was made. 9565fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * 9575fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * If null is passed as any of the input, the corresponding value is deleted. 9585fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * 9595fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * <p>Requires that the caller have carrier privilege. See #hasCarrierPrivileges. 9605fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * 96152103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal * @param subId for which the roaming overrides apply. 9625fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * @param gsmRoamingList - List of MCCMNCs to be considered roaming for 3GPP RATs. 9635fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * @param gsmNonRoamingList - List of MCCMNCs to be considered not roaming for 3GPP RATs. 9645fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * @param cdmaRoamingList - List of SIDs to be considered roaming for 3GPP2 RATs. 9655fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * @param cdmaNonRoamingList - List of SIDs to be considered not roaming for 3GPP2 RATs. 9665fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal * @return true if the operation was executed correctly. 9675fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal */ 96852103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal boolean setRoamingOverride(int subId, in List<String> gsmRoamingList, 9695fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal in List<String> gsmNonRoamingList, in List<String> cdmaRoamingList, 9705fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal in List<String> cdmaNonRoamingList); 9715fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal 9725fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal /** 9733099c831441e861328cd4965011c854e060ce56aSteven Liu * Returns the result and response from RIL for oem request 9743099c831441e861328cd4965011c854e060ce56aSteven Liu * 9753099c831441e861328cd4965011c854e060ce56aSteven Liu * @param oemReq the data is sent to ril. 9763099c831441e861328cd4965011c854e060ce56aSteven Liu * @param oemResp the respose data from RIL. 9773099c831441e861328cd4965011c854e060ce56aSteven Liu * @return negative value request was not handled or get error 9783099c831441e861328cd4965011c854e060ce56aSteven Liu * 0 request was handled succesfully, but no response data 9793099c831441e861328cd4965011c854e060ce56aSteven Liu * positive value success, data length of response 9803099c831441e861328cd4965011c854e060ce56aSteven Liu */ 9813099c831441e861328cd4965011c854e060ce56aSteven Liu int invokeOemRilRequestRaw(in byte[] oemReq, out byte[] oemResp); 982fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville 983bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla /** 984bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla * Check if any mobile Radios need to be shutdown. 985bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla * 986bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla * @return true is any mobile radio needs to be shutdown 987bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla */ 988bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla boolean needMobileRadioShutdown(); 989bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla 990bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla /** 991bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla * Shutdown Mobile Radios 992bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla */ 993bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla void shutdownMobileRadios(); 9942af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville 9952af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville /** 9962af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville * Set phone radio type and access technology. 9972af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville * 9982af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville * @param rafs an RadioAccessFamily array to indicate all phone's 9992af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville * new radio access family. The length of RadioAccessFamily 10002af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville * must equ]]al to phone count. 10012af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville */ 10022af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville void setRadioCapability(in RadioAccessFamily[] rafs); 10032af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville 10042af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville /** 10052af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville * Get phone radio type and access technology. 10062af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville * 10072af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville * @param phoneId which phone you want to get 10086e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt * @param callingPackage the name of the package making the call 10092af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville * @return phone radio type and access technology 10102af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville */ 10116e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt int getRadioAccessFamily(in int phoneId, String callingPackage); 10124a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee 10134a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee /** 10144a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee * Enables or disables video calling. 10154a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee * 10164a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee * @param enable Whether to enable video calling. 10174a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee */ 10184a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee void enableVideoCalling(boolean enable); 10194a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee 10204a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee /** 10214a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee * Whether video calling has been enabled by the user. 10224a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee * 102316a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov * @param callingPackage The package making the call. 102467fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee * @return {@code true} if the user has enabled video calling, {@code false} otherwise. 10254a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee */ 102616a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov boolean isVideoCallingEnabled(String callingPackage); 10270b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe 10280303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com /** 102967fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee * Whether the DTMF tone length can be changed. 103067fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee * 103167fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee * @return {@code true} if the DTMF tone length can be changed. 103267fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee */ 103367fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee boolean canChangeDtmfToneLength(); 103467fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee 103567fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee /** 103667fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee * Whether the device is a world phone. 103767fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee * 103867fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee * @return {@code true} if the devices is a world phone. 103967fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee */ 104067fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee boolean isWorldPhone(); 104167fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee 104267fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee /** 1043f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee * Whether the phone supports TTY mode. 1044f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee * 1045f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee * @return {@code true} if the device supports TTY mode. 1046f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee */ 1047f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee boolean isTtyModeSupported(); 1048f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee 1049f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee /** 1050f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee * Whether the phone supports hearing aid compatibility. 1051f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee * 1052f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee * @return {@code true} if the device supports hearing aid compatibility. 1053f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee */ 1054f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee boolean isHearingAidCompatibilitySupported(); 1055b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen 1056f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee /** 10570303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com * Get IMS Registration Status 10580303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com */ 10590303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com boolean isImsRegistered(); 10600b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe 10610b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe /** 106242eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold * Returns the Status of Wi-Fi Calling 106342eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold */ 1064b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen boolean isWifiCallingAvailable(); 1065740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen 1066b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen /** 1067b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen * Returns the Status of Volte 1068b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen */ 1069b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen boolean isVolteAvailable(); 107042eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold 107142eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold /** 1072b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen * Returns the Status of VT (video telephony) 107342eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold */ 1074b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen boolean isVideoTelephonyAvailable(); 107542eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold 107642eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold /** 10770b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe * Returns the unique device ID of phone, for example, the IMEI for 10780b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe * GSM and the MEID for CDMA phones. Return null if device ID is not available. 10790b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe * 108016a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov * @param callingPackage The package making the call. 10810b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe * <p>Requires Permission: 10820b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} 10830b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe */ 108416a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov String getDeviceId(String callingPackage); 1085ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon 1086ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon /** 1087dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * Returns the IMEI for the given slot. 1088dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * 1089dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * @param slotId - device slot. 1090dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * @param callingPackage The package making the call. 1091dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * <p>Requires Permission: 1092dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} 1093dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal */ 1094dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal String getImeiForSlot(int slotId, String callingPackage); 1095dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal 1096dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal /** 1097dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * Returns the device software version. 1098dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * 1099dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * @param slotId - device slot. 1100dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * @param callingPackage The package making the call. 1101dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * <p>Requires Permission: 1102dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal * {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE} 1103dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal */ 1104dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal String getDeviceSoftwareVersionForSlot(int slotId, String callingPackage); 1105dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal 1106dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal /** 1107ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon * Returns the subscription ID associated with the specified PhoneAccount. 1108ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon */ 1109ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon int getSubIdForPhoneAccount(in PhoneAccount phoneAccount); 1110f1fb39763d87dabe254b6ed64ac8f20145035bc0Stuart Scott 1111f1fb39763d87dabe254b6ed64ac8f20145035bc0Stuart Scott void factoryReset(int subId); 11127ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath 11137ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath /** 11147ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath * An estimate of the users's current locale based on the default SIM. 11157ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath * 11167ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath * The returned string will be a well formed BCP-47 language tag, or {@code null} 11177ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath * if no locale could be derived. 11187ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath */ 11197ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath String getLocaleFromDefaultSim(); 11205c728994311c40821604c6711171e860776659a6Prerepa Viswanadham 11215c728994311c40821604c6711171e860776659a6Prerepa Viswanadham /** 1122010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski * Requests the modem activity info asynchronously. 1123010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski * The implementor is expected to reply with the 1124010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski * {@link android.telephony.ModemActivityInfo} object placed into the Bundle with the key 1125010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski * {@link android.telephony.TelephonyManager#MODEM_ACTIVITY_RESULT_KEY}. 1126010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski * The result code is ignored. 11275c728994311c40821604c6711171e860776659a6Prerepa Viswanadham */ 1128010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski oneway void requestModemActivityInfo(in ResultReceiver result); 112939daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu 113039daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu /** 113139daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu * Get the service state on specified subscription 113239daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu * @param subId Subscription id 113339daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu * @param callingPackage The package making the call 113439daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu * @return Service state on specified subscription. 113539daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu */ 113639daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu ServiceState getServiceStateForSubscriber(int subId, String callingPackage); 1137740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen 1138740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen /** 1139740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen * Returns the URI for the per-account voicemail ringtone set in Phone settings. 1140740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen * 1141740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the 1142740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen * voicemail ringtone. 1143740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen * @return The URI for the ringtone to play when receiving a voicemail from a specific 1144740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen * PhoneAccount. 1145740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen */ 1146740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen Uri getVoicemailRingtoneUri(in PhoneAccountHandle accountHandle); 1147740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen 1148740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen /** 1149740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen * Returns whether vibration is set for voicemail notification in Phone settings. 1150740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen * 1151740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the 1152740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen * voicemail vibration setting. 1153740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise. 1154740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen */ 1155740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen boolean isVoicemailVibrationEnabled(in PhoneAccountHandle accountHandle); 11564ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani 11574ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani /** 11584ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani * Returns a list of packages that have carrier privileges. 11594ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani */ 11604ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani List<String> getPackagesWithCarrierPrivileges(); 11612da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang 11622da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang /** 11632da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang * Return the application ID for the app type. 11642da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang * 11652da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang * @param subId the subscription ID that this request applies to. 11662da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang * @param appType the uicc app type, 11672da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang * @return Application ID for specificied app type or null if no uicc or error. 11682da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang */ 11692da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang String getAidForAppType(int subId, int appType); 11707717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang 11717717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang /** 11727717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang * Return the Electronic Serial Number. 11737717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang * 11747717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission 11757717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang * 11767717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang * @param subId the subscription ID that this request applies to. 11777717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang * @return ESN or null if error. 11787717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang * @hide 11797717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang */ 11807717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang String getEsn(int subId); 118106e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe 118206e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe /** 11834eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang * Return the Preferred Roaming List Version 11844eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang * 11854eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission 11864eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang * @param subId the subscription ID that this request applies to. 11874eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang * @return PRLVersion or null if error. 11884eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang * @hide 11894eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang */ 11904eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang String getCdmaPrlVersion(int subId); 11914eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang 11924eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang /** 119306e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe * Get snapshot of Telephony histograms 119406e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe * @return List of Telephony histograms 119506e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe * Requires Permission: 119606e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe * {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE} 119706e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe * Or the calling app has carrier privileges. 119806e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe */ 119906e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe List<TelephonyHistogram> getTelephonyHistograms(); 120064997623bfa04e80064b6056fab0fb23144acb44Meng Wang 120164997623bfa04e80064b6056fab0fb23144acb44Meng Wang /** 120264997623bfa04e80064b6056fab0fb23144acb44Meng Wang * Set the allowed carrier list for slotId 120364997623bfa04e80064b6056fab0fb23144acb44Meng Wang * Require system privileges. In the future we may add this to carrier APIs. 120464997623bfa04e80064b6056fab0fb23144acb44Meng Wang * 120564997623bfa04e80064b6056fab0fb23144acb44Meng Wang * @return The number of carriers set successfully. Should match length of 120664997623bfa04e80064b6056fab0fb23144acb44Meng Wang * carriers on success. 120764997623bfa04e80064b6056fab0fb23144acb44Meng Wang */ 120864997623bfa04e80064b6056fab0fb23144acb44Meng Wang int setAllowedCarriers(int slotId, in List<CarrierIdentifier> carriers); 120964997623bfa04e80064b6056fab0fb23144acb44Meng Wang 121064997623bfa04e80064b6056fab0fb23144acb44Meng Wang /** 121164997623bfa04e80064b6056fab0fb23144acb44Meng Wang * Get the allowed carrier list for slotId. 121264997623bfa04e80064b6056fab0fb23144acb44Meng Wang * Require system privileges. In the future we may add this to carrier APIs. 121364997623bfa04e80064b6056fab0fb23144acb44Meng Wang * 121464997623bfa04e80064b6056fab0fb23144acb44Meng Wang * @return List of {@link android.service.carrier.CarrierIdentifier}; empty list 121564997623bfa04e80064b6056fab0fb23144acb44Meng Wang * means all carriers are allowed. 121664997623bfa04e80064b6056fab0fb23144acb44Meng Wang */ 121764997623bfa04e80064b6056fab0fb23144acb44Meng Wang List<CarrierIdentifier> getAllowedCarriers(int slotId); 12181bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu 1219b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu /** 1220b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu * Action set from carrier signalling broadcast receivers to enable/disable metered apns 1221b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required 1222b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu * @param subId the subscription ID that this action applies to. 1223b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu * @param enabled control enable or disable metered apns. 1224b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu * @hide 1225b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu */ 12261bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu void carrierActionSetMeteredApnsEnabled(int subId, boolean visible); 12271bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu 12281bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu /** 12291bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu * Action set from carrier signalling broadcast receivers to enable/disable radio 12301bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required 12311bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu * @param subId the subscription ID that this action applies to. 12321bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu * @param enabled control enable or disable radio. 12331bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu * @hide 12341bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu */ 12351bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu void carrierActionSetRadioEnabled(int subId, boolean enabled); 1236b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu 1237b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu /** 1238b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu * Get aggregated video call data usage since boot. 1239b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu * Permissions android.Manifest.permission.READ_NETWORK_USAGE_HISTORY is required. 1240b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu * @return total data usage in bytes 1241b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu * @hide 1242b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu */ 1243b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu long getVtDataUsage(); 12448781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu 12458781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu /** 12468781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu * Policy control of data connection. Usually used when data limit is passed. 12478781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu * @param enabled True if enabling the data, otherwise disabling. 12488781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu * @param subId Subscription index 12498781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu * @hide 12508781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu */ 12518781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu void setPolicyDataEnabled(boolean enabled, int subId); 12528347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran 12538347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran 12548347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran /** 12558347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran * Get Client request stats which will contain statistical information 12568347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran * on each request made by client. 12578347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran * @param callingPackage package making the call. 12588347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran * @param subId Subscription index 12598347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran * @hide 12608347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran */ 12618347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran List<ClientRequestStats> getClientRequestStats(String callingPackage, int subid); 1262bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla} 1263