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; 205a72553ef991d4821fcab4feaa3c1b23faca8724Wink Savilleimport com.android.internal.telephony.SmsRawData; 215a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 225a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville/** Interface for applications to access the ICC phone book. 235a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 245a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <p>The following code snippet demonstrates a static method to 255a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * retrieve the ISms interface from Android:</p> 265a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <pre>private static ISms getSmsInterface() 275a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville throws DeadObjectException { 285a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville IServiceManager sm = ServiceManagerNative.getDefault(); 295a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville ISms ss; 305a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville ss = ISms.Stub.asInterface(sm.getService("isms")); 315a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville return ss; 325a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville} 335a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * </pre> 345a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 355a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 365a72553ef991d4821fcab4feaa3c1b23faca8724Wink Savilleinterface ISms { 375a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /** 385a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Retrieves all messages currently stored on ICC. 395a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 405a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @return list of SmsRawData of all sms on ICC 415a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 425a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville List<SmsRawData> getAllMessagesFromIccEf(String callingPkg); 435a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 445a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /** 455a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Update the specified message on the ICC. 465a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 475a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param messageIndex record index of message to update 485a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param newStatus new message status (STATUS_ON_ICC_READ, 495a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * STATUS_ON_ICC_UNREAD, STATUS_ON_ICC_SENT, 505a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * STATUS_ON_ICC_UNSENT, STATUS_ON_ICC_FREE) 515a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param pdu the raw PDU to store 525a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @return success or not 535a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 545a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 555a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville boolean updateMessageOnIccEf(String callingPkg, int messageIndex, int newStatus, 565a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville in byte[] pdu); 575a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 585a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /** 595a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Copy a raw SMS PDU to the ICC. 605a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 615a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param pdu the raw PDU to store 625a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param status message status (STATUS_ON_ICC_READ, STATUS_ON_ICC_UNREAD, 635a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * STATUS_ON_ICC_SENT, STATUS_ON_ICC_UNSENT) 645a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @return success or not 655a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 665a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 675a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville boolean copyMessageToIccEf(String callingPkg, int status, in byte[] pdu, in byte[] smsc); 685a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 695a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /** 705a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Send a data SMS. 715a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 725a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param smsc the SMSC to send the message through, or NULL for the 735a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * default SMSC 745a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param data the body of the message to send 755a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param sentIntent if not NULL this <code>PendingIntent</code> is 765a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * broadcast when the message is sucessfully sent, or failed. 775a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * The result code will be <code>Activity.RESULT_OK<code> for success, 785a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * or one of these errors:<br> 795a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <code>RESULT_ERROR_GENERIC_FAILURE</code><br> 805a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <code>RESULT_ERROR_RADIO_OFF</code><br> 815a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <code>RESULT_ERROR_NULL_PDU</code><br> 825a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include 835a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * the extra "errorCode" containing a radio technology specific value, 845a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * generally only useful for troubleshooting.<br> 855a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * The per-application based SMS control checks sentIntent. If sentIntent 865a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * is NULL the caller will be checked against all unknown applicaitons, 875a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * which cause smaller number of SMS to be sent in checking period. 885a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param deliveryIntent if not NULL this <code>PendingIntent</code> is 895a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * broadcast when the message is delivered to the recipient. The 905a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * raw pdu of the status report is in the extended data ("pdu"). 915a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 925a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville void sendData(String callingPkg, in String destAddr, in String scAddr, in int destPort, 935a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville in byte[] data, in PendingIntent sentIntent, in PendingIntent deliveryIntent); 945a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 955a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /** 965a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Send an SMS. 975a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 985a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param smsc the SMSC to send the message through, or NULL for the 995a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * default SMSC 1005a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param text the body of the message to send 1015a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param sentIntent if not NULL this <code>PendingIntent</code> is 1025a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * broadcast when the message is sucessfully sent, or failed. 1035a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * The result code will be <code>Activity.RESULT_OK<code> for success, 1045a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * or one of these errors:<br> 1055a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <code>RESULT_ERROR_GENERIC_FAILURE</code><br> 1065a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <code>RESULT_ERROR_RADIO_OFF</code><br> 1075a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <code>RESULT_ERROR_NULL_PDU</code><br> 1085a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * For <code>RESULT_ERROR_GENERIC_FAILURE</code> the sentIntent may include 1095a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * the extra "errorCode" containing a radio technology specific value, 1105a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * generally only useful for troubleshooting.<br> 1115a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * The per-application based SMS control checks sentIntent. If sentIntent 1125a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * is NULL the caller will be checked against all unknown applications, 1135a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * which cause smaller number of SMS to be sent in checking period. 1145a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param deliveryIntent if not NULL this <code>PendingIntent</code> is 1155a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * broadcast when the message is delivered to the recipient. The 1165a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * raw pdu of the status report is in the extended data ("pdu"). 1175a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 1185a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville void sendText(String callingPkg, in String destAddr, in String scAddr, in String text, 1195a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville in PendingIntent sentIntent, in PendingIntent deliveryIntent); 1205a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 1215a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /** 1225a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Send a multi-part text based SMS. 1235a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 1245a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param destinationAddress the address to send the message to 1255a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param scAddress is the service center address or null to use 1265a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * the current default SMSC 1275a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param parts an <code>ArrayList</code> of strings that, in order, 1285a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * comprise the original message 1295a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param sentIntents if not null, an <code>ArrayList</code> of 1305a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <code>PendingIntent</code>s (one for each message part) that is 1315a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * broadcast when the corresponding message part has been sent. 1325a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * The result code will be <code>Activity.RESULT_OK<code> for success, 1335a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * or one of these errors: 1345a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <code>RESULT_ERROR_GENERIC_FAILURE</code> 1355a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <code>RESULT_ERROR_RADIO_OFF</code> 1365a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <code>RESULT_ERROR_NULL_PDU</code>. 1375a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param deliveryIntents if not null, an <code>ArrayList</code> of 1385a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * <code>PendingIntent</code>s (one for each message part) that is 1395a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * broadcast when the corresponding message part has been delivered 1405a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * to the recipient. The raw pdu of the status report is in the 1415a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * extended data ("pdu"). 1425a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 1435a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville void sendMultipartText(String callingPkg, in String destinationAddress, in String scAddress, 1445a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville in List<String> parts, in List<PendingIntent> sentIntents, 1455a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville in List<PendingIntent> deliveryIntents); 1465a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 1475a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /** 1485a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Enable reception of cell broadcast (SMS-CB) messages with the given 1495a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * message identifier. Note that if two different clients enable the same 1505a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * message identifier, they must both disable it for the device to stop 1515a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * receiving those messages. 1525a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 1535a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param messageIdentifier Message identifier as specified in TS 23.041 (3GPP) or 1545a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * C.R1001-G (3GPP2) 1555a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @return true if successful, false otherwise 1565a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 1575a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @see #disableCellBroadcast(int) 1585a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 1595a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville boolean enableCellBroadcast(int messageIdentifier); 1605a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 1615a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /** 1625a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Disable reception of cell broadcast (SMS-CB) messages with the given 1635a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * message identifier. Note that if two different clients enable the same 1645a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * message identifier, they must both disable it for the device to stop 1655a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * receiving those messages. 1665a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 1675a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param messageIdentifier Message identifier as specified in TS 23.041 (3GPP) or 1685a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * C.R1001-G (3GPP2) 1695a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @return true if successful, false otherwise 1705a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 1715a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @see #enableCellBroadcast(int) 1725a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 1735a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville boolean disableCellBroadcast(int messageIdentifier); 1745a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 1755a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /* 1765a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Enable reception of cell broadcast (SMS-CB) messages with the given 1775a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * message identifier range. Note that if two different clients enable 1785a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * a message identifier range, they must both disable it for the device 1795a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * to stop receiving those messages. 1805a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 1815a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param startMessageId first message identifier as specified in TS 23.041 (3GPP) or 1825a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * C.R1001-G (3GPP2) 1835a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param endMessageId last message identifier as specified in TS 23.041 (3GPP) or 1845a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * C.R1001-G (3GPP2) 1855a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @return true if successful, false otherwise 1865a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 1875a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @see #disableCellBroadcastRange(int, int) 1885a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 1895a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville boolean enableCellBroadcastRange(int startMessageId, int endMessageId); 1905a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 1915a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /** 1925a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Disable reception of cell broadcast (SMS-CB) messages with the given 1935a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * message identifier range. Note that if two different clients enable 1945a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * a message identifier range, they must both disable it for the device 1955a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * to stop receiving those messages. 1965a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 1975a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param startMessageId first message identifier as specified in TS 23.041 (3GPP) or 1985a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * C.R1001-G (3GPP2) 1995a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @param endMessageId last message identifier as specified in TS 23.041 (3GPP) or 2005a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * C.R1001-G (3GPP2) 2015a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @return true if successful, false otherwise 2025a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * 2035a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * @see #enableCellBroadcastRange(int, int) 2045a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 2055a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville boolean disableCellBroadcastRange(int startMessageId, int endMessageId); 2065a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 2075a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /** 2085a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Returns the premium SMS send permission for the specified package. 2095a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Requires system permission. 2105a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 2115a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville int getPremiumSmsPermission(String packageName); 2125a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville 2135a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville /** 2145a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Set the SMS send permission for the specified package. 2155a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville * Requires system permission. 2165a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville */ 2175a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville void setPremiumSmsPermission(String packageName, int permission); 218140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks 219140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks /** 220140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * SMS over IMS is supported if IMS is registered and SMS is supported 221140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * on IMS. 222140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * 223140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * @return true if SMS over IMS is supported, false otherwise 224140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * 225140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * @see #getImsSmsFormat() 226140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks */ 227140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks boolean isImsSmsSupported(); 228140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks 229140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks /** 230140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * Gets SMS format supported on IMS. SMS over IMS format is 231140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * either 3GPP or 3GPP2. 232140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * 233140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * @return android.telephony.SmsMessage.FORMAT_3GPP, 234140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * android.telephony.SmsMessage.FORMAT_3GPP2 235140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * or android.telephony.SmsMessage.FORMAT_UNKNOWN 236140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * 237140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks * @see #isImsSmsSupported() 238140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks */ 239140ae7bdadd13d3b849385636e1811438e62ed6aRika Brooks String getImsSmsFormat(); 2405a72553ef991d4821fcab4feaa3c1b23faca8724Wink Saville} 241