ITelephony.aidl revision 485d6dec93579d2186a3ecd57c2b5af4ce8e622b
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
475349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen    // Not oneway, caller needs to make sure the vaule is set before receiving a SMS
47667ab168b78782c4de5de3f44817961468533757cTa-wei Yen    void enableVisualVoicemailSmsFilter(String callingPackage, int subId,
47767ab168b78782c4de5de3f44817961468533757cTa-wei Yen            in VisualVoicemailSmsFilterSettings settings);
478349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen
47967ab168b78782c4de5de3f44817961468533757cTa-wei Yen    oneway void disableVisualVoicemailSmsFilter(String callingPackage, int subId);
480349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen
48167ab168b78782c4de5de3f44817961468533757cTa-wei Yen    // Get settings set by the calling package
48267ab168b78782c4de5de3f44817961468533757cTa-wei Yen    VisualVoicemailSmsFilterSettings getVisualVoicemailSmsFilterSettings(String callingPackage,
48367ab168b78782c4de5de3f44817961468533757cTa-wei Yen            int subId);
484349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen
485485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen    /**
486485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     *  Get settings set by the current default dialer, Internal use only.
487485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     *  Requires READ_PRIVILEGED_PHONE_STATE permission.
488485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     */
489485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen    VisualVoicemailSmsFilterSettings getActiveVisualVoicemailSmsFilterSettings(int subId);
490485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen
491485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen    /**
492485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     * Send a visual voicemail SMS. Internal use only.
493485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     * Requires caller to be the default dialer and have SEND_SMS permission
494485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen     */
495485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen    oneway void sendVisualVoicemailSmsForSubscriber(in String callingPackage, in int subId,
496485d6dec93579d2186a3ecd57c2b5af4ce8e622bTa-wei Yen            in String number, in int port, in String text, in PendingIntent sentIntent);
497349f4eddf76d1f16966a7ae7b599e984f599cf2eTa-wei Yen
498fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
4996e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * Returns the network type for data transmission
5009bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt     * Legacy call, permission-free
5016e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     */
5029bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt    int getNetworkType();
50398c7781ca89348992e3cb455e83cbc774bbe4d3eJohn Wang
504e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville    /**
505fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Returns the network type of a subId.
506fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId user preferred subId.
5076e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
508fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
5096e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getNetworkTypeForSubscriber(int subId, String callingPackage);
510fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
511fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
5126e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * Returns the network type for data transmission
5136e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
5146e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     */
5156e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getDataNetworkType(String callingPackage);
5160dde2c20a07770bc2f1b21e49222c968f3d8b39aWink Saville
5170dde2c20a07770bc2f1b21e49222c968f3d8b39aWink Saville    /**
5186e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * Returns the data network type of a subId
5196e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param subId user preferred subId.
5206e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage package making the call.
5216e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     */
5226e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getDataNetworkTypeForSubscriber(int subId, String callingPackage);
523fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
524fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
525fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville      * Returns the voice network type of a subId
526fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville      * @param subId user preferred subId.
5279bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt      * @param callingPackage package making the call.
528fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville      * Returns the network type
529fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville      */
5309bc8299ca0b2e8396b9f2f027c440cda164ba75eRobert Greenwalt    int getVoiceNetworkTypeForSubscriber(int subId, String callingPackage);
531fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
532fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
533e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville     * Return true if an ICC card is present
534e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville     */
535e40f66ffc11cfc7e1bbe3e4c2ae1cf6dbc24cc17Wink Saville    boolean hasIccCard();
5365e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville
5375e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville    /**
538fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Return true if an ICC card is present for a subId.
539fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param slotId user preferred slotId.
540fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Return true if an ICC card is present
541fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
54263f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    boolean hasIccCardUsingSlotId(int slotId);
543fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
544fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
5455e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     * Return if the current radio is LTE on CDMA. This
5465e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     * is a tri-state return value as for a period of time
5475e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     * the mode may be unknown.
5485e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     *
5496e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the calling package
5505e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
5515e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     * or {@link PHone#LTE_ON_CDMA_TRUE}
5525e9270bfd566c32a60dfeb34435a158eb4ceb9a9Wink Saville     */
5536e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getLteOnCdmaMode(String callingPackage);
554963db55d59a170f4b17ff907c96615a19ef6fe17John Wang
555963db55d59a170f4b17ff907c96615a19ef6fe17John Wang    /**
556fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Return if the current radio is LTE on CDMA. This
557fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * is a tri-state return value as for a period of time
558fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * the mode may be unknown.
559fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
5606e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the calling package
561fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return {@link Phone#LTE_ON_CDMA_UNKNOWN}, {@link Phone#LTE_ON_CDMA_FALSE}
562fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * or {@link PHone#LTE_ON_CDMA_TRUE}
563fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
5646e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getLteOnCdmaModeForSubscriber(int subId, String callingPackage);
565fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
566fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
567963db55d59a170f4b17ff907c96615a19ef6fe17John Wang     * Returns the all observed cell information of the device.
568963db55d59a170f4b17ff907c96615a19ef6fe17John Wang     */
569275b5635ad98a411d511894e98f80e8b8bc41799Svetoslav    List<CellInfo> getAllCellInfo(String callingPkg);
570094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville
571094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville    /**
572094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville     * Sets minimum time in milli-seconds between onCellInfoChanged
573094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville     */
574094beeccf5bf6e68d73f94a1aeaeda6690f4bf06Wink Saville    void setCellInfoListRate(int rateInMillis);
575767a662ecde33c3979bf02b793d392aca0403162Wink Saville
57657f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal    /**
577fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * get default sim
578fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return sim id
579fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
580fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    int getDefaultSim();
581fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
582fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
58357f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Opens a logical channel to the ICC card.
58457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
58557f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Input parameters equivalent to TS 27.007 AT+CCHO command.
58657f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
58752103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
58857f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param AID Application id. See ETSI 102.221 and 101.220.
589a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @return an IccOpenLogicalChannelResponse object.
59057f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     */
59152103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID);
59257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal
59357f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal    /**
59457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Closes a previously opened logical channel to the ICC card.
59557f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
59657f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Input parameters equivalent to TS 27.007 AT+CCHC command.
59757f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
59852103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
59957f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param channel is the channel id to be closed as retruned by a
60057f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *            successful iccOpenLogicalChannel.
60157f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @return true if the channel was closed successfully.
60257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     */
60352103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    boolean iccCloseLogicalChannel(int subId, int channel);
60457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal
60557f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal    /**
60657f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Transmit an APDU to the ICC card over a logical channel.
60757f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
60857f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * Input parameters equivalent to TS 27.007 AT+CGLA command.
60957f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *
61052103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
61157f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param channel is the channel id to be closed as retruned by a
61257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *            successful iccOpenLogicalChannel.
61357f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param cla Class of the APDU command.
61457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param instruction Instruction of the APDU command.
61557f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param p1 P1 value of the APDU command.
61657f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param p2 P2 value of the APDU command.
61757f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
61857f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     *            is sent to the SIM.
61957f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @param data Data to be sent with the APDU.
62057f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     * @return The APDU response from the ICC card with the status appended at
62143d94347a6feb14870a4ffd7682a816210e5e676Shishir Agrawal     *            the end.
62257f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal     */
62352103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    String iccTransmitApduLogicalChannel(int subId, int channel, int cla, int instruction,
62457f656b9f6271cf857b5ecec5f8c7eacb321ec0bShishir Agrawal            int p1, int p2, int p3, String data);
6258f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby
6268f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    /**
627a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * Transmit an APDU to the ICC card over the basic channel.
628a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     *
629a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * Input parameters equivalent to TS 27.007 AT+CSIM command.
630a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     *
63152103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
632a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param cla Class of the APDU command.
633a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param instruction Instruction of the APDU command.
634a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p1 P1 value of the APDU command.
635a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p2 P2 value of the APDU command.
636a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p3 P3 value of the APDU command. If p3 is negative a 4 byte APDU
637a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     *            is sent to the SIM.
638a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param data Data to be sent with the APDU.
639a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @return The APDU response from the ICC card with the status appended at
64043d94347a6feb14870a4ffd7682a816210e5e676Shishir Agrawal     *            the end.
641a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     */
64252103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    String iccTransmitApduBasicChannel(int subId, int cla, int instruction,
643a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal            int p1, int p2, int p3, String data);
644a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal
645a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal    /**
646a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * Returns the response APDU for a command APDU sent through SIM_IO.
647a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     *
64852103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
649a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param fileID
650a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param command
651a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p1 P1 value of the APDU command.
652a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p2 P2 value of the APDU command.
653a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param p3 P3 value of the APDU command.
654a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @param filePath
655a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     * @return The APDU response.
656a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal     */
65752103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    byte[] iccExchangeSimIO(int subId, int fileID, int command, int p1, int p2, int p3,
658a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal            String filePath);
659a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal
660a122e8df741456ea34e4a57d205411b8371a16dbShishir Agrawal    /**
661b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton     * Send ENVELOPE to the SIM and returns the response.
662210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton     *
66352103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
664210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton     * @param contents  String containing SAT/USAT response in hexadecimal
665210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton     *                  format starting with command tag. See TS 102 223 for
666210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton     *                  details.
667b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton     * @return The APDU response from the ICC card, with the last 4 bytes
668b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton     *         being the status word. If the command fails, returns an empty
669b8894ab1aec9c9ffa749f9369e412a51b942de27Evan Charlton     *         string.
670210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton     */
67152103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    String sendEnvelopeWithStatus(int subId, String content);
672210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton
673210889e91cb2da74e0323292ca156d17df03fe08Evan Charlton    /**
6748f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Read one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
6758f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Used for device configuration by some CDMA operators.
6768f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     *
6778f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @param itemID the ID of the item to read.
6788f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @return the NV item as a String, or null on any failure.
6798f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     */
6808f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    String nvReadItem(int itemID);
6818f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby
6828f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    /**
6838f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Write one of the NV items defined in {@link RadioNVItems} / {@code ril_nv_items.h}.
6848f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Used for device configuration by some CDMA operators.
6858f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     *
6868f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @param itemID the ID of the item to read.
6878f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @param itemValue the value to write, as a String.
6888f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @return true on success; false on any failure.
6898f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     */
6908f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    boolean nvWriteItem(int itemID, String itemValue);
6918f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby
6928f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    /**
6938f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Update the CDMA Preferred Roaming List (PRL) in the radio NV storage.
6948f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * Used for device configuration by some CDMA operators.
6958f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     *
6968f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @param preferredRoamingList byte array containing the new PRL.
6978f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @return true on success; false on any failure.
6988f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     */
6998f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    boolean nvWriteCdmaPrl(in byte[] preferredRoamingList);
7008f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby
7018f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    /**
702786e71ab11f2d89afffc9db7473f16206395c813Jake Hamby     * Perform the specified type of NV config reset. The radio will be taken offline
703786e71ab11f2d89afffc9db7473f16206395c813Jake Hamby     * and the device must be rebooted after the operation. Used for device
704786e71ab11f2d89afffc9db7473f16206395c813Jake Hamby     * configuration by some CDMA operators.
7058f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     *
7068f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @param resetType the type of reset to perform (1 == factory reset; 2 == NV-only reset).
7078f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     * @return true on success; false on any failure.
7088f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby     */
7098f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby    boolean nvResetConfig(int resetType);
7108f9b33e77686de8e917ba61c5e2f2e31a1e0e49bJake Hamby
7119bbb37116d2c5b597f9b5e3094ff328971e03c0bEvan Charlton    /*
7121365703d4964466472904dc84117a0946d9e1a44Junda Liu     * Get the calculated preferred network type.
7131365703d4964466472904dc84117a0946d9e1a44Junda Liu     * Used for device configuration by some CDMA operators.
71416a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov     * @param callingPackage The package making the call.
7151365703d4964466472904dc84117a0946d9e1a44Junda Liu     *
7161365703d4964466472904dc84117a0946d9e1a44Junda Liu     * @return the calculated preferred network type, defined in RILConstants.java.
7171365703d4964466472904dc84117a0946d9e1a44Junda Liu     */
71816a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    int getCalculatedPreferredNetworkType(String callingPackage);
7191365703d4964466472904dc84117a0946d9e1a44Junda Liu
7201365703d4964466472904dc84117a0946d9e1a44Junda Liu    /*
7214a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * Get the preferred network type.
7224a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * Used for device configuration by some CDMA operators.
7234a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     *
724984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     * @param subId the id of the subscription to query.
7254a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * @return the preferred network type, defined in RILConstants.java.
7264a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     */
727984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott    int getPreferredNetworkType(int subId);
7284a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby
7294a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby    /**
73038531581fc19f9172fabe56047b326e5dab88625Junda Liu     * Check TETHER_DUN_REQUIRED and TETHER_DUN_APN settings, net.tethering.noprovisioning
73138531581fc19f9172fabe56047b326e5dab88625Junda Liu     * SystemProperty, and config_tether_apndata to decide whether DUN APN is required for
73238531581fc19f9172fabe56047b326e5dab88625Junda Liu     * tethering.
73338531581fc19f9172fabe56047b326e5dab88625Junda Liu     *
73438531581fc19f9172fabe56047b326e5dab88625Junda Liu     * @return 0: Not required. 1: required. 2: Not set.
73538531581fc19f9172fabe56047b326e5dab88625Junda Liu     */
73638531581fc19f9172fabe56047b326e5dab88625Junda Liu    int getTetherApnRequired();
73738531581fc19f9172fabe56047b326e5dab88625Junda Liu
73838531581fc19f9172fabe56047b326e5dab88625Junda Liu    /**
739984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     * Set the network selection mode to automatic.
740984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     *
741984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     * @param subId the id of the subscription to update.
742984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     */
743984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott    void setNetworkSelectionModeAutomatic(int subId);
744984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott
745984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott    /**
746d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * Perform a radio scan and return the list of avialble networks.
747d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     *
748d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * @param subId the id of the subscription.
749d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * @return CellNetworkScanResult containing status of scan and networks.
750d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     */
751d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal    CellNetworkScanResult getCellNetworkScanResults(int subId);
752d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal
753d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal    /**
754d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * Ask the radio to connect to the input network and change selection mode to manual.
755d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     *
756d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * @param subId the id of the subscription.
757d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * @param operatorInfo the operator to attach to.
758e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal     * @param persistSelection should the selection persist till reboot or its
759e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal     *        turned off? Will also result in notification being not shown to
760e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal     *        the user if the signal is lost.
761d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     * @return true if the request suceeded.
762d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal     */
763e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal    boolean setNetworkSelectionModeManual(int subId, in OperatorInfo operator,
764e25bd01ad662d1a5b19592c98fac0a3035081375Shishir Agrawal            boolean persistSelection);
765d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal
766d4f2bcdab5a43e6439babfd5eefeaff908b73870Shishir Agrawal    /**
7674a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * Set the preferred network type.
7684a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * Used for device configuration by some CDMA operators.
7694a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     *
770984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott     * @param subId the id of the subscription to update.
7714a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * @param networkType the preferred network type, defined in RILConstants.java.
7724a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     * @return true on success; false on any failure.
7734a2fa35a6ad03d5ee1cd03ae94b4e7d70b50811cJake Hamby     */
774984dc850b4caeb4470e52bce773935be5305cf8eStuart Scott    boolean setPreferredNetworkType(int subId, int networkType);
775afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt
776afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt    /**
777afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     * User enable/disable Mobile Data.
778afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     *
779afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     * @param enable true to turn on, else false
780afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     */
78136ffb0494dd1045c164b7479b68165e206f8c759Wink Saville    void setDataEnabled(int subId, boolean enable);
782afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt
783afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt    /**
784afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     * Get the user enabled state of Mobile Data.
785afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     *
786afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     * @return true on enabled
787afa05c0b43cbc065181d5c2d6ee368a08bb00c3bRobert Greenwalt     */
78836ffb0494dd1045c164b7479b68165e206f8c759Wink Saville    boolean getDataEnabled(int subId);
789fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
790fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
791fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Get P-CSCF address from PCO after data connection is established or modified.
792e647099e14114475e9a2827a10dab2d2e36308c4ram     * @param apnType the apnType, "ims" for IMS APN, "emergency" for EMERGENCY APN
79316a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov     * @param callingPackage The package making the call.
794fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
79516a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    String[] getPcscfAddress(String apnType, String callingPackage);
796fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
797fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
798fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Set IMS registration state
799fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
800fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    void setImsRegistrationState(boolean registered);
801fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
802762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal    /**
8032b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     * Return MDN string for CDMA phone.
8042b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     * @param subId user preferred subId.
8052b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     */
80663f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    String getCdmaMdn(int subId);
8072b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu
8082b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu    /**
8092b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     * Return MIN string for CDMA phone.
8102b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     * @param subId user preferred subId.
8112b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu     */
81263f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    String getCdmaMin(int subId);
8132b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu
8142b2469b07d6ea9410bdb8d1234aa2320b02bdaa9Junda Liu    /**
815762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     * Has the calling application been granted special privileges by the carrier.
816762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     *
817762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     * If any of the packages in the calling UID has carrier privileges, the
818762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     * call will return true. This access is granted by the owner of the UICC
819762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     * card and does not depend on the registered carrier.
820762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     *
821762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     * TODO: Add a link to documentation.
822762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     *
82352103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
824fc3646f58e5851e7a483b8388bdd826078166d10Shishir Agrawal     * @return carrier privilege status defined in TelephonyManager.
825762d5a091f5e19b568bb0ff81a2cb6785b69075fShishir Agrawal     */
82652103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    int getCarrierPrivilegeStatus(int subId);
827142529702dad9a6612271f487d500db80173ba7bJunda Liu
828142529702dad9a6612271f487d500db80173ba7bJunda Liu    /**
829b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson     * Similar to above, but check for the package whose name is pkgName.
830142529702dad9a6612271f487d500db80173ba7bJunda Liu     */
831b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson    int checkCarrierPrivilegesForPackage(String pkgName);
832b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson
833b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson    /**
834b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson     * Similar to above, but check across all phones.
835b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson     */
836b4b9ca7580c75f07330e5222cbd9ccc93b12935eZach Johnson    int checkCarrierPrivilegesForPackageAnyPhone(String pkgName);
837f9aefdb534c6cb2af22dfb7614a1c15c2d67dd9cDerek Tan
838f9aefdb534c6cb2af22dfb7614a1c15c2d67dd9cDerek Tan    /**
839f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu     * Returns list of the package names of the carrier apps that should handle the input intent
840f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu     * and have carrier privileges for the given phoneId.
84163c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal     *
8423892fc0349a91097f53152eaf2801dfebb2066caDiego Pontoriero     * @param intent Intent that will be sent.
843f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu     * @param phoneId The phoneId on which the carrier app has carrier privileges.
844f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu     * @return list of carrier app package names that can handle the intent on phoneId.
84563c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal     *         Returns null if there is an error and an empty list if there
84663c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal     *         are no matching packages.
84763c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal     */
848f3c7bf432dc5c21fdecbb44865c037313d21b4cfJunda Liu    List<String> getCarrierPackageNamesForIntentAndPhone(in Intent intent, int phoneId);
84963c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal
85063c4c06be44fe8bd4506e6f9f57361d31e947c21Shishir Agrawal    /**
8512bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan     * Set the line 1 phone number string and its alphatag for the current ICCID
8522bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan     * for display purpose only, for example, displayed in Phone Status. It won't
8532bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan     * change the actual MSISDN/MDN. To unset alphatag or number, pass in a null
8542bae510ccef2da7dd767f8148d4e3539037f4aaaDerek Tan     * value.
855818631b679171ffb49eaa641bee06b9c953651daDerek Tan     *
856818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @param subId the subscriber that the alphatag and dialing number belongs to.
857818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @param alphaTag alpha-tagging of the dailing nubmer
858818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @param number The dialing number
8590201a6f6f16a872405a5f9ee65026e948eb162d0Shishir Agrawal     * @return true if the operation was executed correctly.
860818631b679171ffb49eaa641bee06b9c953651daDerek Tan     */
8610201a6f6f16a872405a5f9ee65026e948eb162d0Shishir Agrawal    boolean setLine1NumberForDisplayForSubscriber(int subId, String alphaTag, String number);
862818631b679171ffb49eaa641bee06b9c953651daDerek Tan
863818631b679171ffb49eaa641bee06b9c953651daDerek Tan    /**
864818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * Returns the displayed dialing number string if it was set previously via
865818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * {@link #setLine1NumberForDisplay}. Otherwise returns null.
866818631b679171ffb49eaa641bee06b9c953651daDerek Tan     *
867818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @param subId whose dialing number for line 1 is returned.
86816a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov     * @param callingPackage The package making the call.
869818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @return the displayed dialing number if set, or null if not set.
870818631b679171ffb49eaa641bee06b9c953651daDerek Tan     */
87116a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    String getLine1NumberForDisplay(int subId, String callingPackage);
872818631b679171ffb49eaa641bee06b9c953651daDerek Tan
873818631b679171ffb49eaa641bee06b9c953651daDerek Tan    /**
874818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * Returns the displayed alphatag of the dialing number if it was set
875818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * previously via {@link #setLine1NumberForDisplay}. Otherwise returns null.
876818631b679171ffb49eaa641bee06b9c953651daDerek Tan     *
877818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @param subId whose alphatag associated with line 1 is returned.
87816a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov     * @param callingPackage The package making the call.
879818631b679171ffb49eaa641bee06b9c953651daDerek Tan     * @return the displayed alphatag of the dialing number if set, or null if
880818631b679171ffb49eaa641bee06b9c953651daDerek Tan     *         not set.
881818631b679171ffb49eaa641bee06b9c953651daDerek Tan     */
88216a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    String getLine1AlphaTagForDisplay(int subId, String callingPackage);
88386578cca383562c72751d747905280afdeb2bdfbShishir Agrawal
884d24e4eafdb3e42de5a8fd080fcd50ebf4c7bcb71Fyodor Kupolov    String[] getMergedSubscriberIds(String callingPackage);
8853256601f5e4d94713f59e97b9d4912875c1bdcafJeff Sharkey
88686578cca383562c72751d747905280afdeb2bdfbShishir Agrawal    /**
887d2cfa92146ecfa5e00d4a3ce8e63b1a588845fe2Shishir Agrawal     * Override the operator branding for the current ICCID.
88886578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     *
889d2cfa92146ecfa5e00d4a3ce8e63b1a588845fe2Shishir Agrawal     * Once set, whenever the SIM is present in the device, the service
89086578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * provider name (SPN) and the operator name will both be replaced by the
89186578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * brand value input. To unset the value, the same function should be
89286578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * called with a null brand value.
89386578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     *
89486578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * <p>Requires Permission:
89586578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
89686578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     *  or has to be carrier app - see #hasCarrierPrivileges.
89786578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     *
89852103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId The subscription to use.
89986578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * @param brand The brand name to display/set.
90086578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     * @return true if the operation was executed correctly.
90186578cca383562c72751d747905280afdeb2bdfbShishir Agrawal     */
90252103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    boolean setOperatorBrandOverride(int subId, String brand);
9033099c831441e861328cd4965011c854e060ce56aSteven Liu
9043099c831441e861328cd4965011c854e060ce56aSteven Liu    /**
9055fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * Override the roaming indicator for the current ICCID.
9065fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     *
9075fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * Using this call, the carrier app (see #hasCarrierPrivileges) can override
9085fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * the platform's notion of a network operator being considered roaming or not.
9095fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * The change only affects the ICCID that was active when this call was made.
9105fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     *
9115fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * If null is passed as any of the input, the corresponding value is deleted.
9125fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     *
9135fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * <p>Requires that the caller have carrier privilege. See #hasCarrierPrivileges.
9145fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     *
91552103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal     * @param subId for which the roaming overrides apply.
9165fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * @param gsmRoamingList - List of MCCMNCs to be considered roaming for 3GPP RATs.
9175fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * @param gsmNonRoamingList - List of MCCMNCs to be considered not roaming for 3GPP RATs.
9185fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * @param cdmaRoamingList - List of SIDs to be considered roaming for 3GPP2 RATs.
9195fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * @param cdmaNonRoamingList - List of SIDs to be considered not roaming for 3GPP2 RATs.
9205fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     * @return true if the operation was executed correctly.
9215fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal     */
92252103938915205cfd1febe09e2cae58060a8ef74Shishir Agrawal    boolean setRoamingOverride(int subId, in List<String> gsmRoamingList,
9235fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal            in List<String> gsmNonRoamingList, in List<String> cdmaRoamingList,
9245fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal            in List<String> cdmaNonRoamingList);
9255fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal
9265fb1118d8c8a19bbbf4abc679b55f08cdfb79ba8Shishir Agrawal    /**
9273099c831441e861328cd4965011c854e060ce56aSteven Liu     * Returns the result and response from RIL for oem request
9283099c831441e861328cd4965011c854e060ce56aSteven Liu     *
9293099c831441e861328cd4965011c854e060ce56aSteven Liu     * @param oemReq the data is sent to ril.
9303099c831441e861328cd4965011c854e060ce56aSteven Liu     * @param oemResp the respose data from RIL.
9313099c831441e861328cd4965011c854e060ce56aSteven Liu     * @return negative value request was not handled or get error
9323099c831441e861328cd4965011c854e060ce56aSteven Liu     *         0 request was handled succesfully, but no response data
9333099c831441e861328cd4965011c854e060ce56aSteven Liu     *         positive value success, data length of response
9343099c831441e861328cd4965011c854e060ce56aSteven Liu     */
9353099c831441e861328cd4965011c854e060ce56aSteven Liu    int invokeOemRilRequestRaw(in byte[] oemReq, out byte[] oemResp);
936fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
937bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla    /**
938bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     * Check if any mobile Radios need to be shutdown.
939bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     *
940bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     * @return true is any mobile radio needs to be shutdown
941bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     */
942bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla    boolean needMobileRadioShutdown();
943bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla
944bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla    /**
945bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     * Shutdown Mobile Radios
946bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla     */
947bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla    void shutdownMobileRadios();
9482af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville
9492af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville    /**
9502af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     * Set phone radio type and access technology.
9512af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     *
9522af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     * @param rafs an RadioAccessFamily array to indicate all phone's
9532af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     *        new radio access family. The length of RadioAccessFamily
9542af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     *        must equ]]al to phone count.
9552af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     */
9562af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville    void setRadioCapability(in RadioAccessFamily[] rafs);
9572af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville
9582af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville    /**
9592af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     * Get phone radio type and access technology.
9602af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     *
9612af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     * @param phoneId which phone you want to get
9626e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt     * @param callingPackage the name of the package making the call
9632af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     * @return phone radio type and access technology
9642af2d57d578e0c3a2740628e7c6336b19961cc49Wink Saville     */
9656e4a98f8707f759fa9f47a458683a3627e42b0b6Robert Greenwalt    int getRadioAccessFamily(in int phoneId, String callingPackage);
9664a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee
9674a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee    /**
9684a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     * Enables or disables video calling.
9694a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     *
9704a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     * @param enable Whether to enable video calling.
9714a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     */
9724a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee    void enableVideoCalling(boolean enable);
9734a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee
9744a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee    /**
9754a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     * Whether video calling has been enabled by the user.
9764a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     *
97716a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov     * @param callingPackage The package making the call.
97867fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     * @return {@code true} if the user has enabled video calling, {@code false} otherwise.
9794a3084a46d80383c528198a48da5c327d7d08a00Andrew Lee     */
98016a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    boolean isVideoCallingEnabled(String callingPackage);
9810b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe
9820303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com    /**
98367fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     * Whether the DTMF tone length can be changed.
98467fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     *
98567fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     * @return {@code true} if the DTMF tone length can be changed.
98667fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     */
98767fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee    boolean canChangeDtmfToneLength();
98867fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee
98967fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee    /**
99067fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     * Whether the device is a world phone.
99167fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     *
99267fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     * @return {@code true} if the devices is a world phone.
99367fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee     */
99467fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee    boolean isWorldPhone();
99567fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee
99667fc92bd444e4d8eee0aa7703980aff9185ea1bdAndrew Lee    /**
997f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     * Whether the phone supports TTY mode.
998f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     *
999f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     * @return {@code true} if the device supports TTY mode.
1000f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     */
1001f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee    boolean isTtyModeSupported();
1002f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee
1003f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee    /**
1004f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     * Whether the phone supports hearing aid compatibility.
1005f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     *
1006f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     * @return {@code true} if the device supports hearing aid compatibility.
1007f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee     */
1008f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee    boolean isHearingAidCompatibilitySupported();
1009b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen
1010f3c10020e2b76f20adb90d250ab4ed4e20e348d2Andrew Lee    /**
10110303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com     * Get IMS Registration Status
10120303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com     */
10130303be4a8ac109e52b2581b7c6a94b27c581f84fLibin.Tang@motorola.com    boolean isImsRegistered();
10140b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe
10150b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe    /**
101642eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold     * Returns the Status of Wi-Fi Calling
101742eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold     */
1018b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen    boolean isWifiCallingAvailable();
1019740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen
1020b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen    /**
1021b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen     * Returns the Status of Volte
1022b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen     */
1023b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen    boolean isVolteAvailable();
102442eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold
102542eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold     /**
1026b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen     * Returns the Status of VT (video telephony)
102742eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold     */
1028b304fc0aafe067e422ce219ba5edb4bc7a68924cEtan Cohen    boolean isVideoTelephonyAvailable();
102942eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold
103042eadcdf3432e9fd6662ee07316db7726c1eabbfNathan Harold    /**
10310b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      * Returns the unique device ID of phone, for example, the IMEI for
10320b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      * GSM and the MEID for CDMA phones. Return null if device ID is not available.
10330b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      *
103416a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov      * @param callingPackage The package making the call.
10350b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      * <p>Requires Permission:
10360b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
10370b7f5e81ba06f694df8c8cccaea9e009e3200b4cSanket Padawe      */
103816a16899505ec0a9ede5b76650bfb8817b3227c7Svet Ganov    String getDeviceId(String callingPackage);
1039ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon
1040ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon    /**
1041dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * Returns the IMEI for the given slot.
1042dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     *
1043dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * @param slotId - device slot.
1044dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * @param callingPackage The package making the call.
1045dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * <p>Requires Permission:
1046dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
1047dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     */
1048dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal    String getImeiForSlot(int slotId, String callingPackage);
1049dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal
1050dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal    /**
1051dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * Returns the device software version.
1052dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     *
1053dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * @param slotId - device slot.
1054dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * @param callingPackage The package making the call.
1055dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     * <p>Requires Permission:
1056dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     *   {@link android.Manifest.permission#READ_PHONE_STATE READ_PHONE_STATE}
1057dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal     */
1058dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal    String getDeviceSoftwareVersionForSlot(int slotId, String callingPackage);
1059dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal
1060dc50a87495c23068b4150a0fc197e51ace2ae47bShishir Agrawal    /**
1061ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon     * Returns the subscription ID associated with the specified PhoneAccount.
1062ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon     */
1063ed4ca5ca2c40ed2c838aaf483fcd58abdfa0ff08Santos Cordon    int getSubIdForPhoneAccount(in PhoneAccount phoneAccount);
1064f1fb39763d87dabe254b6ed64ac8f20145035bc0Stuart Scott
1065f1fb39763d87dabe254b6ed64ac8f20145035bc0Stuart Scott    void factoryReset(int subId);
10667ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath
10677ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath    /**
10687ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath     * An estimate of the users's current locale based on the default SIM.
10697ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath     *
10707ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath     * The returned string will be a well formed BCP-47 language tag, or {@code null}
10717ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath     * if no locale could be derived.
10727ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath     */
10737ff76d637f5ad49838e9d4a1570c762a187ed4d1Narayan Kamath    String getLocaleFromDefaultSim();
10745c728994311c40821604c6711171e860776659a6Prerepa Viswanadham
10755c728994311c40821604c6711171e860776659a6Prerepa Viswanadham    /**
1076010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski     * Requests the modem activity info asynchronously.
1077010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski     * The implementor is expected to reply with the
1078010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski     * {@link android.telephony.ModemActivityInfo} object placed into the Bundle with the key
1079010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski     * {@link android.telephony.TelephonyManager#MODEM_ACTIVITY_RESULT_KEY}.
1080010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski     * The result code is ignored.
10815c728994311c40821604c6711171e860776659a6Prerepa Viswanadham     */
1082010bf374d8145528f8733dfa6ef101b15de23a8dAdam Lesinski    oneway void requestModemActivityInfo(in ResultReceiver result);
108339daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu
108439daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu    /**
108539daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu     * Get the service state on specified subscription
108639daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu     * @param subId Subscription id
108739daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu     * @param callingPackage The package making the call
108839daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu     * @return Service state on specified subscription.
108939daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu     */
109039daf8d6f14a01d2854352fe08d14195f7a2056bJack Yu    ServiceState getServiceStateForSubscriber(int subId, String callingPackage);
1091740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen
1092740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen    /**
1093740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * Returns the URI for the per-account voicemail ringtone set in Phone settings.
1094740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     *
1095740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
1096740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * voicemail ringtone.
1097740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * @return The URI for the ringtone to play when receiving a voicemail from a specific
1098740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * PhoneAccount.
1099740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     */
1100740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen    Uri getVoicemailRingtoneUri(in PhoneAccountHandle accountHandle);
1101740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen
1102740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen    /**
1103740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * Returns whether vibration is set for voicemail notification in Phone settings.
1104740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     *
1105740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * @param accountHandle The handle for the {@link PhoneAccount} for which to retrieve the
1106740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * voicemail vibration setting.
1107740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     * @return {@code true} if the vibration is set for this PhoneAccount, {@code false} otherwise.
1108740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen     */
1109740fb3bcca1366e20783dd7656d3ffe6ea3a744eNancy Chen    boolean isVoicemailVibrationEnabled(in PhoneAccountHandle accountHandle);
11104ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani
11114ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani    /**
11124ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani     * Returns a list of packages that have carrier privileges.
11134ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani     */
11144ec6368f13a53906757283d50a17ed3ed43eccc4Amith Yamasani    List<String> getPackagesWithCarrierPrivileges();
11152da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang
11162da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang    /**
11172da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     * Return the application ID for the app type.
11182da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     *
11192da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     * @param subId the subscription ID that this request applies to.
11202da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     * @param appType the uicc app type,
11212da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     * @return Application ID for specificied app type or null if no uicc or error.
11222da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang     */
11232da9b2b8bfb01744d53c14a65a80035d3c8d7b2fYouhan Wang    String getAidForAppType(int subId, int appType);
11247717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang
11257717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    /**
11267717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    * Return the Electronic Serial Number.
11277717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    *
11287717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
11297717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    *
11307717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    * @param subId the subscription ID that this request applies to.
11317717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    * @return ESN or null if error.
11327717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    * @hide
11337717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    */
11347717acd174795936756226a4bc367fdcb7b49c5dYouhan Wang    String getEsn(int subId);
113506e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe
113606e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe    /**
11374eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    * Return the Preferred Roaming List Version
11384eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    *
11394eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    * Requires that the calling app has READ_PRIVILEGED_PHONE_STATE permission
11404eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    * @param subId the subscription ID that this request applies to.
11414eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    * @return PRLVersion or null if error.
11424eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    * @hide
11434eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    */
11444eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    String getCdmaPrlVersion(int subId);
11454eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang
11464eb5678ed8a0704fe1e4f5e7a3a3156f69b6884fYouhan Wang    /**
114706e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     * Get snapshot of Telephony histograms
114806e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     * @return List of Telephony histograms
114906e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     * Requires Permission:
115006e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     *   {@link android.Manifest.permission#MODIFY_PHONE_STATE MODIFY_PHONE_STATE}
115106e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     * Or the calling app has carrier privileges.
115206e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe     */
115306e1ae1a51b9fb8c65e610c22f86380c60a803a0Sanket Padawe    List<TelephonyHistogram> getTelephonyHistograms();
115464997623bfa04e80064b6056fab0fb23144acb44Meng Wang
115564997623bfa04e80064b6056fab0fb23144acb44Meng Wang    /**
115664997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * Set the allowed carrier list for slotId
115764997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * Require system privileges. In the future we may add this to carrier APIs.
115864997623bfa04e80064b6056fab0fb23144acb44Meng Wang     *
115964997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * @return The number of carriers set successfully. Should match length of
116064997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * carriers on success.
116164997623bfa04e80064b6056fab0fb23144acb44Meng Wang     */
116264997623bfa04e80064b6056fab0fb23144acb44Meng Wang    int setAllowedCarriers(int slotId, in List<CarrierIdentifier> carriers);
116364997623bfa04e80064b6056fab0fb23144acb44Meng Wang
116464997623bfa04e80064b6056fab0fb23144acb44Meng Wang    /**
116564997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * Get the allowed carrier list for slotId.
116664997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * Require system privileges. In the future we may add this to carrier APIs.
116764997623bfa04e80064b6056fab0fb23144acb44Meng Wang     *
116864997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * @return List of {@link android.service.carrier.CarrierIdentifier}; empty list
116964997623bfa04e80064b6056fab0fb23144acb44Meng Wang     * means all carriers are allowed.
117064997623bfa04e80064b6056fab0fb23144acb44Meng Wang     */
117164997623bfa04e80064b6056fab0fb23144acb44Meng Wang    List<CarrierIdentifier> getAllowedCarriers(int slotId);
11721bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu
1173b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu    /**
1174b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * Action set from carrier signalling broadcast receivers to enable/disable metered apns
1175b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
1176b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * @param subId the subscription ID that this action applies to.
1177b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * @param enabled control enable or disable metered apns.
1178b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * @hide
1179b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     */
11801bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu    void carrierActionSetMeteredApnsEnabled(int subId, boolean visible);
11811bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu
11821bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu    /**
11831bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     * Action set from carrier signalling broadcast receivers to enable/disable radio
11841bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     * Permissions android.Manifest.permission.MODIFY_PHONE_STATE is required
11851bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     * @param subId the subscription ID that this action applies to.
11861bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     * @param enabled control enable or disable radio.
11871bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     * @hide
11881bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu     */
11891bf6ec2f868041ba4c3d4c88d3ac482bfd4c52b9fionaxu    void carrierActionSetRadioEnabled(int subId, boolean enabled);
1190b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu
1191b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu    /**
1192b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * Get aggregated video call data usage since boot.
1193b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * Permissions android.Manifest.permission.READ_NETWORK_USAGE_HISTORY is required.
1194b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * @return total data usage in bytes
1195b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     * @hide
1196b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu     */
1197b6587eac06c00c964b6f541e18d307df8c4a9a50Jack Yu    long getVtDataUsage();
11988781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu
11998781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu    /**
12008781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu     * Policy control of data connection. Usually used when data limit is passed.
12018781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu     * @param enabled True if enabling the data, otherwise disabling.
12028781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu     * @param subId Subscription index
12038781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu     * @hide
12048781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu     */
12058781b68e2bd6c0080e9c91544557b64783e7dffaJack Yu    void setPolicyDataEnabled(boolean enabled, int subId);
12068347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran
12078347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran
12088347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran    /**
12098347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     * Get Client request stats which will contain statistical information
12108347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     * on each request made by client.
12118347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     * @param callingPackage package making the call.
12128347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     * @param subId Subscription index
12138347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     * @hide
12148347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran     */
12158347c3898dfca9db048aa0feb0e52a6b55a205efSooraj Sasindran    List<ClientRequestStats> getClientRequestStats(String callingPackage, int subid);
1216bd7723637b14d1895c043c2257f1cd9560322d4eNaveen Kalla}
1217