Add api to report the result of sending RP-SMMA to framework
- Add the callback Api onMemoryAvailbleResult Api to IImsSmsListener.aidl - Bug: b/240883268 Test: Tested Memory full and Not Full conditions in Pixel6 Change-Id: I01a1ae80fbb756c84dd007d10cdc42df55d98f0b
This commit is contained in:
@@ -16190,7 +16190,6 @@ 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;
|
||||
|
||||
@@ -24,4 +24,5 @@ oneway interface IImsSmsListener {
|
||||
void onSendSmsResult(int token, int messageRef, int status, int reason, int networkErrorCode);
|
||||
void onSmsStatusReportReceived(int token, in String format, in byte[] pdu);
|
||||
void onSmsReceived(int token, in String format, in byte[] pdu);
|
||||
void onMemoryAvailableResult(int token, int status, int networkErrorCode);
|
||||
}
|
||||
|
||||
@@ -196,6 +196,8 @@ public class ImsSmsImplBase {
|
||||
*
|
||||
* @param token unique token generated in {@link ImsSmsDispatcher#onMemoryAvailable(void)} that
|
||||
* should be used when triggering callbacks for this specific message.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public void onMemoryAvailable(int token) {
|
||||
// Base Implementation - Should be overridden
|
||||
@@ -402,6 +404,38 @@ public class ImsSmsImplBase {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This API is used to report the result of sending
|
||||
* RP-SMMA to framework based on received network responses(RP-ACK,
|
||||
* RP-ERROR or SIP error).
|
||||
*
|
||||
* @param token provided in {@link #onMemoryAvailable()}.
|
||||
* @param result based on RP-ACK or RP_ERROR
|
||||
* @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 generated. See
|
||||
* 3GPP TS 24.011 Section 7.3.4 for valid error codes and more
|
||||
* information.
|
||||
*
|
||||
* @hide
|
||||
*/
|
||||
public final void onMemoryAvailableResult(int token, @SendStatusResult int result,
|
||||
int networkErrorCode) throws RuntimeException {
|
||||
IImsSmsListener listener = null;
|
||||
synchronized (mLock) {
|
||||
listener = mListener;
|
||||
}
|
||||
|
||||
if (listener == null) {
|
||||
throw new RuntimeException("Feature not ready.");
|
||||
}
|
||||
try {
|
||||
listener.onMemoryAvailableResult(token, result, networkErrorCode);
|
||||
} catch (RemoteException e) {
|
||||
e.rethrowFromSystemServer();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* This method should be triggered by the IMS providers when the status report of the sent
|
||||
* message is received. The platform will handle the report and notify the IMS provider of the
|
||||
|
||||
Reference in New Issue
Block a user