Loading api/current.xml +753 −0 Original line number Diff line number Diff line Loading @@ -113269,6 +113269,759 @@ > </field> </class> <class name="SmsManager" extends="java.lang.Object" abstract="false" static="false" final="true" deprecated="not deprecated" visibility="public" > <method name="divideMessage" return="java.util.ArrayList<java.lang.String>" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> </method> <method name="getDefault" return="android.telephony.SmsManager" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="sendDataMessage" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="destinationAddress" type="java.lang.String"> </parameter> <parameter name="scAddress" type="java.lang.String"> </parameter> <parameter name="destinationPort" type="short"> </parameter> <parameter name="data" type="byte[]"> </parameter> <parameter name="sentIntent" type="android.app.PendingIntent"> </parameter> <parameter name="deliveryIntent" type="android.app.PendingIntent"> </parameter> </method> <method name="sendMultipartTextMessage" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="destinationAddress" type="java.lang.String"> </parameter> <parameter name="scAddress" type="java.lang.String"> </parameter> <parameter name="parts" type="java.util.ArrayList<java.lang.String>"> </parameter> <parameter name="sentIntents" type="java.util.ArrayList<android.app.PendingIntent>"> </parameter> <parameter name="deliveryIntents" type="java.util.ArrayList<android.app.PendingIntent>"> </parameter> </method> <method name="sendTextMessage" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="destinationAddress" type="java.lang.String"> </parameter> <parameter name="scAddress" type="java.lang.String"> </parameter> <parameter name="text" type="java.lang.String"> </parameter> <parameter name="sentIntent" type="android.app.PendingIntent"> </parameter> <parameter name="deliveryIntent" type="android.app.PendingIntent"> </parameter> </method> <field name="RESULT_ERROR_GENERIC_FAILURE" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="RESULT_ERROR_NO_SERVICE" type="int" transient="false" volatile="false" value="4" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="RESULT_ERROR_NULL_PDU" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="RESULT_ERROR_RADIO_OFF" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="STATUS_ON_ICC_FREE" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="STATUS_ON_ICC_READ" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="STATUS_ON_ICC_SENT" type="int" transient="false" volatile="false" value="5" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="STATUS_ON_ICC_UNREAD" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="STATUS_ON_ICC_UNSENT" type="int" transient="false" volatile="false" value="7" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="SmsMessage" extends="java.lang.Object" abstract="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <method name="calculateLength" return="int[]" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="msgBody" type="java.lang.CharSequence"> </parameter> <parameter name="use7bitOnly" type="boolean"> </parameter> </method> <method name="calculateLength" return="int[]" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="messageBody" type="java.lang.String"> </parameter> <parameter name="use7bitOnly" type="boolean"> </parameter> </method> <method name="createFromPdu" return="android.telephony.SmsMessage" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="pdu" type="byte[]"> </parameter> </method> <method name="fragmentText" return="java.util.ArrayList<java.lang.String>" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> </method> <method name="getDisplayMessageBody" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getDisplayOriginatingAddress" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getEmailBody" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getEmailFrom" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getIndexOnIcc" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getIndexOnSim" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="deprecated" visibility="public" > </method> <method name="getMessageBody" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getMessageClass" return="android.telephony.SmsMessage.MessageClass" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getOriginatingAddress" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getPdu" return="byte[]" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getProtocolIdentifier" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getPseudoSubject" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getServiceCenterAddress" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getStatus" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getStatusOnIcc" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getStatusOnSim" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="deprecated" visibility="public" > </method> <method name="getSubmitPdu" return="android.telephony.SmsMessage.SubmitPdu" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="scAddress" type="java.lang.String"> </parameter> <parameter name="destinationAddress" type="java.lang.String"> </parameter> <parameter name="message" type="java.lang.String"> </parameter> <parameter name="statusReportRequested" type="boolean"> </parameter> </method> <method name="getSubmitPdu" return="android.telephony.SmsMessage.SubmitPdu" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="scAddress" type="java.lang.String"> </parameter> <parameter name="destinationAddress" type="java.lang.String"> </parameter> <parameter name="destinationPort" type="short"> </parameter> <parameter name="data" type="byte[]"> </parameter> <parameter name="statusReportRequested" type="boolean"> </parameter> </method> <method name="getTPLayerLengthForPDU" return="int" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="pdu" type="java.lang.String"> </parameter> </method> <method name="getTimestampMillis" return="long" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getUserData" return="byte[]" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isCphsMwiMessage" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isEmail" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isMWIClearMessage" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isMWISetMessage" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isMwiDontStore" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isReplace" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isReplyPathPresent" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isStatusReportMessage" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <field name="ENCODING_16BIT" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ENCODING_7BIT" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ENCODING_8BIT" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ENCODING_UNKNOWN" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MAX_USER_DATA_BYTES" type="int" transient="false" volatile="false" value="140" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MAX_USER_DATA_BYTES_WITH_HEADER" type="int" transient="false" volatile="false" value="134" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MAX_USER_DATA_SEPTETS" type="int" transient="false" volatile="false" value="160" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MAX_USER_DATA_SEPTETS_WITH_HEADER" type="int" transient="false" volatile="false" value="153" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="SmsMessage.MessageClass" extends="java.lang.Enum" abstract="false" static="true" final="true" deprecated="not deprecated" visibility="public" > <method name="valueOf" return="android.telephony.SmsMessage.MessageClass" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="name" type="java.lang.String"> </parameter> </method> <method name="values" return="android.telephony.SmsMessage.MessageClass[]" abstract="false" native="false" synchronized="false" static="true" final="true" deprecated="not deprecated" visibility="public" > </method> </class> <class name="SmsMessage.SubmitPdu" extends="java.lang.Object" abstract="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <field name="encodedMessage" type="byte[]" transient="false" volatile="false" value="null" static="false" final="false" deprecated="not deprecated" visibility="public" > </field> <field name="encodedScAddress" type="byte[]" transient="false" volatile="false" value="null" static="false" final="false" deprecated="not deprecated" visibility="public" > </field> </class> <class name="TelephonyManager" extends="java.lang.Object" abstract="false" telephony/java/android/telephony/SmsManager.java +12 −5 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ import java.util.List; /** * Manages SMS operations such as sending data, text, and pdu SMS messages. * Get this object by calling the static method SmsManager.getDefault(). * @hide */ public final class SmsManager { private static SmsManager sInstance; Loading Loading @@ -202,6 +201,8 @@ public final class SmsManager { /** * Send a raw SMS PDU. * A PDU is a protocol data unit. It contains the message and the * associated meta information. * * @param smsc the SMSC to send the message through, or NULL for the * default SMSC Loading @@ -219,8 +220,6 @@ public final class SmsManager { * @param deliveryIntent if not NULL this <code>PendingIntent</code> is * broadcast when the message is delivered to the recipient. The * raw pdu of the status report is in the extended data ("pdu"). * * @hide */ private void sendRawPdu(byte[] smsc, byte[] pdu, PendingIntent sentIntent, PendingIntent deliveryIntent) { Loading Loading @@ -252,6 +251,8 @@ public final class SmsManager { /** * Copy a raw SMS PDU to the ICC. * ICC (Integrated Circuit Card) is the card of the device. * For example, this can be the SIM or USIM for GSM. * * @param smsc the SMSC for this message, or NULL for the default SMSC * @param pdu the raw PDU to store Loading @@ -278,6 +279,8 @@ public final class SmsManager { /** * Delete the specified message from the ICC. * ICC (Integrated Circuit Card) is the card of the device. * For example, this can be the SIM or USIM for GSM. * * @param messageIndex is the record index of the message on ICC * @return true for success Loading @@ -304,6 +307,8 @@ public final class SmsManager { /** * Update the specified message on the ICC. * ICC (Integrated Circuit Card) is the card of the device. * For example, this can be the SIM or USIM for GSM. * * @param messageIndex record index of message to update * @param newStatus new message status (STATUS_ON_ICC_READ, Loading Loading @@ -331,6 +336,8 @@ public final class SmsManager { /** * Retrieves all messages currently stored on ICC. * ICC (Integrated Circuit Card) is the card of the device. * For example, this can be the SIM or USIM for GSM. * * @return <code>ArrayList</code> of <code>SmsMessage</code> objects * Loading Loading @@ -359,12 +366,12 @@ public final class SmsManager { * <code>getAllMessagesFromIcc</code> * @return <code>ArrayList</code> of <code>SmsMessage</code> objects. */ private ArrayList<SmsMessage> createMessageListFromRawRecords(List records) { private ArrayList<SmsMessage> createMessageListFromRawRecords(List<SmsRawData> records) { ArrayList<SmsMessage> messages = new ArrayList<SmsMessage>(); if (records != null) { int count = records.size(); for (int i = 0; i < count; i++) { SmsRawData data = (SmsRawData)records.get(i); SmsRawData data = records.get(i); // List contains all records, including "free" records (null) if (data != null) { SmsMessage sms = SmsMessage.createFromEfRecord(i+1, data.getBytes()); Loading telephony/java/android/telephony/SmsMessage.java +30 −39 Original line number Diff line number Diff line Loading @@ -28,13 +28,13 @@ import com.android.internal.telephony.SmsMessageBase.TextEncodingDetails; import java.lang.Math; import java.util.ArrayList; import java.util.Arrays; import static android.telephony.TelephonyManager.PHONE_TYPE_CDMA; /** * A Short Message Service message. * @hide */ public class SmsMessage { private static final boolean LOCAL_DEBUG = true; Loading @@ -49,18 +49,6 @@ public class SmsMessage { UNKNOWN, CLASS_0, CLASS_1, CLASS_2, CLASS_3; } /** * TODO(cleanup): given that we now have more than one possible * 7bit encoding, this result starts to look rather vague and * maybe confusing... If this is just an indication of code unit * size, maybe that is no problem. Otherwise, should we try to * create an aggregate collection of GSM and CDMA encodings? CDMA * contains a superset of the encodings we use (it does not * support 8-bit GSM, but we also do not use that encoding * currently)... We could get rid of these and directly reference * the CDMA encoding definitions... */ /** User data text encoding code unit size */ public static final int ENCODING_UNKNOWN = 0; public static final int ENCODING_7BIT = 1; Loading @@ -70,25 +58,10 @@ public class SmsMessage { /** The maximum number of payload bytes per message */ public static final int MAX_USER_DATA_BYTES = 140; /** * TODO(cleanup): It would be more flexible and less fragile to * rewrite this (meaning get rid of the following constant) such * that an actual UDH is taken into consideration (meaning its * length is measured), allowing for messages that actually * contain other UDH fields... Hence it is actually a shame to * extend the API with this constant. If necessary, maybe define * the size of such a header and let the math for calculating * max_octets/septets be done elsewhere. And, while I am griping, * if we use the word septet, we should use the word octet in * corresponding places, not byte... */ /** * The maximum number of payload bytes per message if a user data header * is present. This assumes the header only contains the * CONCATENATED_8_BIT_REFERENCE element. * * @hide pending API Council approval to extend the public API */ public static final int MAX_USER_DATA_BYTES_WITH_HEADER = 134; Loading @@ -103,17 +76,26 @@ public class SmsMessage { public static final int MAX_USER_DATA_SEPTETS_WITH_HEADER = 153; /** Contains actual SmsMessage. Only public for debugging and for framework layer. * {@hide} * * @hide */ public SmsMessageBase mWrappedSmsMessage; public static class SubmitPdu extends SubmitPduBase { public static class SubmitPdu { public byte[] encodedScAddress; // Null if not applicable. public byte[] encodedMessage; //Constructor public SubmitPdu() { public String toString() { return "SubmitPdu: encodedScAddress = " + Arrays.toString(encodedScAddress) + ", encodedMessage = " + Arrays.toString(encodedMessage); } /* {@hide} */ /** * @hide */ protected SubmitPdu(SubmitPduBase spb) { this.encodedMessage = spb.encodedMessage; this.encodedScAddress = spb.encodedScAddress; Loading @@ -121,7 +103,11 @@ public class SmsMessage { } // Constructor /** * Constructor * * @hide */ public SmsMessage() { this(getSmsFacility()); } Loading Loading @@ -295,6 +281,8 @@ public class SmsMessage { * @param text text, must not be null. * @return an <code>ArrayList</code> of strings that, in order, * comprise the original msg text * * @hide */ public static ArrayList<String> fragmentText(String text) { int activePhone = TelephonyManager.getDefault().getPhoneType(); Loading Loading @@ -343,10 +331,11 @@ public class SmsMessage { * current encoding. * * @param messageBody the message to encode * @param use7bitOnly if true, characters that are not part of the GSM * alphabet are counted as a single space char. If false, a * messageBody containing non-GSM alphabet characters is calculated * for 16-bit encoding. * @param use7bitOnly if true, characters that are not part of the radio * specific (GSM / CDMA) alphabet encoding are converted to as a * single space characters. If false, a messageBody containing * non-GSM or non-CDMA alphabet characters are encoded using * 16-bit encoding. * @return an int[4] with int[0] being the number of SMS's required, int[1] * the number of code units used, and int[2] is the number of code * units remaining until the next message. int[3] is the encoding Loading Loading @@ -688,6 +677,8 @@ public class SmsMessage { /** This method returns the reference to a specific * SmsMessage object, which is used for accessing its static methods. * @return Specific SmsMessage. * * @hide */ private static final SmsMessageBase getSmsFacility(){ int activePhone = TelephonyManager.getDefault().getPhoneType(); Loading telephony/java/android/telephony/gsm/SmsManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import java.util.ArrayList; return sInstance; } @Deprecated private SmsManager() { mSmsMgrProxy = android.telephony.SmsManager.getDefault(); } Loading telephony/java/com/android/internal/telephony/SmsMessageBase.java +1 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ public abstract class SmsMessageBase { public int codeUnitSize; } // TODO(): This class is duplicated in SmsMessage.java. Refactor accordingly. public static abstract class SubmitPduBase { public byte[] encodedScAddress; // Null if not applicable. public byte[] encodedMessage; Loading Loading
api/current.xml +753 −0 Original line number Diff line number Diff line Loading @@ -113269,6 +113269,759 @@ > </field> </class> <class name="SmsManager" extends="java.lang.Object" abstract="false" static="false" final="true" deprecated="not deprecated" visibility="public" > <method name="divideMessage" return="java.util.ArrayList<java.lang.String>" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> </method> <method name="getDefault" return="android.telephony.SmsManager" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="sendDataMessage" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="destinationAddress" type="java.lang.String"> </parameter> <parameter name="scAddress" type="java.lang.String"> </parameter> <parameter name="destinationPort" type="short"> </parameter> <parameter name="data" type="byte[]"> </parameter> <parameter name="sentIntent" type="android.app.PendingIntent"> </parameter> <parameter name="deliveryIntent" type="android.app.PendingIntent"> </parameter> </method> <method name="sendMultipartTextMessage" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="destinationAddress" type="java.lang.String"> </parameter> <parameter name="scAddress" type="java.lang.String"> </parameter> <parameter name="parts" type="java.util.ArrayList<java.lang.String>"> </parameter> <parameter name="sentIntents" type="java.util.ArrayList<android.app.PendingIntent>"> </parameter> <parameter name="deliveryIntents" type="java.util.ArrayList<android.app.PendingIntent>"> </parameter> </method> <method name="sendTextMessage" return="void" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <parameter name="destinationAddress" type="java.lang.String"> </parameter> <parameter name="scAddress" type="java.lang.String"> </parameter> <parameter name="text" type="java.lang.String"> </parameter> <parameter name="sentIntent" type="android.app.PendingIntent"> </parameter> <parameter name="deliveryIntent" type="android.app.PendingIntent"> </parameter> </method> <field name="RESULT_ERROR_GENERIC_FAILURE" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="RESULT_ERROR_NO_SERVICE" type="int" transient="false" volatile="false" value="4" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="RESULT_ERROR_NULL_PDU" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="RESULT_ERROR_RADIO_OFF" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="STATUS_ON_ICC_FREE" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="STATUS_ON_ICC_READ" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="STATUS_ON_ICC_SENT" type="int" transient="false" volatile="false" value="5" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="STATUS_ON_ICC_UNREAD" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="STATUS_ON_ICC_UNSENT" type="int" transient="false" volatile="false" value="7" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="SmsMessage" extends="java.lang.Object" abstract="false" static="false" final="false" deprecated="not deprecated" visibility="public" > <method name="calculateLength" return="int[]" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="msgBody" type="java.lang.CharSequence"> </parameter> <parameter name="use7bitOnly" type="boolean"> </parameter> </method> <method name="calculateLength" return="int[]" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="messageBody" type="java.lang.String"> </parameter> <parameter name="use7bitOnly" type="boolean"> </parameter> </method> <method name="createFromPdu" return="android.telephony.SmsMessage" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="pdu" type="byte[]"> </parameter> </method> <method name="fragmentText" return="java.util.ArrayList<java.lang.String>" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="text" type="java.lang.String"> </parameter> </method> <method name="getDisplayMessageBody" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getDisplayOriginatingAddress" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getEmailBody" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getEmailFrom" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getIndexOnIcc" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getIndexOnSim" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="deprecated" visibility="public" > </method> <method name="getMessageBody" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getMessageClass" return="android.telephony.SmsMessage.MessageClass" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getOriginatingAddress" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getPdu" return="byte[]" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getProtocolIdentifier" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getPseudoSubject" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getServiceCenterAddress" return="java.lang.String" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getStatus" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getStatusOnIcc" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getStatusOnSim" return="int" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="deprecated" visibility="public" > </method> <method name="getSubmitPdu" return="android.telephony.SmsMessage.SubmitPdu" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="scAddress" type="java.lang.String"> </parameter> <parameter name="destinationAddress" type="java.lang.String"> </parameter> <parameter name="message" type="java.lang.String"> </parameter> <parameter name="statusReportRequested" type="boolean"> </parameter> </method> <method name="getSubmitPdu" return="android.telephony.SmsMessage.SubmitPdu" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="scAddress" type="java.lang.String"> </parameter> <parameter name="destinationAddress" type="java.lang.String"> </parameter> <parameter name="destinationPort" type="short"> </parameter> <parameter name="data" type="byte[]"> </parameter> <parameter name="statusReportRequested" type="boolean"> </parameter> </method> <method name="getTPLayerLengthForPDU" return="int" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="pdu" type="java.lang.String"> </parameter> </method> <method name="getTimestampMillis" return="long" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="getUserData" return="byte[]" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isCphsMwiMessage" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isEmail" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isMWIClearMessage" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isMWISetMessage" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isMwiDontStore" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isReplace" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isReplyPathPresent" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <method name="isStatusReportMessage" return="boolean" abstract="false" native="false" synchronized="false" static="false" final="false" deprecated="not deprecated" visibility="public" > </method> <field name="ENCODING_16BIT" type="int" transient="false" volatile="false" value="3" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ENCODING_7BIT" type="int" transient="false" volatile="false" value="1" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ENCODING_8BIT" type="int" transient="false" volatile="false" value="2" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="ENCODING_UNKNOWN" type="int" transient="false" volatile="false" value="0" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MAX_USER_DATA_BYTES" type="int" transient="false" volatile="false" value="140" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MAX_USER_DATA_BYTES_WITH_HEADER" type="int" transient="false" volatile="false" value="134" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MAX_USER_DATA_SEPTETS" type="int" transient="false" volatile="false" value="160" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> <field name="MAX_USER_DATA_SEPTETS_WITH_HEADER" type="int" transient="false" volatile="false" value="153" static="true" final="true" deprecated="not deprecated" visibility="public" > </field> </class> <class name="SmsMessage.MessageClass" extends="java.lang.Enum" abstract="false" static="true" final="true" deprecated="not deprecated" visibility="public" > <method name="valueOf" return="android.telephony.SmsMessage.MessageClass" abstract="false" native="false" synchronized="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <parameter name="name" type="java.lang.String"> </parameter> </method> <method name="values" return="android.telephony.SmsMessage.MessageClass[]" abstract="false" native="false" synchronized="false" static="true" final="true" deprecated="not deprecated" visibility="public" > </method> </class> <class name="SmsMessage.SubmitPdu" extends="java.lang.Object" abstract="false" static="true" final="false" deprecated="not deprecated" visibility="public" > <field name="encodedMessage" type="byte[]" transient="false" volatile="false" value="null" static="false" final="false" deprecated="not deprecated" visibility="public" > </field> <field name="encodedScAddress" type="byte[]" transient="false" volatile="false" value="null" static="false" final="false" deprecated="not deprecated" visibility="public" > </field> </class> <class name="TelephonyManager" extends="java.lang.Object" abstract="false"
telephony/java/android/telephony/SmsManager.java +12 −5 Original line number Diff line number Diff line Loading @@ -40,7 +40,6 @@ import java.util.List; /** * Manages SMS operations such as sending data, text, and pdu SMS messages. * Get this object by calling the static method SmsManager.getDefault(). * @hide */ public final class SmsManager { private static SmsManager sInstance; Loading Loading @@ -202,6 +201,8 @@ public final class SmsManager { /** * Send a raw SMS PDU. * A PDU is a protocol data unit. It contains the message and the * associated meta information. * * @param smsc the SMSC to send the message through, or NULL for the * default SMSC Loading @@ -219,8 +220,6 @@ public final class SmsManager { * @param deliveryIntent if not NULL this <code>PendingIntent</code> is * broadcast when the message is delivered to the recipient. The * raw pdu of the status report is in the extended data ("pdu"). * * @hide */ private void sendRawPdu(byte[] smsc, byte[] pdu, PendingIntent sentIntent, PendingIntent deliveryIntent) { Loading Loading @@ -252,6 +251,8 @@ public final class SmsManager { /** * Copy a raw SMS PDU to the ICC. * ICC (Integrated Circuit Card) is the card of the device. * For example, this can be the SIM or USIM for GSM. * * @param smsc the SMSC for this message, or NULL for the default SMSC * @param pdu the raw PDU to store Loading @@ -278,6 +279,8 @@ public final class SmsManager { /** * Delete the specified message from the ICC. * ICC (Integrated Circuit Card) is the card of the device. * For example, this can be the SIM or USIM for GSM. * * @param messageIndex is the record index of the message on ICC * @return true for success Loading @@ -304,6 +307,8 @@ public final class SmsManager { /** * Update the specified message on the ICC. * ICC (Integrated Circuit Card) is the card of the device. * For example, this can be the SIM or USIM for GSM. * * @param messageIndex record index of message to update * @param newStatus new message status (STATUS_ON_ICC_READ, Loading Loading @@ -331,6 +336,8 @@ public final class SmsManager { /** * Retrieves all messages currently stored on ICC. * ICC (Integrated Circuit Card) is the card of the device. * For example, this can be the SIM or USIM for GSM. * * @return <code>ArrayList</code> of <code>SmsMessage</code> objects * Loading Loading @@ -359,12 +366,12 @@ public final class SmsManager { * <code>getAllMessagesFromIcc</code> * @return <code>ArrayList</code> of <code>SmsMessage</code> objects. */ private ArrayList<SmsMessage> createMessageListFromRawRecords(List records) { private ArrayList<SmsMessage> createMessageListFromRawRecords(List<SmsRawData> records) { ArrayList<SmsMessage> messages = new ArrayList<SmsMessage>(); if (records != null) { int count = records.size(); for (int i = 0; i < count; i++) { SmsRawData data = (SmsRawData)records.get(i); SmsRawData data = records.get(i); // List contains all records, including "free" records (null) if (data != null) { SmsMessage sms = SmsMessage.createFromEfRecord(i+1, data.getBytes()); Loading
telephony/java/android/telephony/SmsMessage.java +30 −39 Original line number Diff line number Diff line Loading @@ -28,13 +28,13 @@ import com.android.internal.telephony.SmsMessageBase.TextEncodingDetails; import java.lang.Math; import java.util.ArrayList; import java.util.Arrays; import static android.telephony.TelephonyManager.PHONE_TYPE_CDMA; /** * A Short Message Service message. * @hide */ public class SmsMessage { private static final boolean LOCAL_DEBUG = true; Loading @@ -49,18 +49,6 @@ public class SmsMessage { UNKNOWN, CLASS_0, CLASS_1, CLASS_2, CLASS_3; } /** * TODO(cleanup): given that we now have more than one possible * 7bit encoding, this result starts to look rather vague and * maybe confusing... If this is just an indication of code unit * size, maybe that is no problem. Otherwise, should we try to * create an aggregate collection of GSM and CDMA encodings? CDMA * contains a superset of the encodings we use (it does not * support 8-bit GSM, but we also do not use that encoding * currently)... We could get rid of these and directly reference * the CDMA encoding definitions... */ /** User data text encoding code unit size */ public static final int ENCODING_UNKNOWN = 0; public static final int ENCODING_7BIT = 1; Loading @@ -70,25 +58,10 @@ public class SmsMessage { /** The maximum number of payload bytes per message */ public static final int MAX_USER_DATA_BYTES = 140; /** * TODO(cleanup): It would be more flexible and less fragile to * rewrite this (meaning get rid of the following constant) such * that an actual UDH is taken into consideration (meaning its * length is measured), allowing for messages that actually * contain other UDH fields... Hence it is actually a shame to * extend the API with this constant. If necessary, maybe define * the size of such a header and let the math for calculating * max_octets/septets be done elsewhere. And, while I am griping, * if we use the word septet, we should use the word octet in * corresponding places, not byte... */ /** * The maximum number of payload bytes per message if a user data header * is present. This assumes the header only contains the * CONCATENATED_8_BIT_REFERENCE element. * * @hide pending API Council approval to extend the public API */ public static final int MAX_USER_DATA_BYTES_WITH_HEADER = 134; Loading @@ -103,17 +76,26 @@ public class SmsMessage { public static final int MAX_USER_DATA_SEPTETS_WITH_HEADER = 153; /** Contains actual SmsMessage. Only public for debugging and for framework layer. * {@hide} * * @hide */ public SmsMessageBase mWrappedSmsMessage; public static class SubmitPdu extends SubmitPduBase { public static class SubmitPdu { public byte[] encodedScAddress; // Null if not applicable. public byte[] encodedMessage; //Constructor public SubmitPdu() { public String toString() { return "SubmitPdu: encodedScAddress = " + Arrays.toString(encodedScAddress) + ", encodedMessage = " + Arrays.toString(encodedMessage); } /* {@hide} */ /** * @hide */ protected SubmitPdu(SubmitPduBase spb) { this.encodedMessage = spb.encodedMessage; this.encodedScAddress = spb.encodedScAddress; Loading @@ -121,7 +103,11 @@ public class SmsMessage { } // Constructor /** * Constructor * * @hide */ public SmsMessage() { this(getSmsFacility()); } Loading Loading @@ -295,6 +281,8 @@ public class SmsMessage { * @param text text, must not be null. * @return an <code>ArrayList</code> of strings that, in order, * comprise the original msg text * * @hide */ public static ArrayList<String> fragmentText(String text) { int activePhone = TelephonyManager.getDefault().getPhoneType(); Loading Loading @@ -343,10 +331,11 @@ public class SmsMessage { * current encoding. * * @param messageBody the message to encode * @param use7bitOnly if true, characters that are not part of the GSM * alphabet are counted as a single space char. If false, a * messageBody containing non-GSM alphabet characters is calculated * for 16-bit encoding. * @param use7bitOnly if true, characters that are not part of the radio * specific (GSM / CDMA) alphabet encoding are converted to as a * single space characters. If false, a messageBody containing * non-GSM or non-CDMA alphabet characters are encoded using * 16-bit encoding. * @return an int[4] with int[0] being the number of SMS's required, int[1] * the number of code units used, and int[2] is the number of code * units remaining until the next message. int[3] is the encoding Loading Loading @@ -688,6 +677,8 @@ public class SmsMessage { /** This method returns the reference to a specific * SmsMessage object, which is used for accessing its static methods. * @return Specific SmsMessage. * * @hide */ private static final SmsMessageBase getSmsFacility(){ int activePhone = TelephonyManager.getDefault().getPhoneType(); Loading
telephony/java/android/telephony/gsm/SmsManager.java +1 −0 Original line number Diff line number Diff line Loading @@ -43,6 +43,7 @@ import java.util.ArrayList; return sInstance; } @Deprecated private SmsManager() { mSmsMgrProxy = android.telephony.SmsManager.getDefault(); } Loading
telephony/java/com/android/internal/telephony/SmsMessageBase.java +1 −0 Original line number Diff line number Diff line Loading @@ -118,6 +118,7 @@ public abstract class SmsMessageBase { public int codeUnitSize; } // TODO(): This class is duplicated in SmsMessage.java. Refactor accordingly. public static abstract class SubmitPduBase { public byte[] encodedScAddress; // Null if not applicable. public byte[] encodedMessage; Loading