Send Sms Memory Availability notification to ImsService
- Send Memory Availability notification to Ims SMS Service - Add onMemoryAvailble Api to IImsMmtelFeature.aidl - Bug: b/240883268 Test: Tested Memory full and Not Full conditions in Pixel6 Change-Id: Iad053fd97e652254e697c3de0b96bb33bb5307d8
This commit is contained in:
@@ -16029,6 +16029,7 @@ package android.telephony.ims.stub {
|
||||
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 onMemoryAvailable(int);
|
||||
method public void onReady();
|
||||
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, @IntRange(from=0, to=65535) int, int, int, int) throws java.lang.RuntimeException;
|
||||
|
||||
@@ -64,6 +64,7 @@ interface IImsMmTelFeature {
|
||||
void setSmsListener(IImsSmsListener l);
|
||||
oneway void sendSms(in int token, int messageRef, String format, String smsc, boolean retry,
|
||||
in byte[] pdu);
|
||||
oneway void onMemoryAvailable(int token);
|
||||
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);
|
||||
|
||||
@@ -268,6 +268,12 @@ public class MmTelFeature extends ImsFeature {
|
||||
.sendSms(token, messageRef, format, smsc, retry, pdu), "sendSms");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onMemoryAvailable(int token) {
|
||||
executeMethodAsyncNoException(() -> MmTelFeature.this
|
||||
.onMemoryAvailable(token), "onMemoryAvailable");
|
||||
}
|
||||
|
||||
@Override
|
||||
public void acknowledgeSms(int token, int messageRef, int result) {
|
||||
executeMethodAsyncNoException(() -> MmTelFeature.this
|
||||
@@ -1088,6 +1094,10 @@ public class MmTelFeature extends ImsFeature {
|
||||
getSmsImplementation().sendSms(token, messageRef, format, smsc, isRetry, pdu);
|
||||
}
|
||||
|
||||
private void onMemoryAvailable(int token) {
|
||||
getSmsImplementation().onMemoryAvailable(token);
|
||||
}
|
||||
|
||||
private void acknowledgeSms(int token, int messageRef,
|
||||
@ImsSmsImplBase.DeliverStatusResult int result) {
|
||||
getSmsImplementation().acknowledgeSms(token, messageRef, result);
|
||||
|
||||
@@ -170,6 +170,20 @@ public class ImsSmsImplBase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be triggered by the platform when memory becomes available to receive SMS
|
||||
* after a memory full event. This method should be implemented by IMS providers to
|
||||
* send RP-SMMA notification from SMS Relay Layer to server over IMS as per section 7.3.2 of
|
||||
* TS 124.11. Once the RP-SMMA Notification is sent to the network. The network will deliver all
|
||||
* the pending messages which failed due to Unavailability of Memory.
|
||||
*
|
||||
* @param token unique token generated in {@link ImsSmsDispatcher#onMemoryAvailable(void)} that
|
||||
* should be used when triggering callbacks for this specific message.
|
||||
*/
|
||||
public void onMemoryAvailable(int token) {
|
||||
// Base Implementation - Should be overridden
|
||||
}
|
||||
|
||||
/**
|
||||
* This method will be triggered by the platform after
|
||||
* {@link #onSmsReceived(int, String, byte[])} has been called to deliver the result to the IMS
|
||||
|
||||
Reference in New Issue
Block a user