ITelephony.aidl revision 812188ad06660ec1b3b2b027ccfa291335021664
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;
36d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawalimport com.android.internal.telephony.CellNetworkScanResult;
37d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawalimport com.android.internal.telephony.OperatorInfo;
3806e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe
39a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawalimport java.util.List;
409066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
41aae9216320328e6b865725219a31a029ea46c1b0Sailesh Nepal
429066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project/**
43767a662ecde33c3979bf02b793d392aca0403162Wink Saville * Interface used to interact with the phone.  Mostly this is used by the
449066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * TelephonyManager class.  A few places are still using this directly.
454a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee * Please clean them up if possible and use TelephonyManager instead.
469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project *
479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project * {@hide}
489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project */
499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Projectinterface ITelephony {
509066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
519066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
529066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Dial a number. This doesn't place the call. It displays
539066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * the Dialer screen.
549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @param number the number to be dialed. If null, this
559066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * would display the Dialer screen with no number pre-filled.
569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void dial(String number);
589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Place a call to the specified number.
6116a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov     * @param callingPackage The package making the call.
629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @param number the number to be called.
639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
64f265ea9d8307282ff1da3915978625a94fc2859eDianne Hackborn    void call(String callingPackage, String number);
659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
674d396052deb54399cbadbeb8abd873df6f3af342Jeff Brown     * End call if there is a call in progress, otherwise does nothing.
689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     *
699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @return whether it hung up
709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    boolean endCall();
729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
74fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * End call on particular subId or go to the Home screen
75fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
76fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return whether it hung up
77fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
7863f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    boolean endCallForSubscriber(int subId);
79fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
80fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
819066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Answer the currently-ringing call.
829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     *
839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * If there's already a current active call, that call will be
849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * automatically put on hold.  If both lines are currently in use, the
859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * current active call will be ended.
869066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     *
879066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * TODO: provide a flag to let the caller specify what policy to use
889066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * if both lines are in use.  (The current behavior is hardwired to
899066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * "answer incoming, end ongoing", which is how the CALL button
909066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * is specced to behave.)
919066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     *
929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * TODO: this should be a oneway call (especially since it's called
939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * directly from the key queue thread).
949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void answerRingingCall();
969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
9805e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     * Answer the currently-ringing call on particular subId .
9905e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     *
10005e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     * If there's already a current active call, that call will be
10105e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     * automatically put on hold.  If both lines are currently in use, the
10205e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     * current active call will be ended.
10305e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     *
10405e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     * TODO: provide a flag to let the caller specify what policy to use
10505e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     * if both lines are in use.  (The current behavior is hardwired to
10605e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     * "answer incoming, end ongoing", which is how the CALL button
10705e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     * is specced to behave.)
10805e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     *
10905e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     * TODO: this should be a oneway call (especially since it's called
11005e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     * directly from the key queue thread).
11105e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville     */
11263f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    void answerRingingCallForSubscriber(int subId);
11305e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville
11405e6dde3a0b9ba1eb3d13d511fe2e27a0d10c851Wink Saville    /**
1159066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Silence the ringer if an incoming call is currently ringing.
1169066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * (If vibrating, stop the vibrator also.)
1179066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     *
1189066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * It's safe to call this if the ringer has already been silenced, or
1199066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * even if there's no incoming call.  (If so, this method will do nothing.)
1209066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     *
1219066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * TODO: this should be a oneway call too (see above).
1229066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     *       (Actually *all* the methods here that return void can
1239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     *       probably be oneway.)
1249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void silenceRinger();
1269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
1279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
1289066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Check if we are in either an active or holding call
1296e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the package making the call.
1309066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @return true if the phone state is OFFHOOK.
1319066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1326e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    boolean isOffhook(String callingPackage);
1339066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
1349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
135fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Check if a particular subId has an active or holding call
136fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
137fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
1386e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the package making the call.
139fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return true if the phone state is OFFHOOK.
140fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
1416e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    boolean isOffhookForSubscriber(int subId, String callingPackage);
142fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
143fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
144fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Check if an incoming phone call is ringing or call waiting
145fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * on a particular subId.
146fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
147fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
1486e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the package making the call.
149fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return true if the phone state is RINGING.
150fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
1516e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    boolean isRingingForSubscriber(int subId, String callingPackage);
152fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
153fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
1549066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Check if an incoming phone call is ringing or call waiting.
1556e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the package making the call.
1569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @return true if the phone state is RINGING.
1579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1586e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    boolean isRinging(String callingPackage);
1599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
1609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
1619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Check if the phone is idle.
1626e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the package making the call.
1639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @return true if the phone state is IDLE.
1649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1656e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    boolean isIdle(String callingPackage);
1669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
1679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
168fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Check if the phone is idle on a particular subId.
169fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
170fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
1716e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the package making the call.
172fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return true if the phone state is IDLE.
173fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
1746e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    boolean isIdleForSubscriber(int subId, String callingPackage);
175fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
176fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
1779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Check to see if the radio is on or not.
1786e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the package making the call.
1799066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @return returns true if the radio is on.
1809066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1816e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    boolean isRadioOn(String callingPackage);
1829066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
1839066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
184fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Check to see if the radio is on or not on particular subId.
185fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
1866e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the package making the call.
187fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return returns true if the radio is on.
188fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
1896e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    boolean isRadioOnForSubscriber(int subId, String callingPackage);
190fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
191fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
1929066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Supply a pin to unlock the SIM.  Blocks until a result is determined.
1939066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @param pin The pin to check.
1949066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @return whether the operation was a success.
1959066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
1969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    boolean supplyPin(String pin);
1979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
1989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
199fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Supply a pin to unlock the SIM for particular subId.
200fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Blocks until a result is determined.
201fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param pin The pin to check.
202fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
203fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return whether the operation was a success.
204fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
20563f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    boolean supplyPinForSubscriber(int subId, String pin);
206fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
207fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
20898c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang     * Supply puk to unlock the SIM and set SIM pin to new pin.
20998c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang     *  Blocks until a result is determined.
21098c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang     * @param puk The puk to check.
21198c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang     *        pin The new pin to be set in SIM
21298c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang     * @return whether the operation was a success.
21398c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang     */
21498c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang    boolean supplyPuk(String puk, String pin);
21598c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang
21698c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang    /**
217fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Supply puk to unlock the SIM and set SIM pin to new pin.
218fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *  Blocks until a result is determined.
219fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param puk The puk to check.
220fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *        pin The new pin to be set in SIM
221fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
222fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return whether the operation was a success.
223fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
22463f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    boolean supplyPukForSubscriber(int subId, String puk, String pin);
225fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
226fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
227b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     * Supply a pin to unlock the SIM.  Blocks until a result is determined.
228b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     * Returns a specific success/error code.
229b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     * @param pin The pin to check.
230b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
231b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     *         retValue[1] = number of attempts remaining if known otherwise -1
232b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     */
233b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville    int[] supplyPinReportResult(String pin);
234b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville
235b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville    /**
236fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Supply a pin to unlock the SIM.  Blocks until a result is determined.
237fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Returns a specific success/error code.
238fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param pin The pin to check.
239fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
240fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *         retValue[1] = number of attempts remaining if known otherwise -1
241fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
24263f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    int[] supplyPinReportResultForSubscriber(int subId, String pin);
243fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
244fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
245b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     * Supply puk to unlock the SIM and set SIM pin to new pin.
246b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     * Blocks until a result is determined.
247b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     * Returns a specific success/error code
248b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     * @param puk The puk to check
249b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     *        pin The pin to check.
250b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
251b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     *         retValue[1] = number of attempts remaining if known otherwise -1
252b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville     */
253b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville    int[] supplyPukReportResult(String puk, String pin);
254b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville
255b896b9f74225d61af67c2661f44eceadb9e22013Wink Saville    /**
256fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Supply puk to unlock the SIM and set SIM pin to new pin.
257fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Blocks until a result is determined.
258fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Returns a specific success/error code
259fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param puk The puk to check
260fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *        pin The pin to check.
261fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return retValue[0] = Phone.PIN_RESULT_SUCCESS on success. Otherwise error code
262fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *         retValue[1] = number of attempts remaining if known otherwise -1
263fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
26463f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    int[] supplyPukReportResultForSubscriber(int subId, String puk, String pin);
265fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
266fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
2679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
2689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * without SEND (so <code>dial</code> is not appropriate).
269767a662ecde33c3979bf02b793d392aca0403162Wink Saville     *
2709066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @param dialString the MMI command to be executed.
2719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * @return true if MMI command is executed.
2729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
2739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    boolean handlePinMmi(String dialString);
2749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
27519ba736c22869ec678ce0a79858ab3624fedee1bpkanwar
27619ba736c22869ec678ce0a79858ab3624fedee1bpkanwar    /**
27719ba736c22869ec678ce0a79858ab3624fedee1bpkanwar     * Handles USSD commands.
27819ba736c22869ec678ce0a79858ab3624fedee1bpkanwar     *
279d570f63b72507a4c2a6d53d941f6d67dd72711e5pkanwar     * @param subId The subscription to use.
28019ba736c22869ec678ce0a79858ab3624fedee1bpkanwar     * @param ussdRequest the USSD command to be executed.
28119ba736c22869ec678ce0a79858ab3624fedee1bpkanwar     * @param wrappedCallback receives a callback result.
28219ba736c22869ec678ce0a79858ab3624fedee1bpkanwar     */
283d570f63b72507a4c2a6d53d941f6d67dd72711e5pkanwar    void handleUssdRequest(int subId, String ussdRequest, in ResultReceiver wrappedCallback);
28419ba736c22869ec678ce0a79858ab3624fedee1bpkanwar
2859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
286fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Handles PIN MMI commands (PIN/PIN2/PUK/PUK2), which are initiated
287fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * without SEND (so <code>dial</code> is not appropriate) for
288fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * a particular subId.
289fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param dialString the MMI command to be executed.
290fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
291fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return true if MMI command is executed.
292fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
29363f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    boolean handlePinMmiForSubscriber(int subId, String dialString);
294fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
295fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
2969066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Toggles the radio on or off.
2979066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
2989066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void toggleRadioOnOff();
2999066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3009066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
301fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Toggles the radio on or off on particular subId.
302fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
303fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
30463f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    void toggleRadioOnOffForSubscriber(int subId);
305fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
306fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
3079066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Set the radio to on or off
3089066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3099066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    boolean setRadio(boolean turnOn);
3109066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3119066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
312fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Set the radio to on or off on particular subId.
313fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
314fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
31563f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    boolean setRadioForSubscriber(int subId, boolean turnOn);
316fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
317fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
31845ac9645da0ceafbae8c00b0dd0a09800fdcefdfWink Saville     * Set the radio to on or off unconditionally
31945ac9645da0ceafbae8c00b0dd0a09800fdcefdfWink Saville     */
32045ac9645da0ceafbae8c00b0dd0a09800fdcefdfWink Saville    boolean setRadioPower(boolean turnOn);
32145ac9645da0ceafbae8c00b0dd0a09800fdcefdfWink Saville
32245ac9645da0ceafbae8c00b0dd0a09800fdcefdfWink Saville    /**
3239066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Request to update location information in service state
3249066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3259066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void updateServiceLocation();
3269066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3279066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
328fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Request to update location information for a subscrition in service state
329fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
330fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
33163f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    void updateServiceLocationForSubscriber(int subId);
332fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
333fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
3349066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Enable location update notifications.
3359066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3369066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void enableLocationUpdates();
3379066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3389066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
339fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Enable location update notifications.
340fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
341fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
34263f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    void enableLocationUpdatesForSubscriber(int subId);
343fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
344fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
3459066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Disable location update notifications.
3469066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3479066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    void disableLocationUpdates();
3489066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3499066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
350fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Disable location update notifications.
351fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
352fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
35363f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    void disableLocationUpdatesForSubscriber(int subId);
354fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
355fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
3569066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Allow mobile data connections.
3579066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3589066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    boolean enableDataConnectivity();
3599066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3609066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
3619066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Disallow mobile data connections.
3629066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3639066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    boolean disableDataConnectivity();
3649066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3659066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
3669066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Report whether data connectivity is possible.
3679066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
3689066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    boolean isDataConnectivityPossible();
3699066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
370275b5635ad98a411d511894e98f80e8b8bc41799Svetoslav    Bundle getCellLocation(String callingPkg);
3719066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3729066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project    /**
3739066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     * Returns the neighboring cell information of the device.
3749066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     */
375f265ea9d8307282ff1da3915978625a94fc2859eDianne Hackborn    List<NeighboringCellInfo> getNeighboringCellInfo(String callingPkg);
3769066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project
3779066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     int getCallState();
378fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
379fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
380dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * Returns the call state for a slot.
381fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
382dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     int getCallStateForSlot(int slotId);
383fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
3849066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     int getDataActivity();
3859066cfe9886ac131c34d59ed0e2d287b0e3c0087The Android Open Source Project     int getDataState();
386767a662ecde33c3979bf02b793d392aca0403162Wink Saville
387767a662ecde33c3979bf02b793d392aca0403162Wink Saville    /**
388767a662ecde33c3979bf02b793d392aca0403162Wink Saville     * Returns the current active phone type as integer.
389767a662ecde33c3979bf02b793d392aca0403162Wink Saville     * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE
390767a662ecde33c3979bf02b793d392aca0403162Wink Saville     * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE
391767a662ecde33c3979bf02b793d392aca0403162Wink Saville     */
392767a662ecde33c3979bf02b793d392aca0403162Wink Saville    int getActivePhoneType();
393767a662ecde33c3979bf02b793d392aca0403162Wink Saville
394e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville    /**
395dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * Returns the current active phone type as integer for particular slot.
396fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Returns TelephonyManager.PHONE_TYPE_CDMA if RILConstants.CDMA_PHONE
397fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * and TelephonyManager.PHONE_TYPE_GSM if RILConstants.GSM_PHONE
398dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * @param slotId - slot to query.
399fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
400dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal    int getActivePhoneTypeForSlot(int slotId);
401fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
402fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
403e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville     * Returns the CDMA ERI icon index to display
4046e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
405e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville     */
4066e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getCdmaEriIconIndex(String callingPackage);
407e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville
408e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville    /**
409fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Returns the CDMA ERI icon index to display on particular subId.
410fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
4116e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
412fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
4136e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getCdmaEriIconIndexForSubscriber(int subId, String callingPackage);
414fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
415fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
416e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville     * Returns the CDMA ERI icon mode,
417e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville     * 0 - ON
418e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville     * 1 - FLASHING
4196e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
420e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville     */
4216e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getCdmaEriIconMode(String callingPackage);
422e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville
423e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville    /**
424fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Returns the CDMA ERI icon mode on particular subId,
425fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * 0 - ON
426fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * 1 - FLASHING
427fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
4286e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
429fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
4306e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getCdmaEriIconModeForSubscriber(int subId, String callingPackage);
431fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
432fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
433e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville     * Returns the CDMA ERI text,
4346e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
435e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville     */
4366e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    String getCdmaEriText(String callingPackage);
437e9b06d754af03faf27012fbed1e7559ec1ba7c79Wink Saville
438dda5391d5079537e275c9f4ed2637a1484d0e4e8Wink Saville    /**
439fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Returns the CDMA ERI text for particular subId,
440fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
4416e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
442fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
4436e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    String getCdmaEriTextForSubscriber(int subId, String callingPackage);
444fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
445fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
4464d8ae85b5de8a90a597e4b649c6ee7208e446e3bWink Saville     * Returns true if OTA service provisioning needs to run.
4474d8ae85b5de8a90a597e4b649c6ee7208e446e3bWink Saville     * Only relevant on some technologies, others will always
4484d8ae85b5de8a90a597e4b649c6ee7208e446e3bWink Saville     * return false.
449767be5f0b929cc1eeb8a7d5aa7a02e228053e9bbJim Miller     */
4504d8ae85b5de8a90a597e4b649c6ee7208e446e3bWink Saville    boolean needsOtaServiceProvisioning();
451767be5f0b929cc1eeb8a7d5aa7a02e228053e9bbJim Miller
452767be5f0b929cc1eeb8a7d5aa7a02e228053e9bbJim Miller    /**
4535c1a63c2235c36ce0b520fa88a9d21ffe255756eShishir Agrawal     * Sets the voicemail number for a particular subscriber.
4545c1a63c2235c36ce0b520fa88a9d21ffe255756eShishir Agrawal     */
4555c1a63c2235c36ce0b520fa88a9d21ffe255756eShishir Agrawal    boolean setVoiceMailNumber(int subId, String alphaTag, String number);
4565c1a63c2235c36ce0b520fa88a9d21ffe255756eShishir Agrawal
4575c1a63c2235c36ce0b520fa88a9d21ffe255756eShishir Agrawal    /**
458dda5391d5079537e275c9f4ed2637a1484d0e4e8Wink Saville      * Returns the unread count of voicemails
459dda5391d5079537e275c9f4ed2637a1484d0e4e8Wink Saville      */
460ce099c3226b33b43e0dd5d1f24347b14a2223ee1David Krause    int getVoiceMessageCount();
461dda5391d5079537e275c9f4ed2637a1484d0e4e8Wink Saville
462ebe66345e7099ca6fc95e8aa4d31a5b5cbbd6224Li Zhe    /**
463fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Returns the unread count of voicemails for a subId.
464fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
465fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Returns the unread count of voicemails
466fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
46763f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    int getVoiceMessageCountForSubscriber(int subId);
468fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
46920f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen    oneway void setVisualVoicemailEnabled(String callingPackage,
47020f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen            in PhoneAccountHandle accountHandle, boolean enabled);
47120f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen
47220f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen    boolean isVisualVoicemailEnabled(String callingPackage,
47320f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen            in PhoneAccountHandle accountHandle);
47420f2ebbf4d16e0654efe73ac92afc89c29cfaedeTa-wei Yen
475812188ad06660ec1b3b2b027ccfa291335021664Ta-wei Yen    String getVisualVoicemailPackageName(String callingPackage,
476812188ad06660ec1b3b2b027ccfa291335021664Ta-wei Yen            in PhoneAccountHandle phoneAccountHandle);
477812188ad06660ec1b3b2b027ccfa291335021664Ta-wei Yen
478349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen    // Not oneway, caller needs to make sure the vaule is set before receiving a SMS
47967ab168b78782c4de5de3f44817961468533757cTa-wei Yen    void enableVisualVoicemailSmsFilter(String callingPackage, int subId,
48067ab168b78782c4de5de3f44817961468533757cTa-wei Yen            in VisualVoicemailSmsFilterSettings settings);
481349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen
48267ab168b78782c4de5de3f44817961468533757cTa-wei Yen    oneway void disableVisualVoicemailSmsFilter(String callingPackage, int subId);
483349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen
48467ab168b78782c4de5de3f44817961468533757cTa-wei Yen    // Get settings set by the calling package
48567ab168b78782c4de5de3f44817961468533757cTa-wei Yen    VisualVoicemailSmsFilterSettings getVisualVoicemailSmsFilterSettings(String callingPackage,
48667ab168b78782c4de5de3f44817961468533757cTa-wei Yen            int subId);
487349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen
488485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen    /**
489485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     *  Get settings set by the current default dialer, Internal use only.
490485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     *  Requires READ_PRIVILEGED_PHONE_STATE permission.
491485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     */
492485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen    VisualVoicemailSmsFilterSettings getActiveVisualVoicemailSmsFilterSettings(int subId);
493485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen
494485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen    /**
495485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     * Send a visual voicemail SMS. Internal use only.
496485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     * Requires caller to be the default dialer and have SEND_SMS permission
497485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     */
498485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen    oneway void sendVisualVoicemailSmsForSubscriber(in String callingPackage, in int subId,
499485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen            in String number, in int port, in String text, in PendingIntent sentIntent);
500349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen
501fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
5026e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * Returns the network type for data transmission
5039bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt     * Legacy call, permission-free
5046e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     */
5059bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt    int getNetworkType();
50698c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang
507e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville    /**
508fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Returns the network type of a subId.
509fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
5106e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
511fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
5126e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getNetworkTypeForSubscriber(int subId, String callingPackage);
513fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
514fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
5156e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * Returns the network type for data transmission
5166e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
5176e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     */
5186e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getDataNetworkType(String callingPackage);
5190dde2c20a07770bc2f1b21e49222c968f3d8b39aWink Saville
5200dde2c20a07770bc2f1b21e49222c968f3d8b39aWink Saville    /**
5216e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * Returns the data network type of a subId
5226e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param subId user preferred subId.
5236e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
5246e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     */
5256e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getDataNetworkTypeForSubscriber(int subId, String callingPackage);
526fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
527fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
528fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville      * Returns the voice network type of a subId
529fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville      * @param subId user preferred subId.
5309bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt      * @param callingPackage package making the call.
531fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville      * Returns the network type
532fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville      */
5339bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt    int getVoiceNetworkTypeForSubscriber(int subId, String callingPackage);
534fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
535fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
536e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville     * Return true if an ICC card is present
537e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville     */
538e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville    boolean hasIccCard();
5395e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville
5405e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville    /**
541fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Return true if an ICC card is present for a subId.
542fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param slotId user preferred slotId.
543fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Return true if an ICC card is present
544fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
54563f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    boolean hasIccCardUsingSlotId(int slotId);
546fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
547fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
5485e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     * Return if the current radio is LTE on CDMA. This
5495e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     * is a tri-state return value as for a period of time
5505e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     * the mode may be unknown.
5515e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     *
5526e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the calling package
5535e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
5545e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     * or {@link PHone#LTE_ON_CDMA_TRUE}
5555e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     */
5566e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getLteOnCdmaMode(String callingPackage);
557963db55d59a170f4b17ff907c96615a19ef6fe17John Wang
558963db55d59a170f4b17ff907c96615a19ef6fe17John Wang    /**
559fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Return if the current radio is LTE on CDMA. This
560fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * is a tri-state return value as for a period of time
561fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * the mode may be unknown.
562fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
5636e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the calling package
564fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
565fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * or {@link PHone#LTE_ON_CDMA_TRUE}
566fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
5676e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getLteOnCdmaModeForSubscriber(int subId, String callingPackage);
568fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
569fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
570963db55d59a170f4b17ff907c96615a19ef6fe17John Wang     * Returns the all observed cell information of the device.
571963db55d59a170f4b17ff907c96615a19ef6fe17John Wang     */
572275b5635ad98a411d511894e98f80e8b8bc41799Svetoslav    List<CellInfo> getAllCellInfo(String callingPkg);
573094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville
574094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville    /**
575094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville     * Sets minimum time in milli-seconds between onCellInfoChanged
576094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville     */
577094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville    void setCellInfoListRate(int rateInMillis);
578767a662ecde33c3979bf02b793d392aca0403162Wink Saville
57957f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal    /**
580fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * get default sim
581fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return sim id
582fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
583fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    int getDefaultSim();
584fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
585fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
58657f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Opens a logical channel to the ICC card.
58757f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
58857f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Input parameters equivalent to TS 27.007 AT+CCHO command.
58957f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
59052103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
59157f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param AID Application id. See ETSI 102.221 and 101.220.
592a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @return an IccOpenLogicalChannelResponse object.
59357f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     */
59452103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID);
59557f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal
59657f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal    /**
59757f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Closes a previously opened logical channel to the ICC card.
59857f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
59957f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Input parameters equivalent to TS 27.007 AT+CCHC command.
60057f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
60152103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
60257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param channel is the channel id to be closed as retruned by a
60357f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *            successful iccOpenLogicalChannel.
60457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @return true if the channel was closed successfully.
60557f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     */
60652103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    boolean iccCloseLogicalChannel(int subId, int channel);
60757f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal
60857f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal    /**
60957f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Transmit an APDU to the ICC card over a logical channel.
61057f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
61157f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Input parameters equivalent to TS 27.007 AT+CGLA command.
61257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
61352103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
61457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param channel is the channel id to be closed as retruned by a
61557f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *            successful iccOpenLogicalChannel.
61657f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param cla Class of the APDU command.
61757f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param instruction Instruction of the APDU command.
61857f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param p1 P1 value of the APDU command.
61957f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param p2 P2 value of the APDU command.
62057f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
62157f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *            is sent to the SIM.
62257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param data Data to be sent with the APDU.
62357f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @return The APDU response from the ICC card with the status appended at
62443d94347a6feb14870a4ffd7682a816210e5e676Shishir Agrawal     *            the end.
62557f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     */
62652103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    String iccTransmitApduLogicalChannel(int subId, int channel, int cla, int instruction,
62757f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal            int p1, int p2, int p3, String data);
6288f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby
6298f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    /**
630a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * Transmit an APDU to the ICC card over the basic channel.
631a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     *
632a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * Input parameters equivalent to TS 27.007 AT+CSIM command.
633a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     *
63452103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
635a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param cla Class of the APDU command.
636a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param instruction Instruction of the APDU command.
637a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p1 P1 value of the APDU command.
638a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p2 P2 value of the APDU command.
639a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
640a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     *            is sent to the SIM.
641a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param data Data to be sent with the APDU.
642a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @return The APDU response from the ICC card with the status appended at
64343d94347a6feb14870a4ffd7682a816210e5e676Shishir Agrawal     *            the end.
644a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     */
64552103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    String iccTransmitApduBasicChannel(int subId, int cla, int instruction,
646a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal            int p1, int p2, int p3, String data);
647a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal
648a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal    /**
649a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * Returns the response APDU for a command APDU sent through SIM_IO.
650a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     *
65152103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
652a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param fileID
653a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param command
654a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p1 P1 value of the APDU command.
655a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p2 P2 value of the APDU command.
656a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p3 P3 value of the APDU command.
657a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param filePath
658a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @return The APDU response.
659a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     */
66052103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    byte[] iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2, int p3,
661a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal            String filePath);
662a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal
663a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal    /**
664b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton     * Send ENVELOPE to the SIM and returns the response.
665210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton     *
66652103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
667210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton     * @param contents  String containing SAT/USAT response in hexadecimal
668210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton     *                  format starting with command tag. See TS 102 223 for
669210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton     *                  details.
670b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton     * @return The APDU response from the ICC card, with the last 4 bytes
671b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton     *         being the status word. If the command fails, returns an empty
672b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton     *         string.
673210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton     */
67452103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    String sendEnvelopeWithStatus(int subId, String content);
675210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton
676210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton    /**
6778f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
6788f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Used for device configuration by some CDMA operators.
6798f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     *
6808f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @param itemID the ID of the item to read.
6818f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @return the NV item as a String, or null on any failure.
6828f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     */
6838f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    String nvReadItem(int itemID);
6848f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby
6858f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    /**
6868f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
6878f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Used for device configuration by some CDMA operators.
6888f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     *
6898f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @param itemID the ID of the item to read.
6908f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @param itemValue the value to write, as a String.
6918f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @return true on success; false on any failure.
6928f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     */
6938f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    boolean nvWriteItem(int itemID, String itemValue);
6948f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby
6958f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    /**
6968f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
6978f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Used for device configuration by some CDMA operators.
6988f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     *
6998f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @param preferredRoamingList byte array containing the new PRL.
7008f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @return true on success; false on any failure.
7018f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     */
7028f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    boolean nvWriteCdmaPrl(in byte[] preferredRoamingList);
7038f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby
7048f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    /**
705786e71ab11f2d89afffc9db7473f16206395c813Jake Hamby     * Perform the specified type of NV config reset. The radio will be taken offline
706786e71ab11f2d89afffc9db7473f16206395c813Jake Hamby     * and the device must be rebooted after the operation. Used for device
707786e71ab11f2d89afffc9db7473f16206395c813Jake Hamby     * configuration by some CDMA operators.
7088f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     *
7098f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @param resetType the type of reset to perform (1 == factory reset; 2 == NV-only reset).
7108f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @return true on success; false on any failure.
7118f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     */
7128f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    boolean nvResetConfig(int resetType);
7138f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby
7149bbb37116d2c5b597f9b5e3094ff328971e03c0bEvan Charlton    /*
7151365703d4964466472904dc84117a0946d9e1a44Junda Liu     * Get the calculated preferred network type.
7161365703d4964466472904dc84117a0946d9e1a44Junda Liu     * Used for device configuration by some CDMA operators.
71716a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov     * @param callingPackage The package making the call.
7181365703d4964466472904dc84117a0946d9e1a44Junda Liu     *
7191365703d4964466472904dc84117a0946d9e1a44Junda Liu     * @return the calculated preferred network type, defined in RILConstants.java.
7201365703d4964466472904dc84117a0946d9e1a44Junda Liu     */
72116a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    int getCalculatedPreferredNetworkType(String callingPackage);
7221365703d4964466472904dc84117a0946d9e1a44Junda Liu
7231365703d4964466472904dc84117a0946d9e1a44Junda Liu    /*
7244a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * Get the preferred network type.
7254a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * Used for device configuration by some CDMA operators.
7264a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     *
727984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     * @param subId the id of the subscription to query.
7284a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * @return the preferred network type, defined in RILConstants.java.
7294a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     */
730984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott    int getPreferredNetworkType(int subId);
7314a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby
7324a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby    /**
73338531581fc19f9172fabe56047b326e5dab88625Junda Liu     * Check TETHER_DUN_REQUIRED and TETHER_DUN_APN settings, net.tethering.noprovisioning
73438531581fc19f9172fabe56047b326e5dab88625Junda Liu     * SystemProperty, and config_tether_apndata to decide whether DUN APN is required for
73538531581fc19f9172fabe56047b326e5dab88625Junda Liu     * tethering.
73638531581fc19f9172fabe56047b326e5dab88625Junda Liu     *
73738531581fc19f9172fabe56047b326e5dab88625Junda Liu     * @return 0: Not required. 1: required. 2: Not set.
73838531581fc19f9172fabe56047b326e5dab88625Junda Liu     */
73938531581fc19f9172fabe56047b326e5dab88625Junda Liu    int getTetherApnRequired();
74038531581fc19f9172fabe56047b326e5dab88625Junda Liu
74138531581fc19f9172fabe56047b326e5dab88625Junda Liu    /**
742984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     * Set the network selection mode to automatic.
743984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     *
744984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     * @param subId the id of the subscription to update.
745984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     */
746984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott    void setNetworkSelectionModeAutomatic(int subId);
747984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott
748984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott    /**
749d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * Perform a radio scan and return the list of avialble networks.
750d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     *
751d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * @param subId the id of the subscription.
752d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * @return CellNetworkScanResult containing status of scan and networks.
753d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     */
754d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal    CellNetworkScanResult getCellNetworkScanResults(int subId);
755d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal
756d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal    /**
757d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * Ask the radio to connect to the input network and change selection mode to manual.
758d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     *
759d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * @param subId the id of the subscription.
760d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * @param operatorInfo the operator to attach to.
761e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal     * @param persistSelection should the selection persist till reboot or its
762e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal     *        turned off? Will also result in notification being not shown to
763e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal     *        the user if the signal is lost.
764d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * @return true if the request suceeded.
765d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     */
766e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal    boolean setNetworkSelectionModeManual(int subId, in OperatorInfo operator,
767e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal            boolean persistSelection);
768d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal
769d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal    /**
7704a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * Set the preferred network type.
7714a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * Used for device configuration by some CDMA operators.
7724a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     *
773984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     * @param subId the id of the subscription to update.
7744a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * @param networkType the preferred network type, defined in RILConstants.java.
7754a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * @return true on success; false on any failure.
7764a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     */
777984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott    boolean setPreferredNetworkType(int subId, int networkType);
778afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt
779afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt    /**
780afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     * User enable/disable Mobile Data.
781afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     *
782afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     * @param enable true to turn on, else false
783afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     */
78436ffb0494dd1045c164b7479b68165e206f8c759Wink Saville    void setDataEnabled(int subId, boolean enable);
785afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt
786afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt    /**
787afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     * Get the user enabled state of Mobile Data.
788afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     *
789afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     * @return true on enabled
790afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     */
79136ffb0494dd1045c164b7479b68165e206f8c759Wink Saville    boolean getDataEnabled(int subId);
792fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
793fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
794fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Get P-CSCF address from PCO after data connection is established or modified.
795e647099e14114475e9a2827a10dab2d2e36308c4ram     * @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN
79616a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov     * @param callingPackage The package making the call.
797fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
79816a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    String[] getPcscfAddress(String apnType, String callingPackage);
799fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
800fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
801fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Set IMS registration state
802fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
803fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    void setImsRegistrationState(boolean registered);
804fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
805762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal    /**
8062b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     * Return MDN string for CDMA phone.
8072b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     * @param subId user preferred subId.
8082b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     */
80963f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    String getCdmaMdn(int subId);
8102b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu
8112b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu    /**
8122b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     * Return MIN string for CDMA phone.
8132b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     * @param subId user preferred subId.
8142b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     */
81563f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    String getCdmaMin(int subId);
8162b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu
8172b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu    /**
818762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     * Has the calling application been granted special privileges by the carrier.
819762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     *
820762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     * If any of the packages in the calling UID has carrier privileges, the
821762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     * call will return true. This access is granted by the owner of the UICC
822762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     * card and does not depend on the registered carrier.
823762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     *
824762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     * TODO: Add a link to documentation.
825762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     *
82652103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
827fc3646f58e5851e7a483b8388bdd826078166d10Shishir Agrawal     * @return carrier privilege status defined in TelephonyManager.
828762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     */
82952103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    int getCarrierPrivilegeStatus(int subId);
830142529702dad9a6612271f487d500db80173ba7bJunda Liu
831142529702dad9a6612271f487d500db80173ba7bJunda Liu    /**
832b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson     * Similar to above, but check for the package whose name is pkgName.
833142529702dad9a6612271f487d500db80173ba7bJunda Liu     */
834b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson    int checkCarrierPrivilegesForPackage(String pkgName);
835b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson
836b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson    /**
837b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson     * Similar to above, but check across all phones.
838b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson     */
839b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson    int checkCarrierPrivilegesForPackageAnyPhone(String pkgName);
840f9aefdb534c6cb2af22dfb7614a1c15c2d67dd9cDerek Tan
841f9aefdb534c6cb2af22dfb7614a1c15c2d67dd9cDerek Tan    /**
842f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu     * Returns list of the package names of the carrier apps that should handle the input intent
843f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu     * and have carrier privileges for the given phoneId.
84463c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal     *
8453892fc0349a91097f53152eaf2801dfebb2066caDiego Pontoriero     * @param intent Intent that will be sent.
846f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu     * @param phoneId The phoneId on which the carrier app has carrier privileges.
847f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu     * @return list of carrier app package names that can handle the intent on phoneId.
84863c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal     *         Returns null if there is an error and an empty list if there
84963c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal     *         are no matching packages.
85063c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal     */
851f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu    List<String> getCarrierPackageNamesForIntentAndPhone(in Intent intent, int phoneId);
85263c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal
85363c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal    /**
8542bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan     * Set the line 1 phone number string and its alphatag for the current ICCID
8552bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan     * for display purpose only, for example, displayed in Phone Status. It won't
8562bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan     * change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
8572bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan     * value.
858818631b679171ffb49eaa641bee06b9c953651daDerek Tan     *
859818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @param subId the subscriber that the alphatag and dialing number belongs to.
860818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @param alphaTag alpha-tagging of the dailing nubmer
861818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @param number The dialing number
8620201a6f6f16a872405a5f9ee65026e948eb162d0Shishir Agrawal     * @return true if the operation was executed correctly.
863818631b679171ffb49eaa641bee06b9c953651daDerek Tan     */
8640201a6f6f16a872405a5f9ee65026e948eb162d0Shishir Agrawal    boolean setLine1NumberForDisplayForSubscriber(int subId, String alphaTag, String number);
865818631b679171ffb49eaa641bee06b9c953651daDerek Tan
866818631b679171ffb49eaa641bee06b9c953651daDerek Tan    /**
867818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * Returns the displayed dialing number string if it was set previously via
868818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * {@link #setLine1NumberForDisplay}. Otherwise returns null.
869818631b679171ffb49eaa641bee06b9c953651daDerek Tan     *
870818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @param subId whose dialing number for line 1 is returned.
87116a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov     * @param callingPackage The package making the call.
872818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @return the displayed dialing number if set, or null if not set.
873818631b679171ffb49eaa641bee06b9c953651daDerek Tan     */
87416a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    String getLine1NumberForDisplay(int subId, String callingPackage);
875818631b679171ffb49eaa641bee06b9c953651daDerek Tan
876818631b679171ffb49eaa641bee06b9c953651daDerek Tan    /**
877818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * Returns the displayed alphatag of the dialing number if it was set
878818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * previously via {@link #setLine1NumberForDisplay}. Otherwise returns null.
879818631b679171ffb49eaa641bee06b9c953651daDerek Tan     *
880818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @param subId whose alphatag associated with line 1 is returned.
88116a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov     * @param callingPackage The package making the call.
882818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @return the displayed alphatag of the dialing number if set, or null if
883818631b679171ffb49eaa641bee06b9c953651daDerek Tan     *         not set.
884818631b679171ffb49eaa641bee06b9c953651daDerek Tan     */
88516a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    String getLine1AlphaTagForDisplay(int subId, String callingPackage);
88686578cca383562c72751d747905280afdeb2bdfbShishir Agrawal
887d24e4eafdb3e42de5a8fd080fcd50ebf4c7bcb71Fyodor Kupolov    String[] getMergedSubscriberIds(String callingPackage);
8883256601f5e4d94713f59e97b9d4912875c1bdcafJeff Sharkey
88986578cca383562c72751d747905280afdeb2bdfbShishir Agrawal    /**
890d2cfa92146ecfa5e00d4a3ce8e63b1a588845fe2Shishir Agrawal     * Override the operator branding for the current ICCID.
89186578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     *
892d2cfa92146ecfa5e00d4a3ce8e63b1a588845fe2Shishir Agrawal     * Once set, whenever the SIM is present in the device, the service
89386578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * provider name (SPN) and the operator name will both be replaced by the
89486578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * brand value input. To unset the value, the same function should be
89586578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * called with a null brand value.
89686578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     *
89786578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * <p>Requires Permission:
89886578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
89986578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     *  or has to be carrier app - see #hasCarrierPrivileges.
90086578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     *
90152103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
90286578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * @param brand The brand name to display/set.
90386578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * @return true if the operation was executed correctly.
90486578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     */
90552103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    boolean setOperatorBrandOverride(int subId, String brand);
9063099c831441e861328cd4965011c854e060ce56aSteven Liu
9073099c831441e861328cd4965011c854e060ce56aSteven Liu    /**
9085fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * Override the roaming indicator for the current ICCID.
9095fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     *
9105fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * Using this call, the carrier app (see #hasCarrierPrivileges) can override
9115fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * the platform's notion of a network operator being considered roaming or not.
9125fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * The change only affects the ICCID that was active when this call was made.
9135fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     *
9145fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * If null is passed as any of the input, the corresponding value is deleted.
9155fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     *
9165fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * <p>Requires that the caller have carrier privilege. See #hasCarrierPrivileges.
9175fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     *
91852103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId for which the roaming overrides apply.
9195fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * @param gsmRoamingList - List of MCCMNCs to be considered roaming for 3GPP RATs.
9205fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * @param gsmNonRoamingList - List of MCCMNCs to be considered not roaming for 3GPP RATs.
9215fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * @param cdmaRoamingList - List of SIDs to be considered roaming for 3GPP2 RATs.
9225fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * @param cdmaNonRoamingList - List of SIDs to be considered not roaming for 3GPP2 RATs.
9235fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * @return true if the operation was executed correctly.
9245fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     */
92552103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    boolean setRoamingOverride(int subId, in List<String> gsmRoamingList,
9265fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal            in List<String> gsmNonRoamingList, in List<String> cdmaRoamingList,
9275fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal            in List<String> cdmaNonRoamingList);
9285fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal
9295fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal    /**
9303099c831441e861328cd4965011c854e060ce56aSteven Liu     * Returns the result and response from RIL for oem request
9313099c831441e861328cd4965011c854e060ce56aSteven Liu     *
9323099c831441e861328cd4965011c854e060ce56aSteven Liu     * @param oemReq the data is sent to ril.
9333099c831441e861328cd4965011c854e060ce56aSteven Liu     * @param oemResp the respose data from RIL.
9343099c831441e861328cd4965011c854e060ce56aSteven Liu     * @return negative value request was not handled or get error
9353099c831441e861328cd4965011c854e060ce56aSteven Liu     *         0 request was handled succesfully, but no response data
9363099c831441e861328cd4965011c854e060ce56aSteven Liu     *         positive value success, data length of response
9373099c831441e861328cd4965011c854e060ce56aSteven Liu     */
9383099c831441e861328cd4965011c854e060ce56aSteven Liu    int invokeOemRilRequestRaw(in byte[] oemReq, out byte[] oemResp);
939fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
940bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla    /**
941bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     * Check if any mobile Radios need to be shutdown.
942bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     *
943bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     * @return true is any mobile radio needs to be shutdown
944bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     */
945bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla    boolean needMobileRadioShutdown();
946bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla
947bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla    /**
948bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     * Shutdown Mobile Radios
949bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     */
950bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla    void shutdownMobileRadios();
9512af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville
9522af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville    /**
9532af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     * Set phone radio type and access technology.
9542af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     *
9552af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     * @param rafs an RadioAccessFamily array to indicate all phone's
9562af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     *        new radio access family. The length of RadioAccessFamily
9572af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     *        must equ]]al to phone count.
9582af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     */
9592af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville    void setRadioCapability(in RadioAccessFamily[] rafs);
9602af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville
9612af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville    /**
9622af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     * Get phone radio type and access technology.
9632af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     *
9642af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     * @param phoneId which phone you want to get
9656e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the package making the call
9662af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     * @return phone radio type and access technology
9672af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     */
9686e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getRadioAccessFamily(in int phoneId, String callingPackage);
9694a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee
9704a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee    /**
9714a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     * Enables or disables video calling.
9724a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     *
9734a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     * @param enable Whether to enable video calling.
9744a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     */
9754a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee    void enableVideoCalling(boolean enable);
9764a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee
9774a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee    /**
9784a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     * Whether video calling has been enabled by the user.
9794a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     *
98016a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov     * @param callingPackage The package making the call.
98167fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     * @return {@code true} if the user has enabled video calling, {@code false} otherwise.
9824a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     */
98316a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    boolean isVideoCallingEnabled(String callingPackage);
9840b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe
9850303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com    /**
98667fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     * Whether the DTMF tone length can be changed.
98767fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     *
98867fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     * @return {@code true} if the DTMF tone length can be changed.
98967fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     */
99067fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee    boolean canChangeDtmfToneLength();
99167fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee
99267fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee    /**
99367fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     * Whether the device is a world phone.
99467fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     *
99567fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     * @return {@code true} if the devices is a world phone.
99667fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     */
99767fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee    boolean isWorldPhone();
99867fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee
99967fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee    /**
1000f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     * Whether the phone supports TTY mode.
1001f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     *
1002f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     * @return {@code true} if the device supports TTY mode.
1003f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     */
1004f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee    boolean isTtyModeSupported();
1005f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee
1006f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee    /**
1007f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     * Whether the phone supports hearing aid compatibility.
1008f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     *
1009f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     * @return {@code true} if the device supports hearing aid compatibility.
1010f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     */
1011f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee    boolean isHearingAidCompatibilitySupported();
1012b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen
1013f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee    /**
10140303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com     * Get IMS Registration Status
10150303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com     */
10160303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com    boolean isImsRegistered();
10170b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe
10180b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe    /**
101942eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold     * Returns the Status of Wi-Fi Calling
102042eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold     */
1021b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen    boolean isWifiCallingAvailable();
1022740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen
1023b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen    /**
1024b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen     * Returns the Status of Volte
1025b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen     */
1026b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen    boolean isVolteAvailable();
102742eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold
102842eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold     /**
1029b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen     * Returns the Status of VT (video telephony)
103042eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold     */
1031b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen    boolean isVideoTelephonyAvailable();
103242eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold
103342eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold    /**
10340b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      * Returns the unique device ID of phone, for example, the IMEI for
10350b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
10360b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      *
103716a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov      * @param callingPackage The package making the call.
10380b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      * <p>Requires Permission:
10390b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
10400b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      */
104116a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    String getDeviceId(String callingPackage);
1042ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon
1043ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon    /**
1044dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * Returns the IMEI for the given slot.
1045dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     *
1046dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * @param slotId - device slot.
1047dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * @param callingPackage The package making the call.
1048dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * <p>Requires Permission:
1049dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
1050dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     */
1051dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal    String getImeiForSlot(int slotId, String callingPackage);
1052dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal
1053dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal    /**
1054dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * Returns the device software version.
1055dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     *
1056dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * @param slotId - device slot.
1057dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * @param callingPackage The package making the call.
1058dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * <p>Requires Permission:
1059dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
1060dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     */
1061dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal    String getDeviceSoftwareVersionForSlot(int slotId, String callingPackage);
1062dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal
1063dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal    /**
1064ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon     * Returns the subscription ID associated with the specified PhoneAccount.
1065ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon     */
1066ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon    int getSubIdForPhoneAccount(in PhoneAccount phoneAccount);
1067f1fb39763d87dabe254b6ed64ac8f20145035bc0Stuart Scott
1068f1fb39763d87dabe254b6ed64ac8f20145035bc0Stuart Scott    void factoryReset(int subId);
10697ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath
10707ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath    /**
10717ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath     * An estimate of the users's current locale based on the default SIM.
10727ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath     *
10737ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath     * The returned string will be a well formed BCP-47 language tag, or {@code null}
10747ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath     * if no locale could be derived.
10757ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath     */
10767ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath    String getLocaleFromDefaultSim();
10775c728994311c40821604c6711171e860776659a6Prerepa Viswanadham
10785c728994311c40821604c6711171e860776659a6Prerepa Viswanadham    /**
1079010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski     * Requests the modem activity info asynchronously.
1080010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski     * The implementor is expected to reply with the
1081010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski     * {@link android.telephony.ModemActivityInfo} object placed into the Bundle with the key
1082010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski     * {@link android.telephony.TelephonyManager#MODEM_ACTIVITY_RESULT_KEY}.
1083010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski     * The result code is ignored.
10845c728994311c40821604c6711171e860776659a6Prerepa Viswanadham     */
1085010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski    oneway void requestModemActivityInfo(in ResultReceiver result);
108639daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu
108739daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu    /**
108839daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu     * Get the service state on specified subscription
108939daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu     * @param subId Subscription id
109039daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu     * @param callingPackage The package making the call
109139daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu     * @return Service state on specified subscription.
109239daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu     */
109339daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu    ServiceState getServiceStateForSubscriber(int subId, String callingPackage);
1094740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen
1095740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen    /**
1096740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * Returns the URI for the per-account voicemail ringtone set in Phone settings.
1097740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     *
1098740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
1099740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * voicemail ringtone.
1100740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * @return The URI for the ringtone to play when receiving a voicemail from a specific
1101740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * PhoneAccount.
1102740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     */
1103740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen    Uri getVoicemailRingtoneUri(in PhoneAccountHandle accountHandle);
1104740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen
1105740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen    /**
1106740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * Returns whether vibration is set for voicemail notification in Phone settings.
1107740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     *
1108740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
1109740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * voicemail vibration setting.
1110740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
1111740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     */
1112740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen    boolean isVoicemailVibrationEnabled(in PhoneAccountHandle accountHandle);
11134ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani
11144ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani    /**
11154ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani     * Returns a list of packages that have carrier privileges.
11164ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani     */
11174ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani    List<String> getPackagesWithCarrierPrivileges();
11182da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang
11192da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang    /**
11202da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     * Return the application ID for the app type.
11212da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     *
11222da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     * @param subId the subscription ID that this request applies to.
11232da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     * @param appType the uicc app type,
11242da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     * @return Application ID for specificied app type or null if no uicc or error.
11252da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     */
11262da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang    String getAidForAppType(int subId, int appType);
11277717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang
11287717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    /**
11297717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    * Return the Electronic Serial Number.
11307717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    *
11317717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
11327717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    *
11337717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    * @param subId the subscription ID that this request applies to.
11347717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    * @return ESN or null if error.
11357717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    * @hide
11367717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    */
11377717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    String getEsn(int subId);
113806e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe
113906e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe    /**
11404eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    * Return the Preferred Roaming List Version
11414eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    *
11424eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
11434eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    * @param subId the subscription ID that this request applies to.
11444eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    * @return PRLVersion or null if error.
11454eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    * @hide
11464eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    */
11474eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    String getCdmaPrlVersion(int subId);
11484eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang
11494eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    /**
115006e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     * Get snapshot of Telephony histograms
115106e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     * @return List of Telephony histograms
115206e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     * Requires Permission:
115306e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
115406e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     * Or the calling app has carrier privileges.
115506e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     */
115606e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe    List<TelephonyHistogram> getTelephonyHistograms();
115764997623bfa04e80064b6056fab0fb23144acb44Meng Wang
115864997623bfa04e80064b6056fab0fb23144acb44Meng Wang    /**
115964997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * Set the allowed carrier list for slotId
116064997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * Require system privileges. In the future we may add this to carrier APIs.
116164997623bfa04e80064b6056fab0fb23144acb44Meng Wang     *
116264997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * @return The number of carriers set successfully. Should match length of
116364997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * carriers on success.
116464997623bfa04e80064b6056fab0fb23144acb44Meng Wang     */
116564997623bfa04e80064b6056fab0fb23144acb44Meng Wang    int setAllowedCarriers(int slotId, in List<CarrierIdentifier> carriers);
116664997623bfa04e80064b6056fab0fb23144acb44Meng Wang
116764997623bfa04e80064b6056fab0fb23144acb44Meng Wang    /**
116864997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * Get the allowed carrier list for slotId.
116964997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * Require system privileges. In the future we may add this to carrier APIs.
117064997623bfa04e80064b6056fab0fb23144acb44Meng Wang     *
117164997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * @return List of {@link android.service.carrier.CarrierIdentifier}; empty list
117264997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * means all carriers are allowed.
117364997623bfa04e80064b6056fab0fb23144acb44Meng Wang     */
117464997623bfa04e80064b6056fab0fb23144acb44Meng Wang    List<CarrierIdentifier> getAllowedCarriers(int slotId);
11751bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu
1176b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu    /**
1177b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * Action set from carrier signalling broadcast receivers to enable/disable metered apns
1178b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
1179b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * @param subId the subscription ID that this action applies to.
1180b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * @param enabled control enable or disable metered apns.
1181b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * @hide
1182b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     */
11831bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu    void carrierActionSetMeteredApnsEnabled(int subId, boolean visible);
11841bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu
11851bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu    /**
11861bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     * Action set from carrier signalling broadcast receivers to enable/disable radio
11871bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
11881bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     * @param subId the subscription ID that this action applies to.
11891bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     * @param enabled control enable or disable radio.
11901bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     * @hide
11911bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     */
11921bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu    void carrierActionSetRadioEnabled(int subId, boolean enabled);
1193b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu
1194b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu    /**
1195b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * Get aggregated video call data usage since boot.
1196b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * Permissions android.Manifest.permission.READ_NETWORK_USAGE_HISTORY is required.
1197b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * @return total data usage in bytes
1198b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * @hide
1199b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     */
1200b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu    long getVtDataUsage();
12018781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu
12028781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu    /**
12038781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu     * Policy control of data connection. Usually used when data limit is passed.
12048781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu     * @param enabled True if enabling the data, otherwise disabling.
12058781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu     * @param subId Subscription index
12068781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu     * @hide
12078781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu     */
12088781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu    void setPolicyDataEnabled(boolean enabled, int subId);
12098347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran
12108347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran
12118347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran    /**
12128347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     * Get Client request stats which will contain statistical information
12138347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     * on each request made by client.
12148347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     * @param callingPackage package making the call.
12158347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     * @param subId Subscription index
12168347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     * @hide
12178347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     */
12188347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran    List<ClientRequestStats> getClientRequestStats(String callingPackage, int subid);
1219bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla}
1220