Merge "Fix annotations in ImsSmsImplBase"
am: 90f4c2abe4
Change-Id: I81e572a926e92d75d83fbf3b169772635c733c15
This commit is contained in:
@@ -9446,17 +9446,17 @@ package android.telephony.ims.stub {
|
|||||||
|
|
||||||
public class ImsSmsImplBase {
|
public class ImsSmsImplBase {
|
||||||
ctor public ImsSmsImplBase();
|
ctor public ImsSmsImplBase();
|
||||||
method public void acknowledgeSms(int, int, int);
|
method public void acknowledgeSms(int, @IntRange(from=0, to=65535) int, int);
|
||||||
method public void acknowledgeSmsReport(int, int, int);
|
method public void acknowledgeSmsReport(int, @IntRange(from=0, to=65535) int, int);
|
||||||
method public String getSmsFormat();
|
method public String getSmsFormat();
|
||||||
method public void onReady();
|
method public void onReady();
|
||||||
method @Deprecated public final void onSendSmsResult(int, int, int, int) throws java.lang.RuntimeException;
|
method @Deprecated public final void onSendSmsResult(int, @IntRange(from=0, to=65535) int, int, int) throws java.lang.RuntimeException;
|
||||||
method public final void onSendSmsResultError(int, int, int, int, int) throws java.lang.RuntimeException;
|
method public final void onSendSmsResultError(int, @IntRange(from=0, to=65535) int, int, int, int) throws java.lang.RuntimeException;
|
||||||
method public final void onSendSmsResultSuccess(int, int) throws java.lang.RuntimeException;
|
method public final void onSendSmsResultSuccess(int, @IntRange(from=0, to=65535) int) throws java.lang.RuntimeException;
|
||||||
method public final void onSmsReceived(int, String, byte[]) throws java.lang.RuntimeException;
|
method public final void onSmsReceived(int, String, byte[]) throws java.lang.RuntimeException;
|
||||||
method @Deprecated public final void onSmsStatusReportReceived(int, int, String, byte[]) throws java.lang.RuntimeException;
|
method @Deprecated public final void onSmsStatusReportReceived(int, @IntRange(from=0, to=65535) int, String, byte[]) throws java.lang.RuntimeException;
|
||||||
method public final void onSmsStatusReportReceived(int, String, byte[]) throws java.lang.RuntimeException;
|
method public final void onSmsStatusReportReceived(int, String, byte[]) throws java.lang.RuntimeException;
|
||||||
method public void sendSms(int, int, String, String, boolean, byte[]);
|
method public void sendSms(int, @IntRange(from=0, to=65535) int, String, String, boolean, byte[]);
|
||||||
field public static final int DELIVER_STATUS_ERROR_GENERIC = 2; // 0x2
|
field public static final int DELIVER_STATUS_ERROR_GENERIC = 2; // 0x2
|
||||||
field public static final int DELIVER_STATUS_ERROR_NO_MEMORY = 3; // 0x3
|
field public static final int DELIVER_STATUS_ERROR_NO_MEMORY = 3; // 0x3
|
||||||
field public static final int DELIVER_STATUS_ERROR_REQUEST_NOT_SUPPORTED = 4; // 0x4
|
field public static final int DELIVER_STATUS_ERROR_REQUEST_NOT_SUPPORTED = 4; // 0x4
|
||||||
|
|||||||
@@ -2021,6 +2021,36 @@ public final class SmsManager {
|
|||||||
|
|
||||||
// SMS send failure result codes
|
// SMS send failure result codes
|
||||||
|
|
||||||
|
/** @hide */
|
||||||
|
@IntDef(prefix = { "RESULT" }, value = {
|
||||||
|
RESULT_ERROR_NONE,
|
||||||
|
RESULT_ERROR_GENERIC_FAILURE,
|
||||||
|
RESULT_ERROR_RADIO_OFF,
|
||||||
|
RESULT_ERROR_NULL_PDU,
|
||||||
|
RESULT_ERROR_NO_SERVICE,
|
||||||
|
RESULT_ERROR_LIMIT_EXCEEDED,
|
||||||
|
RESULT_ERROR_FDN_CHECK_FAILURE,
|
||||||
|
RESULT_ERROR_SHORT_CODE_NOT_ALLOWED,
|
||||||
|
RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED,
|
||||||
|
RESULT_RADIO_NOT_AVAILABLE,
|
||||||
|
RESULT_NETWORK_REJECT,
|
||||||
|
RESULT_INVALID_ARGUMENTS,
|
||||||
|
RESULT_INVALID_STATE,
|
||||||
|
RESULT_NO_MEMORY,
|
||||||
|
RESULT_INVALID_SMS_FORMAT,
|
||||||
|
RESULT_SYSTEM_ERROR,
|
||||||
|
RESULT_MODEM_ERROR,
|
||||||
|
RESULT_NETWORK_ERROR,
|
||||||
|
RESULT_INVALID_SMSC_ADDRESS,
|
||||||
|
RESULT_OPERATION_NOT_ALLOWED,
|
||||||
|
RESULT_INTERNAL_ERROR,
|
||||||
|
RESULT_NO_RESOURCES,
|
||||||
|
RESULT_CANCELLED,
|
||||||
|
RESULT_REQUEST_NOT_SUPPORTED
|
||||||
|
})
|
||||||
|
@Retention(RetentionPolicy.SOURCE)
|
||||||
|
public @interface Result {}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* No error.
|
* No error.
|
||||||
* @hide
|
* @hide
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
package android.telephony.ims.stub;
|
package android.telephony.ims.stub;
|
||||||
|
|
||||||
import android.annotation.IntDef;
|
import android.annotation.IntDef;
|
||||||
|
import android.annotation.IntRange;
|
||||||
import android.annotation.SystemApi;
|
import android.annotation.SystemApi;
|
||||||
import android.os.RemoteException;
|
import android.os.RemoteException;
|
||||||
import android.telephony.SmsManager;
|
import android.telephony.SmsManager;
|
||||||
@@ -148,14 +149,16 @@ public class ImsSmsImplBase {
|
|||||||
*
|
*
|
||||||
* @param token unique token generated by the platform that should be used when triggering
|
* @param token unique token generated by the platform that should be used when triggering
|
||||||
* callbacks for this specific message.
|
* callbacks for this specific message.
|
||||||
* @param messageRef the message reference.
|
* @param messageRef the message reference, which may be 1 byte if it is in
|
||||||
* @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
|
* {@link SmsMessage#FORMAT_3GPP} format (see TS.123.040) or 2 bytes if it is in
|
||||||
* {@link SmsMessage#FORMAT_3GPP2}.
|
* {@link SmsMessage#FORMAT_3GPP2} format (see 3GPP2 C.S0015-B).
|
||||||
|
* @param format the format of the message.
|
||||||
* @param smsc the Short Message Service Center address.
|
* @param smsc the Short Message Service Center address.
|
||||||
* @param isRetry whether it is a retry of an already attempted message or not.
|
* @param isRetry whether it is a retry of an already attempted message or not.
|
||||||
* @param pdu PDU representing the contents of the message.
|
* @param pdu PDU representing the contents of the message.
|
||||||
*/
|
*/
|
||||||
public void sendSms(int token, int messageRef, String format, String smsc, boolean isRetry,
|
public void sendSms(int token, @IntRange(from = 0, to = 65535) int messageRef,
|
||||||
|
@SmsMessage.Format String format, String smsc, boolean isRetry,
|
||||||
byte[] pdu) {
|
byte[] pdu) {
|
||||||
// Base implementation returns error. Should be overridden.
|
// Base implementation returns error. Should be overridden.
|
||||||
try {
|
try {
|
||||||
@@ -172,14 +175,13 @@ public class ImsSmsImplBase {
|
|||||||
* provider.
|
* provider.
|
||||||
*
|
*
|
||||||
* @param token token provided in {@link #onSmsReceived(int, String, byte[])}
|
* @param token token provided in {@link #onSmsReceived(int, String, byte[])}
|
||||||
* @param messageRef the message reference
|
* @param messageRef the message reference, which may be 1 byte if it is in
|
||||||
* @param result result of delivering the message. Valid values are:
|
* {@link SmsMessage#FORMAT_3GPP} format (see TS.123.040) or 2 bytes if it is in
|
||||||
* {@link #DELIVER_STATUS_OK},
|
* {@link SmsMessage#FORMAT_3GPP2} format (see 3GPP2 C.S0015-B).
|
||||||
* {@link #DELIVER_STATUS_ERROR_GENERIC},
|
* @param result result of delivering the message.
|
||||||
* {@link #DELIVER_STATUS_ERROR_NO_MEMORY},
|
|
||||||
* {@link #DELIVER_STATUS_ERROR_REQUEST_NOT_SUPPORTED}
|
|
||||||
*/
|
*/
|
||||||
public void acknowledgeSms(int token, int messageRef, @DeliverStatusResult int result) {
|
public void acknowledgeSms(int token, @IntRange(from = 0, to = 65535) int messageRef,
|
||||||
|
@DeliverStatusResult int result) {
|
||||||
Log.e(LOG_TAG, "acknowledgeSms() not implemented.");
|
Log.e(LOG_TAG, "acknowledgeSms() not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -191,12 +193,13 @@ public class ImsSmsImplBase {
|
|||||||
*
|
*
|
||||||
* @param token token provided in {@link #onSmsStatusReportReceived(int, int, String, byte[])}
|
* @param token token provided in {@link #onSmsStatusReportReceived(int, int, String, byte[])}
|
||||||
* or {@link #onSmsStatusReportReceived(int, String, byte[])}
|
* or {@link #onSmsStatusReportReceived(int, String, byte[])}
|
||||||
* @param messageRef the message reference
|
* @param messageRef the message reference, which may be 1 byte if it is in
|
||||||
* @param result result of delivering the message. Valid values are:
|
* {@link SmsMessage#FORMAT_3GPP} format (see TS.123.040) or 2 bytes if it is in
|
||||||
* {@link #STATUS_REPORT_STATUS_OK},
|
* {@link SmsMessage#FORMAT_3GPP2} format (see 3GPP2 C.S0015-B).
|
||||||
* {@link #STATUS_REPORT_STATUS_ERROR}
|
* @param result result of delivering the message.
|
||||||
*/
|
*/
|
||||||
public void acknowledgeSmsReport(int token, int messageRef, @StatusReportResult int result) {
|
public void acknowledgeSmsReport(int token, @IntRange(from = 0, to = 65535) int messageRef,
|
||||||
|
@StatusReportResult int result) {
|
||||||
Log.e(LOG_TAG, "acknowledgeSmsReport() not implemented.");
|
Log.e(LOG_TAG, "acknowledgeSmsReport() not implemented.");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -210,12 +213,12 @@ public class ImsSmsImplBase {
|
|||||||
* {@link #DELIVER_STATUS_ERROR_GENERIC} result code.
|
* {@link #DELIVER_STATUS_ERROR_GENERIC} result code.
|
||||||
* @param token unique token generated by IMS providers that the platform will use to trigger
|
* @param token unique token generated by IMS providers that the platform will use to trigger
|
||||||
* callbacks for this message.
|
* callbacks for this message.
|
||||||
* @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
|
* @param format the format of the message.
|
||||||
* {@link SmsMessage#FORMAT_3GPP2}.
|
|
||||||
* @param pdu PDU representing the contents of the message.
|
* @param pdu PDU representing the contents of the message.
|
||||||
* @throws RuntimeException if called before {@link #onReady()} is triggered.
|
* @throws RuntimeException if called before {@link #onReady()} is triggered.
|
||||||
*/
|
*/
|
||||||
public final void onSmsReceived(int token, String format, byte[] pdu) throws RuntimeException {
|
public final void onSmsReceived(int token, @SmsMessage.Format String format, byte[] pdu)
|
||||||
|
throws RuntimeException {
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
if (mListener == null) {
|
if (mListener == null) {
|
||||||
throw new RuntimeException("Feature not ready.");
|
throw new RuntimeException("Feature not ready.");
|
||||||
@@ -241,13 +244,16 @@ public class ImsSmsImplBase {
|
|||||||
* sent successfully.
|
* sent successfully.
|
||||||
*
|
*
|
||||||
* @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
|
* @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
|
||||||
* @param messageRef the message reference. Should be between 0 and 255 per TS.123.040
|
* @param messageRef the message reference, which may be 1 byte if it is in
|
||||||
|
* {@link SmsMessage#FORMAT_3GPP} format (see TS.123.040) or 2 bytes if it is in
|
||||||
|
* {@link SmsMessage#FORMAT_3GPP2} format (see 3GPP2 C.S0015-B).
|
||||||
*
|
*
|
||||||
* @throws RuntimeException if called before {@link #onReady()} is triggered or if the
|
* @throws RuntimeException if called before {@link #onReady()} is triggered or if the
|
||||||
* connection to the framework is not available. If this happens attempting to send the SMS
|
* connection to the framework is not available. If this happens attempting to send the SMS
|
||||||
* should be aborted.
|
* should be aborted.
|
||||||
*/
|
*/
|
||||||
public final void onSendSmsResultSuccess(int token, int messageRef) throws RuntimeException {
|
public final void onSendSmsResultSuccess(int token,
|
||||||
|
@IntRange(from = 0, to = 65535) int messageRef) throws RuntimeException {
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
if (mListener == null) {
|
if (mListener == null) {
|
||||||
throw new RuntimeException("Feature not ready.");
|
throw new RuntimeException("Feature not ready.");
|
||||||
@@ -266,34 +272,11 @@ public class ImsSmsImplBase {
|
|||||||
* to the platform.
|
* to the platform.
|
||||||
*
|
*
|
||||||
* @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
|
* @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
|
||||||
* @param messageRef the message reference. Should be between 0 and 255 per TS.123.040
|
* @param messageRef the message reference, which may be 1 byte if it is in
|
||||||
|
* {@link SmsMessage#FORMAT_3GPP} format (see TS.123.040) or 2 bytes if it is in
|
||||||
|
* {@link SmsMessage#FORMAT_3GPP2} format (see 3GPP2 C.S0015-B).
|
||||||
* @param status result of sending the SMS.
|
* @param status result of sending the SMS.
|
||||||
* @param reason reason in case status is failure. Valid values are:
|
* @param reason reason in case status is failure.
|
||||||
* {@link SmsManager#RESULT_ERROR_NONE},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_GENERIC_FAILURE},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_RADIO_OFF},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_NULL_PDU},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_NO_SERVICE},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_LIMIT_EXCEEDED},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_FDN_CHECK_FAILURE},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_SHORT_CODE_NOT_ALLOWED},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED},
|
|
||||||
* {@link SmsManager#RESULT_RADIO_NOT_AVAILABLE},
|
|
||||||
* {@link SmsManager#RESULT_NETWORK_REJECT},
|
|
||||||
* {@link SmsManager#RESULT_INVALID_ARGUMENTS},
|
|
||||||
* {@link SmsManager#RESULT_INVALID_STATE},
|
|
||||||
* {@link SmsManager#RESULT_NO_MEMORY},
|
|
||||||
* {@link SmsManager#RESULT_INVALID_SMS_FORMAT},
|
|
||||||
* {@link SmsManager#RESULT_SYSTEM_ERROR},
|
|
||||||
* {@link SmsManager#RESULT_MODEM_ERROR},
|
|
||||||
* {@link SmsManager#RESULT_NETWORK_ERROR},
|
|
||||||
* {@link SmsManager#RESULT_ENCODING_ERROR},
|
|
||||||
* {@link SmsManager#RESULT_INVALID_SMSC_ADDRESS},
|
|
||||||
* {@link SmsManager#RESULT_OPERATION_NOT_ALLOWED},
|
|
||||||
* {@link SmsManager#RESULT_INTERNAL_ERROR},
|
|
||||||
* {@link SmsManager#RESULT_NO_RESOURCES},
|
|
||||||
* {@link SmsManager#RESULT_CANCELLED},
|
|
||||||
* {@link SmsManager#RESULT_REQUEST_NOT_SUPPORTED}
|
|
||||||
*
|
*
|
||||||
* @throws RuntimeException if called before {@link #onReady()} is triggered or if the
|
* @throws RuntimeException if called before {@link #onReady()} is triggered or if the
|
||||||
* connection to the framework is not available. If this happens attempting to send the SMS
|
* connection to the framework is not available. If this happens attempting to send the SMS
|
||||||
@@ -303,8 +286,8 @@ public class ImsSmsImplBase {
|
|||||||
* send result.
|
* send result.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public final void onSendSmsResult(int token, int messageRef, @SendStatusResult int status,
|
public final void onSendSmsResult(int token, @IntRange(from = 0, to = 65535) int messageRef,
|
||||||
int reason) throws RuntimeException {
|
@SendStatusResult int status, @SmsManager.Result int reason) throws RuntimeException {
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
if (mListener == null) {
|
if (mListener == null) {
|
||||||
throw new RuntimeException("Feature not ready.");
|
throw new RuntimeException("Feature not ready.");
|
||||||
@@ -324,34 +307,10 @@ public class ImsSmsImplBase {
|
|||||||
* network.
|
* network.
|
||||||
*
|
*
|
||||||
* @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
|
* @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
|
||||||
* @param messageRef the message reference. Should be between 0 and 255 per TS.123.040
|
* @param messageRef the message reference, which may be 1 byte if it is in
|
||||||
|
* {@link SmsMessage#FORMAT_3GPP} format (see TS.123.040) or 2 bytes if it is in
|
||||||
|
* {@link SmsMessage#FORMAT_3GPP2} format (see 3GPP2 C.S0015-B).
|
||||||
* @param status result of sending the SMS.
|
* @param status result of sending the SMS.
|
||||||
* @param reason Valid values are:
|
|
||||||
* {@link SmsManager#RESULT_ERROR_NONE},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_GENERIC_FAILURE},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_RADIO_OFF},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_NULL_PDU},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_NO_SERVICE},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_LIMIT_EXCEEDED},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_FDN_CHECK_FAILURE},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_SHORT_CODE_NOT_ALLOWED},
|
|
||||||
* {@link SmsManager#RESULT_ERROR_SHORT_CODE_NEVER_ALLOWED},
|
|
||||||
* {@link SmsManager#RESULT_RADIO_NOT_AVAILABLE},
|
|
||||||
* {@link SmsManager#RESULT_NETWORK_REJECT},
|
|
||||||
* {@link SmsManager#RESULT_INVALID_ARGUMENTS},
|
|
||||||
* {@link SmsManager#RESULT_INVALID_STATE},
|
|
||||||
* {@link SmsManager#RESULT_NO_MEMORY},
|
|
||||||
* {@link SmsManager#RESULT_INVALID_SMS_FORMAT},
|
|
||||||
* {@link SmsManager#RESULT_SYSTEM_ERROR},
|
|
||||||
* {@link SmsManager#RESULT_MODEM_ERROR},
|
|
||||||
* {@link SmsManager#RESULT_NETWORK_ERROR},
|
|
||||||
* {@link SmsManager#RESULT_ENCODING_ERROR},
|
|
||||||
* {@link SmsManager#RESULT_INVALID_SMSC_ADDRESS},
|
|
||||||
* {@link SmsManager#RESULT_OPERATION_NOT_ALLOWED},
|
|
||||||
* {@link SmsManager#RESULT_INTERNAL_ERROR},
|
|
||||||
* {@link SmsManager#RESULT_NO_RESOURCES},
|
|
||||||
* {@link SmsManager#RESULT_CANCELLED},
|
|
||||||
* {@link SmsManager#RESULT_REQUEST_NOT_SUPPORTED}
|
|
||||||
* @param networkErrorCode the error code reported by the carrier network if sending this SMS
|
* @param networkErrorCode the error code reported by the carrier network if sending this SMS
|
||||||
* has resulted in an error or {@link #RESULT_NO_NETWORK_ERROR} if no network error was
|
* has resulted in an error or {@link #RESULT_NO_NETWORK_ERROR} if no network error was
|
||||||
* generated. See 3GPP TS 24.011 Section 7.3.4 for valid error codes and more information.
|
* generated. See 3GPP TS 24.011 Section 7.3.4 for valid error codes and more information.
|
||||||
@@ -360,9 +319,9 @@ public class ImsSmsImplBase {
|
|||||||
* connection to the framework is not available. If this happens attempting to send the SMS
|
* connection to the framework is not available. If this happens attempting to send the SMS
|
||||||
* should be aborted.
|
* should be aborted.
|
||||||
*/
|
*/
|
||||||
public final void onSendSmsResultError(int token, int messageRef, @SendStatusResult int status,
|
public final void onSendSmsResultError(int token,
|
||||||
int reason, int networkErrorCode)
|
@IntRange(from = 0, to = 65535) int messageRef, @SendStatusResult int status,
|
||||||
throws RuntimeException {
|
@SmsManager.Result int reason, int networkErrorCode) throws RuntimeException {
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
if (mListener == null) {
|
if (mListener == null) {
|
||||||
throw new RuntimeException("Feature not ready.");
|
throw new RuntimeException("Feature not ready.");
|
||||||
@@ -384,9 +343,10 @@ public class ImsSmsImplBase {
|
|||||||
* the platform is not available, {@link #acknowledgeSmsReport(int, int, int)} will be called
|
* the platform is not available, {@link #acknowledgeSmsReport(int, int, int)} will be called
|
||||||
* with the {@link #STATUS_REPORT_STATUS_ERROR} result code.
|
* with the {@link #STATUS_REPORT_STATUS_ERROR} result code.
|
||||||
* @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
|
* @param token token provided in {@link #sendSms(int, int, String, String, boolean, byte[])}
|
||||||
* @param messageRef the message reference.
|
* @param messageRef the message reference, which may be 1 byte if it is in
|
||||||
* @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
|
* {@link SmsMessage#FORMAT_3GPP} format or 2 bytes if it is in
|
||||||
* {@link SmsMessage#FORMAT_3GPP2}.
|
* {@link SmsMessage#FORMAT_3GPP2} format (see 3GPP2 C.S0015-B).
|
||||||
|
* @param format the format of the message.
|
||||||
* @param pdu PDU representing the content of the status report.
|
* @param pdu PDU representing the content of the status report.
|
||||||
* @throws RuntimeException if called before {@link #onReady()} is triggered
|
* @throws RuntimeException if called before {@link #onReady()} is triggered
|
||||||
*
|
*
|
||||||
@@ -394,7 +354,8 @@ public class ImsSmsImplBase {
|
|||||||
* message reference.
|
* message reference.
|
||||||
*/
|
*/
|
||||||
@Deprecated
|
@Deprecated
|
||||||
public final void onSmsStatusReportReceived(int token, int messageRef, String format,
|
public final void onSmsStatusReportReceived(int token,
|
||||||
|
@IntRange(from = 0, to = 65535) int messageRef, @SmsMessage.Format String format,
|
||||||
byte[] pdu) throws RuntimeException {
|
byte[] pdu) throws RuntimeException {
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
if (mListener == null) {
|
if (mListener == null) {
|
||||||
@@ -419,13 +380,12 @@ public class ImsSmsImplBase {
|
|||||||
* with the {@link #STATUS_REPORT_STATUS_ERROR} result code.
|
* with the {@link #STATUS_REPORT_STATUS_ERROR} result code.
|
||||||
* @param token unique token generated by IMS providers that the platform will use to trigger
|
* @param token unique token generated by IMS providers that the platform will use to trigger
|
||||||
* callbacks for this message.
|
* callbacks for this message.
|
||||||
* @param format the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
|
* @param format the format of the message.
|
||||||
* {@link SmsMessage#FORMAT_3GPP2}.
|
|
||||||
* @param pdu PDU representing the content of the status report.
|
* @param pdu PDU representing the content of the status report.
|
||||||
* @throws RuntimeException if called before {@link #onReady()} is triggered
|
* @throws RuntimeException if called before {@link #onReady()} is triggered
|
||||||
*/
|
*/
|
||||||
public final void onSmsStatusReportReceived(int token, String format, byte[] pdu)
|
public final void onSmsStatusReportReceived(int token, @SmsMessage.Format String format,
|
||||||
throws RuntimeException {
|
byte[] pdu) throws RuntimeException {
|
||||||
synchronized (mLock) {
|
synchronized (mLock) {
|
||||||
if (mListener == null) {
|
if (mListener == null) {
|
||||||
throw new RuntimeException("Feature not ready.");
|
throw new RuntimeException("Feature not ready.");
|
||||||
@@ -450,13 +410,11 @@ public class ImsSmsImplBase {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the SMS format. Default is {@link SmsMessage#FORMAT_3GPP} unless overridden by IMS
|
* Returns the SMS format that the ImsService expects.
|
||||||
* Provider.
|
|
||||||
*
|
*
|
||||||
* @return the format of the message. Valid values are {@link SmsMessage#FORMAT_3GPP} and
|
* @return The expected format of the SMS messages.
|
||||||
* {@link SmsMessage#FORMAT_3GPP2}.
|
|
||||||
*/
|
*/
|
||||||
public String getSmsFormat() {
|
public @SmsMessage.Format String getSmsFormat() {
|
||||||
return SmsMessage.FORMAT_3GPP;
|
return SmsMessage.FORMAT_3GPP;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user