15a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville/*
25a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville** Copyright 2007, The Android Open Source Project
35a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville**
45a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville** Licensed under the Apache License, Version 2.0 (the "License");
55a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville** you may not use this file except in compliance with the License.
65a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville** You may obtain a copy of the License at
75a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville**
85a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville**     http://www.apache.org/licenses/LICENSE-2.0
95a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville**
105a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville** Unless required by applicable law or agreed to in writing, software
115a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville** distributed under the License is distributed on an "AS IS" BASIS,
125a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
135a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville** See the License for the specific language governing permissions and
145a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville** limitations under the License.
155a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville*/
165a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville
175a72553ef991d4821fcab4feaa3c1b23faca8724Wink Savillepackage com.android.internal.telephony;
185a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville
195a72553ef991d4821fcab4feaa3c1b23faca8724Wink Savilleimport android.app.PendingIntent;
20295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wenimport android.net.Uri;
215a72553ef991d4821fcab4feaa3c1b23faca8724Wink Savilleimport com.android.internal.telephony.SmsRawData;
225a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville
235a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville/** Interface for applications to access the ICC phone book.
245a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville *
255a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <p>The following code snippet demonstrates a static method to
265a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * retrieve the ISms interface from Android:</p>
275a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <pre>private static ISms getSmsInterface()
285a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville            throws DeadObjectException {
295a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville    IServiceManager sm = ServiceManagerNative.getDefault();
305a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville    ISms ss;
315a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville    ss = ISms.Stub.asInterface(sm.getService("isms"));
325a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville    return ss;
335a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville}
345a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * </pre>
355a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */
365a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville
375a72553ef991d4821fcab4feaa3c1b23faca8724Wink Savilleinterface ISms {
385a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville    /**
395a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Retrieves all messages currently stored on ICC.
40fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId the subId id.
41fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return list of SmsRawData of all sms on ICC
42fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
4363f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    List<SmsRawData> getAllMessagesFromIccEfForSubscriber(in int subId, String callingPkg);
44fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
45fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
465a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Update the specified message on the ICC.
475a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *
485a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param messageIndex record index of message to update
495a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param newStatus new message status (STATUS_ON_ICC_READ,
505a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *                  STATUS_ON_ICC_UNREAD, STATUS_ON_ICC_SENT,
515a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *                  STATUS_ON_ICC_UNSENT, STATUS_ON_ICC_FREE)
525a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param pdu the raw PDU to store
53fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId the subId id.
54fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return success or not
55fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
56fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
5763f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville     boolean updateMessageOnIccEfForSubscriber(in int subId, String callingPkg,
58fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville             int messageIndex, int newStatus, in byte[] pdu);
59fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
60fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
615a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Copy a raw SMS PDU to the ICC.
625a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *
635a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param pdu the raw PDU to store
645a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param status message status (STATUS_ON_ICC_READ, STATUS_ON_ICC_UNREAD,
655a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *               STATUS_ON_ICC_SENT, STATUS_ON_ICC_UNSENT)
66fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId the subId id.
67fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return success or not
68fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
69fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
7063f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    boolean copyMessageToIccEfForSubscriber(in int subId, String callingPkg, int status,
71fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville            in byte[] pdu, in byte[] smsc);
72fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
73fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
745a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Send a data SMS.
755a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *
765a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param smsc the SMSC to send the message through, or NULL for the
775a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  default SMSC
785a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param data the body of the message to send
795a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param sentIntent if not NULL this <code>PendingIntent</code> is
805a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  broadcast when the message is sucessfully sent, or failed.
815a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  The result code will be <code>Activity.RESULT_OK<code> for success,
825a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  or one of these errors:<br>
835a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  <code>RESULT_ERROR_GENERIC_FAILURE</code><br>
845a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  <code>RESULT_ERROR_RADIO_OFF</code><br>
855a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  <code>RESULT_ERROR_NULL_PDU</code><br>
865a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include
875a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  the extra "errorCode" containing a radio technology specific value,
885a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  generally only useful for troubleshooting.<br>
895a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  The per-application based SMS control checks sentIntent. If sentIntent
905a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  is NULL the caller will be checked against all unknown applicaitons,
915a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  which cause smaller number of SMS to be sent in checking period.
925a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param deliveryIntent if not NULL this <code>PendingIntent</code> is
935a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  broadcast when the message is delivered to the recipient.  The
945a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  raw pdu of the status report is in the extended data ("pdu").
95fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId the subId id.
96fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
9763f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    void sendDataForSubscriber(int subId, String callingPkg, in String destAddr,
98fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville            in String scAddr, in int destPort, in byte[] data, in PendingIntent sentIntent,
99fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville            in PendingIntent deliveryIntent);
100fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
101fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
102a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * Send a data SMS. Only for use internally.
103a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *
104a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * @param smsc the SMSC to send the message through, or NULL for the
105a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  default SMSC
106a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * @param data the body of the message to send
107a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * @param sentIntent if not NULL this <code>PendingIntent</code> is
108a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  broadcast when the message is sucessfully sent, or failed.
109a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  The result code will be <code>Activity.RESULT_OK<code> for success,
110a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  or one of these errors:<br>
111a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  <code>RESULT_ERROR_GENERIC_FAILURE</code><br>
112a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  <code>RESULT_ERROR_RADIO_OFF</code><br>
113a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  <code>RESULT_ERROR_NULL_PDU</code><br>
114a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include
115a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  the extra "errorCode" containing a radio technology specific value,
116a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  generally only useful for troubleshooting.<br>
117a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  The per-application based SMS control checks sentIntent. If sentIntent
118a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  is NULL the caller will be checked against all unknown applicaitons,
119a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  which cause smaller number of SMS to be sent in checking period.
120a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * @param deliveryIntent if not NULL this <code>PendingIntent</code> is
121a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  broadcast when the message is delivered to the recipient.  The
122a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  raw pdu of the status report is in the extended data ("pdu").
123a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * @param subId the subId id.
124a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     */
125a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen    void sendDataForSubscriberWithSelfPermissions(int subId, String callingPkg, in String destAddr,
126a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen            in String scAddr, in int destPort, in byte[] data, in PendingIntent sentIntent,
127a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen            in PendingIntent deliveryIntent);
128a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen
129a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen    /**
1305a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Send an SMS.
1315a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *
1325a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param smsc the SMSC to send the message through, or NULL for the
1335a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  default SMSC
1345a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param text the body of the message to send
1355a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param sentIntent if not NULL this <code>PendingIntent</code> is
1365a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  broadcast when the message is sucessfully sent, or failed.
1375a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  The result code will be <code>Activity.RESULT_OK<code> for success,
1385a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  or one of these errors:<br>
1395a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  <code>RESULT_ERROR_GENERIC_FAILURE</code><br>
1405a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  <code>RESULT_ERROR_RADIO_OFF</code><br>
1415a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  <code>RESULT_ERROR_NULL_PDU</code><br>
1425a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include
1435a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  the extra "errorCode" containing a radio technology specific value,
1445a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  generally only useful for troubleshooting.<br>
1455a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  The per-application based SMS control checks sentIntent. If sentIntent
1465a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  is NULL the caller will be checked against all unknown applications,
1475a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  which cause smaller number of SMS to be sent in checking period.
1485a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param deliveryIntent if not NULL this <code>PendingIntent</code> is
1495a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  broadcast when the message is delivered to the recipient.  The
1505a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *  raw pdu of the status report is in the extended data ("pdu").
151fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId the subId on which the SMS has to be sent.
152216813c9e1edda0bc70a97cd6ec7e26a28d640b0Ji Yang     * @param persistMessageForNonDefaultSmsApp whether the sent message should
153216813c9e1edda0bc70a97cd6ec7e26a28d640b0Ji Yang     *   be automatically persisted in the SMS db. It only affects messages sent
154216813c9e1edda0bc70a97cd6ec7e26a28d640b0Ji Yang     *   by a non-default SMS app. Currently only the carrier app can set this
155216813c9e1edda0bc70a97cd6ec7e26a28d640b0Ji Yang     *   parameter to false to skip auto message persistence.
156fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
15763f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    void sendTextForSubscriber(in int subId, String callingPkg, in String destAddr,
158fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville            in String scAddr, in String text, in PendingIntent sentIntent,
159216813c9e1edda0bc70a97cd6ec7e26a28d640b0Ji Yang            in PendingIntent deliveryIntent, in boolean persistMessageForNonDefaultSmsApp);
160fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
161fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
162a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * Send an SMS. Internal use only.
163a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *
164a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * @param smsc the SMSC to send the message through, or NULL for the
165a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  default SMSC
166a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * @param text the body of the message to send
167a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * @param sentIntent if not NULL this <code>PendingIntent</code> is
168a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  broadcast when the message is sucessfully sent, or failed.
169a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  The result code will be <code>Activity.RESULT_OK<code> for success,
170a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  or one of these errors:<br>
171a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  <code>RESULT_ERROR_GENERIC_FAILURE</code><br>
172a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  <code>RESULT_ERROR_RADIO_OFF</code><br>
173a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  <code>RESULT_ERROR_NULL_PDU</code><br>
174a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include
175a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  the extra "errorCode" containing a radio technology specific value,
176a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  generally only useful for troubleshooting.<br>
177a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  The per-application based SMS control checks sentIntent. If sentIntent
178a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  is NULL the caller will be checked against all unknown applications,
179a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  which cause smaller number of SMS to be sent in checking period.
180a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * @param deliveryIntent if not NULL this <code>PendingIntent</code> is
181a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  broadcast when the message is delivered to the recipient.  The
182a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     *  raw pdu of the status report is in the extended data ("pdu").
183a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     * @param subId the subId on which the SMS has to be sent.
184a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen     */
185a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen    void sendTextForSubscriberWithSelfPermissions(in int subId, String callingPkg,
186a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen            in String destAddr, in String scAddr, in String text, in PendingIntent sentIntent,
187a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen            in PendingIntent deliveryIntent);
188a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen
189a3117b3881b10467f332c5ab451b6ac477ecc6e0Nancy Chen    /**
1905d3c5fc115e8b987e490b332d96537cea3536f13Anil Muthineni     * Inject an SMS PDU into the android platform.
1915d3c5fc115e8b987e490b332d96537cea3536f13Anil Muthineni     *
19256e02703f79ec842214bee4347459b38430c981cCheuksan Wang     * @param subId the subId on which the SMS has to be injected.
1935d3c5fc115e8b987e490b332d96537cea3536f13Anil Muthineni     * @param pdu is the byte array of pdu to be injected into android application framework
1945d3c5fc115e8b987e490b332d96537cea3536f13Anil Muthineni     * @param format is the format of SMS pdu (android.telephony.SmsMessage.FORMAT_3GPP or
1955d3c5fc115e8b987e490b332d96537cea3536f13Anil Muthineni     * android.telephony.SmsMessage.FORMAT_3GPP2)
1965d3c5fc115e8b987e490b332d96537cea3536f13Anil Muthineni     * @param receivedIntent if not NULL this <code>PendingIntent</code> is
1975d3c5fc115e8b987e490b332d96537cea3536f13Anil Muthineni     *  broadcast when the message is successfully received by the
1985d3c5fc115e8b987e490b332d96537cea3536f13Anil Muthineni     *  android application framework. This intent is broadcasted at
1995d3c5fc115e8b987e490b332d96537cea3536f13Anil Muthineni     *  the same time an SMS received from radio is acknowledged back.
2005d3c5fc115e8b987e490b332d96537cea3536f13Anil Muthineni     */
20156e02703f79ec842214bee4347459b38430c981cCheuksan Wang    void injectSmsPduForSubscriber(
20256e02703f79ec842214bee4347459b38430c981cCheuksan Wang            int subId, in byte[] pdu, String format, in PendingIntent receivedIntent);
2035a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville
2045a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville    /**
205fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Send a multi-part text based SMS.
206fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
207fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param destinationAddress the address to send the message to
208fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param scAddress is the service center address or null to use
209fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   the current default SMSC
210fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param parts an <code>ArrayList</code> of strings that, in order,
211fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   comprise the original message
212fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param sentIntents if not null, an <code>ArrayList</code> of
213fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   <code>PendingIntent</code>s (one for each message part) that is
214fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   broadcast when the corresponding message part has been sent.
215fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   The result code will be <code>Activity.RESULT_OK<code> for success,
216fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   or one of these errors:
217fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   <code>RESULT_ERROR_GENERIC_FAILURE</code>
218fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   <code>RESULT_ERROR_RADIO_OFF</code>
219fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   <code>RESULT_ERROR_NULL_PDU</code>.
220fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param deliveryIntents if not null, an <code>ArrayList</code> of
221fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   <code>PendingIntent</code>s (one for each message part) that is
222fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   broadcast when the corresponding message part has been delivered
223fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   to the recipient.  The raw pdu of the status report is in the
224fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   extended data ("pdu").
225fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId the subId on which the SMS has to be sent.
226216813c9e1edda0bc70a97cd6ec7e26a28d640b0Ji Yang     * @param persistMessageForNonDefaultSmsApp whether the sent message should
227216813c9e1edda0bc70a97cd6ec7e26a28d640b0Ji Yang     *   be automatically persisted in the SMS db. It only affects messages sent
228216813c9e1edda0bc70a97cd6ec7e26a28d640b0Ji Yang     *   by a non-default SMS app. Currently only the carrier app can set this
229216813c9e1edda0bc70a97cd6ec7e26a28d640b0Ji Yang     *   parameter to false to skip auto message persistence.
230fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
23163f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    void sendMultipartTextForSubscriber(in int subId, String callingPkg,
232fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville            in String destinationAddress, in String scAddress,
233fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville            in List<String> parts, in List<PendingIntent> sentIntents,
234216813c9e1edda0bc70a97cd6ec7e26a28d640b0Ji Yang            in List<PendingIntent> deliveryIntents, in boolean persistMessageForNonDefaultSmsApp);
235fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
236fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
2375a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Enable reception of cell broadcast (SMS-CB) messages with the given
238c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * message identifier and RAN type. The RAN type specify this message ID
239c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different clients
240c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * enable the same message identifier, they must both disable it for the
241c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * device to stop receiving those messages.
2425a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *
2435a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param messageIdentifier Message identifier as specified in TS 23.041 (3GPP) or
2445a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *   C.R1001-G (3GPP2)
245fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId for which the broadcast has to be enabled
246c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * @param ranType as defined in class SmsManager, the value can be one of these:
247c93802b993de254304aa5dc182c7188fcfff8eecxinhe     *    android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_GSM
248c93802b993de254304aa5dc182c7188fcfff8eecxinhe     *    android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA
249fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return true if successful, false otherwise
250fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
25156e02703f79ec842214bee4347459b38430c981cCheuksan Wang     * @see #disableCellBroadcastForSubscriber(int, int, int)
252fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
253c93802b993de254304aa5dc182c7188fcfff8eecxinhe    boolean enableCellBroadcastForSubscriber(int subId, int messageIdentifier, int ranType);
254fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
255fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
2565a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Disable reception of cell broadcast (SMS-CB) messages with the given
257c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * message identifier and RAN type. The RAN type specify this message ID
258c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different clients
259c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * enable the same message identifier, they must both disable it for the
260c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * device to stop receiving those messages.
2615a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *
2625a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param messageIdentifier Message identifier as specified in TS 23.041 (3GPP) or
2635a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *   C.R1001-G (3GPP2)
264fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId for which the broadcast has to be disabled
265c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * @param ranType as defined in class SmsManager, the value can be one of these:
266c93802b993de254304aa5dc182c7188fcfff8eecxinhe     *    android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_GSM
267c93802b993de254304aa5dc182c7188fcfff8eecxinhe     *    android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA
268fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return true if successful, false otherwise
269fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
27056e02703f79ec842214bee4347459b38430c981cCheuksan Wang     * @see #enableCellBroadcastForSubscriber(int, int, int)
271fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
272c93802b993de254304aa5dc182c7188fcfff8eecxinhe    boolean disableCellBroadcastForSubscriber(int subId, int messageIdentifier, int ranType);
273fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
2745a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville    /*
2755a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Enable reception of cell broadcast (SMS-CB) messages with the given
276c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * message identifier range and RAN type. The RAN type specify this message ID range
277c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different clients enable
278fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * a message identifier range, they must both disable it for the device
279fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * to stop receiving those messages.
280fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
281fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param startMessageId first message identifier as specified in TS 23.041 (3GPP) or
282fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   C.R1001-G (3GPP2)
283fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param endMessageId last message identifier as specified in TS 23.041 (3GPP) or
284fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *   C.R1001-G (3GPP2)
285fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId for which the broadcast has to be enabled
286c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * @param ranType as defined in class SmsManager, the value can be one of these:
287c93802b993de254304aa5dc182c7188fcfff8eecxinhe     *    android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_GSM
288c93802b993de254304aa5dc182c7188fcfff8eecxinhe     *    android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA
289fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return true if successful, false otherwise
290fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
29156e02703f79ec842214bee4347459b38430c981cCheuksan Wang     * @see #disableCellBroadcastRangeForSubscriber(int, int, int, int)
292fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
293c93802b993de254304aa5dc182c7188fcfff8eecxinhe    boolean enableCellBroadcastRangeForSubscriber(int subId, int startMessageId, int endMessageId,
294c93802b993de254304aa5dc182c7188fcfff8eecxinhe            int ranType);
295fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
2965a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville    /**
2975a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Disable reception of cell broadcast (SMS-CB) messages with the given
298c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * message identifier range and RAN type. The RAN type specify this message ID range
299c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * belong to 3GPP (GSM) or 3GPP2(CDMA). Note that if two different clients enable
3005a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * a message identifier range, they must both disable it for the device
3015a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * to stop receiving those messages.
3025a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *
3035a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param startMessageId first message identifier as specified in TS 23.041 (3GPP) or
3045a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *   C.R1001-G (3GPP2)
3055a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * @param endMessageId last message identifier as specified in TS 23.041 (3GPP) or
3065a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     *   C.R1001-G (3GPP2)
307fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId for which the broadcast has to be disabled
308c93802b993de254304aa5dc182c7188fcfff8eecxinhe     * @param ranType as defined in class SmsManager, the value can be one of these:
309c93802b993de254304aa5dc182c7188fcfff8eecxinhe     *    android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_GSM
310c93802b993de254304aa5dc182c7188fcfff8eecxinhe     *    android.telephony.SmsMessage.CELL_BROADCAST_RAN_TYPE_CDMA
311fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return true if successful, false otherwise
312fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
31356e02703f79ec842214bee4347459b38430c981cCheuksan Wang     * @see #enableCellBroadcastRangeForSubscriber(int, int, int, int)
314fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
31563f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    boolean disableCellBroadcastRangeForSubscriber(int subId, int startMessageId,
316c93802b993de254304aa5dc182c7188fcfff8eecxinhe            int endMessageId, int ranType);
317fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
318fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
3195a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Returns the premium SMS send permission for the specified package.
3205a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Requires system permission.
3215a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     */
3225a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville    int getPremiumSmsPermission(String packageName);
3235a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville
3245a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville    /**
325fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Returns the premium SMS send permission for the specified package.
326fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Requires system permission.
327fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
32863f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    int getPremiumSmsPermissionForSubscriber(int subId, String packageName);
329fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
330fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
3315a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Set the SMS send permission for the specified package.
3325a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     * Requires system permission.
3335a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville     */
3345a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville    void setPremiumSmsPermission(String packageName, int permission);
335140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks
336fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     /**
337fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Set the SMS send permission for the specified package.
338fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Requires system permission.
339fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
34063f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    void setPremiumSmsPermissionForSubscriber(int subId, String packageName, int permission);
341fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
342fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
343140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks     * SMS over IMS is supported if IMS is registered and SMS is supported
344140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks     * on IMS.
345fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId for subId which isImsSmsSupported is queried
346fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return true if SMS over IMS is supported, false otherwise
347fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
34856e02703f79ec842214bee4347459b38430c981cCheuksan Wang     * @see #getImsSmsFormatForSubscriber(int)
349fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
35063f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    boolean isImsSmsSupportedForSubscriber(int subId);
351fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
3521e62748b94b9f4808553b14a14d4a8f98a0ca7f3Amit Mahajan    /**
3531e62748b94b9f4808553b14a14d4a8f98a0ca7f3Amit Mahajan     * User needs to pick SIM for SMS if multiple SIMs present and if current subId passed in is not
3541e62748b94b9f4808553b14a14d4a8f98a0ca7f3Amit Mahajan     * active/valid.
3551e62748b94b9f4808553b14a14d4a8f98a0ca7f3Amit Mahajan     * @param subId current subId for sending SMS
3561e62748b94b9f4808553b14a14d4a8f98a0ca7f3Amit Mahajan     * @return true if SIM for SMS sending needs to be chosen
3571e62748b94b9f4808553b14a14d4a8f98a0ca7f3Amit Mahajan     */
3581e62748b94b9f4808553b14a14d4a8f98a0ca7f3Amit Mahajan    boolean isSmsSimPickActivityNeeded(int subId);
3591e62748b94b9f4808553b14a14d4a8f98a0ca7f3Amit Mahajan
360fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /*
361fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * get user prefered SMS subId
362fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return subId id
363fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
36463f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    int getPreferredSmsSubscription();
365fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
366fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /**
367140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks     * Gets SMS format supported on IMS.  SMS over IMS format is
368140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks     * either 3GPP or 3GPP2.
369fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @param subId for subId which getImsSmsFormat is queried
370fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return android.telephony.SmsMessage.FORMAT_3GPP,
371fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *         android.telephony.SmsMessage.FORMAT_3GPP2
372fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *      or android.telephony.SmsMessage.FORMAT_UNKNOWN
373fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     *
37456e02703f79ec842214bee4347459b38430c981cCheuksan Wang     * @see #isImsSmsSupportedForSubscriber(int)
375fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
37663f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    String getImsSmsFormatForSubscriber(int subId);
377fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville
378fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    /*
379fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * Get SMS prompt property,  enabled or not
380fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     * @return true if enabled, false otherwise
381fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville     */
382fb40dd4d00bd3361b2535bc866e6c21eadc52558Wink Saville    boolean isSMSPromptEnabled();
383295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen
384295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen    /**
385295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * Send a system stored text message.
386295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *
387295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * This is used for sending a previously sent, but failed-to-send, message or
388295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * for sending a text message that has been stored as a draft.
389295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *
390295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param subId the SIM id.
391295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param callingPkg the package name of the calling app
392295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param messageUri the URI of the stored message
393295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param scAddress is the service center address or null to use the current default SMSC
394295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param sentIntent if not NULL this <code>PendingIntent</code> is
395295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  broadcast when the message is successfully sent, or failed.
396295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  The result code will be <code>Activity.RESULT_OK</code> for success,
397295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  or one of these errors:<br>
398295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  <code>RESULT_ERROR_GENERIC_FAILURE</code><br>
399295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  <code>RESULT_ERROR_RADIO_OFF</code><br>
400295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  <code>RESULT_ERROR_NULL_PDU</code><br>
401295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include
402295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  the extra "errorCode" containing a radio technology specific value,
403295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  generally only useful for troubleshooting.<br>
404295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  The per-application based SMS control checks sentIntent. If sentIntent
405295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  is NULL the caller will be checked against all unknown applications,
406295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  which cause smaller number of SMS to be sent in checking period.
407295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param deliveryIntent if not NULL this <code>PendingIntent</code> is
408295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  broadcast when the message is delivered to the recipient.  The
409295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *  raw pdu of the status report is in the extended data ("pdu").
410295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     */
41163f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    void sendStoredText(int subId, String callingPkg, in Uri messageUri, String scAddress,
412295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen            in PendingIntent sentIntent, in PendingIntent deliveryIntent);
413295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen
414295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen    /**
415295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * Send a system stored multi-part text message.
416295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *
417295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * This is used for sending a previously sent, but failed-to-send, message or
418295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * for sending a text message that has been stored as a draft.
419295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * The provided <code>PendingIntent</code> lists should match the part number of the
420295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * divided text of the stored message by using <code>divideMessage</code>
421295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *
422295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param subId the SIM id.
423295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param callingPkg the package name of the calling app
424295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param messageUri the URI of the stored message
425295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param scAddress is the service center address or null to use
426295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   the current default SMSC
427295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param sentIntents if not null, an <code>ArrayList</code> of
428295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   <code>PendingIntent</code>s (one for each message part) that is
429295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   broadcast when the corresponding message part has been sent.
430295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   The result code will be <code>Activity.RESULT_OK</code> for success,
431295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   or one of these errors:<br>
432295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   <code>RESULT_ERROR_GENERIC_FAILURE</code><br>
433295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   <code>RESULT_ERROR_RADIO_OFF</code><br>
434295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   <code>RESULT_ERROR_NULL_PDU</code><br>
435295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   For <code>RESULT_ERROR_GENERIC_FAILURE</code> each sentIntent may include
436295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   the extra "errorCode" containing a radio technology specific value,
437295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   generally only useful for troubleshooting.<br>
438295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   The per-application based SMS control checks sentIntent. If sentIntent
439295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   is NULL the caller will be checked against all unknown applications,
440295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   which cause smaller number of SMS to be sent in checking period.
441295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     * @param deliveryIntents if not null, an <code>ArrayList</code> of
442295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   <code>PendingIntent</code>s (one for each message part) that is
443295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   broadcast when the corresponding message part has been delivered
444295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   to the recipient.  The raw pdu of the status report is in the
445295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     *   extended data ("pdu").
446295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen     */
44763f03dd94c43c22f2c77306059b5748e5e1e0e3cWink Saville    void sendStoredMultipartText(int subId, String callingPkg, in Uri messageUri,
448295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen                String scAddress, in List<PendingIntent> sentIntents,
449295f2190c51540fe7a2d108ec6c218e9e0a4926aYe Wen                in List<PendingIntent> deliveryIntents);
4505a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville}
451