Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 77c5faf4 authored by James Lin's avatar James Lin Committed by Gerrit Code Review
Browse files

Merge "[RCS UCE] Add a network response with Reason header info callback for...

Merge "[RCS UCE] Add a network response with Reason header info callback for the publish request and subscribe request."
parents 84da5781 44016085
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -12394,11 +12394,13 @@ package android.telephony.ims.stub {
  public static interface RcsCapabilityExchangeImplBase.PublishResponseCallback {
    method public void onCommandError(int) throws android.telephony.ims.ImsException;
    method public void onNetworkResponse(@IntRange(from=100, to=699) int, @NonNull String) throws android.telephony.ims.ImsException;
    method public void onNetworkResponse(@IntRange(from=100, to=699) int, @NonNull String, @IntRange(from=100, to=699) int, @NonNull String) throws android.telephony.ims.ImsException;
  }
  public static interface RcsCapabilityExchangeImplBase.SubscribeResponseCallback {
    method public void onCommandError(int) throws android.telephony.ims.ImsException;
    method public void onNetworkResponse(@IntRange(from=100, to=699) int, @NonNull String) throws android.telephony.ims.ImsException;
    method public void onNetworkResponse(@IntRange(from=100, to=699) int, @NonNull String, @IntRange(from=100, to=699) int, @NonNull String) throws android.telephony.ims.ImsException;
    method public void onNotifyCapabilitiesUpdate(@NonNull java.util.List<java.lang.String>) throws android.telephony.ims.ImsException;
    method public void onResourceTerminated(@NonNull java.util.List<android.util.Pair<android.net.Uri,java.lang.String>>) throws android.telephony.ims.ImsException;
    method public void onTerminated(@NonNull String, long) throws android.telephony.ims.ImsException;
+1 −0
Original line number Diff line number Diff line
@@ -26,4 +26,5 @@ import java.util.List;
oneway interface IPublishResponseCallback {
    void onCommandError(int code);
    void onNetworkResponse(int code, String reason);
    void onNetworkRespHeader(int code, String reasonPhrase, int reasonHeaderCause, String reasonHeaderText);
}
+1 −0
Original line number Diff line number Diff line
@@ -30,6 +30,7 @@ import java.util.Map;
oneway interface ISubscribeResponseCallback {
    void onCommandError(int code);
    void onNetworkResponse(int code, in String reason);
    void onNetworkRespHeader(int code, String reasonPhrase, int reasonHeaderCause, String reasonHeaderText);
    void onNotifyCapabilitiesUpdate(in List<String> pidfXmls);
    void onResourceTerminated(in List<RcsContactTerminatedReason> uriTerminatedReason);
    void onTerminated(in String reason, long retryAfterMilliseconds);
+14 −1
Original line number Diff line number Diff line
@@ -34,10 +34,11 @@ public class RcsPublishResponseAidlWrapper implements PublishResponseCallback {
    }

    @Override
    public void onCommandError(int code) {
    public void onCommandError(int code) throws ImsException {
        try {
            mResponseBinder.onCommandError(code);
        } catch (RemoteException e) {
            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
        }
    }

@@ -46,6 +47,18 @@ public class RcsPublishResponseAidlWrapper implements PublishResponseCallback {
        try {
            mResponseBinder.onNetworkResponse(code, reason);
        } catch (RemoteException e) {
            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
        }
    }

    @Override
    public void onNetworkResponse(int code, String reasonPhrase, int reasonHeaderCause,
            String reasonHeaderText) throws ImsException {
        try {
            mResponseBinder.onNetworkRespHeader(code, reasonPhrase, reasonHeaderCause,
                    reasonHeaderText);
        } catch (RemoteException e) {
            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
        }
    }
}
+17 −1
Original line number Diff line number Diff line
@@ -40,10 +40,11 @@ public class RcsSubscribeResponseAidlWrapper implements SubscribeResponseCallbac
    }

    @Override
    public void onCommandError(int code) {
    public void onCommandError(int code) throws ImsException {
        try {
            mResponseBinder.onCommandError(code);
        } catch (RemoteException e) {
            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
        }
    }

@@ -52,6 +53,18 @@ public class RcsSubscribeResponseAidlWrapper implements SubscribeResponseCallbac
        try {
            mResponseBinder.onNetworkResponse(code, reason);
        } catch (RemoteException e) {
            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
        }
    }

    @Override
    public void onNetworkResponse(int code, String reasonPhrase, int reasonHeaderCause,
            String reasonHeaderText) throws ImsException {
        try {
            mResponseBinder.onNetworkRespHeader(code, reasonPhrase, reasonHeaderCause,
                    reasonHeaderText);
        } catch (RemoteException e) {
            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
        }
    }

@@ -60,6 +73,7 @@ public class RcsSubscribeResponseAidlWrapper implements SubscribeResponseCallbac
        try {
            mResponseBinder.onNotifyCapabilitiesUpdate(pidfXmls);
        } catch (RemoteException e) {
            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
        }
    }

@@ -69,6 +83,7 @@ public class RcsSubscribeResponseAidlWrapper implements SubscribeResponseCallbac
        try {
            mResponseBinder.onResourceTerminated(getTerminatedReasonList(uriTerminatedReason));
        } catch (RemoteException e) {
            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
        }
    }

@@ -90,6 +105,7 @@ public class RcsSubscribeResponseAidlWrapper implements SubscribeResponseCallbac
        try {
            mResponseBinder.onTerminated(reason, retryAfterMilliseconds);
        } catch (RemoteException e) {
            throw new ImsException(e.getMessage(), ImsException.CODE_ERROR_SERVICE_UNAVAILABLE);
        }
    }
}
Loading