Merge "Acknowledge IMS with TPDU with the received Data Coding Scheme, Protocol Identifier and response bytes."
This commit is contained in:
committed by
Android (Google) Code Review
commit
8e718a5bb0
@@ -15912,6 +15912,7 @@ package android.telephony.ims.stub {
|
||||
public class ImsSmsImplBase {
|
||||
ctor public ImsSmsImplBase();
|
||||
method public void acknowledgeSms(int, @IntRange(from=0, to=65535) int, int);
|
||||
method public void acknowledgeSms(int, @IntRange(from=0, to=65535) int, int, @NonNull byte[]);
|
||||
method public void acknowledgeSmsReport(int, @IntRange(from=0, to=65535) int, int);
|
||||
method public String getSmsFormat();
|
||||
method public void onReady();
|
||||
|
||||
@@ -65,6 +65,7 @@ interface IImsMmTelFeature {
|
||||
oneway void sendSms(in int token, int messageRef, String format, String smsc, boolean retry,
|
||||
in byte[] pdu);
|
||||
oneway void acknowledgeSms(int token, int messageRef, int result);
|
||||
oneway void acknowledgeSmsWithPdu(int token, int messageRef, int result, in byte[] pdu);
|
||||
oneway void acknowledgeSmsReport(int token, int messageRef, int result);
|
||||
String getSmsFormat();
|
||||
oneway void onSmsReady();
|
||||
|
||||
@@ -274,6 +274,12 @@ public class MmTelFeature extends ImsFeature {
|
||||
.acknowledgeSms(token, messageRef, result), "acknowledgeSms");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void acknowledgeSmsWithPdu(int token, int messageRef, int result, byte[] pdu) {
|
||||
executeMethodAsyncNoException(() -> MmTelFeature.this
|
||||
.acknowledgeSms(token, messageRef, result, pdu), "acknowledgeSms");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void acknowledgeSmsReport(int token, int messageRef, int result) {
|
||||
executeMethodAsyncNoException(() -> MmTelFeature.this
|
||||
@@ -1087,6 +1093,11 @@ public class MmTelFeature extends ImsFeature {
|
||||
getSmsImplementation().acknowledgeSms(token, messageRef, result);
|
||||
}
|
||||
|
||||
private void acknowledgeSms(int token, int messageRef,
|
||||
@ImsSmsImplBase.DeliverStatusResult int result, byte[] pdu) {
|
||||
getSmsImplementation().acknowledgeSms(token, messageRef, result, pdu);
|
||||
}
|
||||
|
||||
private void acknowledgeSmsReport(int token, int messageRef,
|
||||
@ImsSmsImplBase.StatusReportResult int result) {
|
||||
getSmsImplementation().acknowledgeSmsReport(token, messageRef, result);
|
||||
|
||||
@@ -18,6 +18,7 @@ package android.telephony.ims.stub;
|
||||
|
||||
import android.annotation.IntDef;
|
||||
import android.annotation.IntRange;
|
||||
import android.annotation.NonNull;
|
||||
import android.annotation.SystemApi;
|
||||
import android.os.RemoteException;
|
||||
import android.telephony.SmsManager;
|
||||
@@ -174,6 +175,9 @@ public class ImsSmsImplBase {
|
||||
* {@link #onSmsReceived(int, String, byte[])} has been called to deliver the result to the IMS
|
||||
* provider.
|
||||
*
|
||||
* If the framework needs to provide the PDU used to acknowledge the SMS,
|
||||
* {@link #acknowledgeSms(int, int, int, byte[])} will be called.
|
||||
*
|
||||
* @param token token provided in {@link #onSmsReceived(int, String, byte[])}
|
||||
* @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
|
||||
@@ -185,6 +189,27 @@ public class ImsSmsImplBase {
|
||||
Log.e(LOG_TAG, "acknowledgeSms() not implemented.");
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be called by the platform after
|
||||
* {@link #onSmsReceived(int, String, byte[])} has been called to acknowledge an incoming SMS.
|
||||
*
|
||||
* This method is only called in cases where the framework needs to provide the PDU such as the
|
||||
* case where we provide the Short Message Transfer Layer PDU (see 3GPP TS 23.040). Otherwise,
|
||||
* {@link #acknowledgeSms(int, int, int)} will be used.
|
||||
*
|
||||
* @param token token provided in {@link #onSmsReceived(int, String, byte[])}
|
||||
* @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 result result of delivering the message.
|
||||
* @param pdu PDU representing the contents of the message.
|
||||
*/
|
||||
public void acknowledgeSms(int token, @IntRange(from = 0, to = 65535) int messageRef,
|
||||
@DeliverStatusResult int result, @NonNull byte[] pdu) {
|
||||
Log.e(LOG_TAG, "acknowledgeSms() not implemented. acknowledgeSms(int, int, int) called.");
|
||||
acknowledgeSms(token, messageRef, result);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be triggered by the platform after
|
||||
* {@link #onSmsStatusReportReceived(int, int, String, byte[])} or
|
||||
|
||||
Reference in New Issue
Block a user