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

Commit 40693d76 authored by Hyunho's avatar Hyunho Committed by Hyunho Shin
Browse files

Processing of the received SIP code 999

When we send a request to PUBLISH and there is no change to the UCE capabilities, we
expected onCommandError() with COMMAND_CODE_NO_CHANGE.
But some of the vendor will instead send SIP code 999.
We need a patch to give to OEMs reporting this issue to consider SIP code 999 response
to PUBLISH in the same way that we handle COMMAND_CODE_NO_CHANGE.

Bug: b/215742337
Test: Pre-submit
Change-Id: I01cfbfcd65f68b884db4df79d1658bfe04f5becf
parent 155258c2
Loading
Loading
Loading
Loading
+18 −0
Original line number Diff line number Diff line
@@ -199,6 +199,15 @@ public class PublishRequestResponse {
    }

    private void onNetworkResponse(int sipCode, String reason) {
        // When we send a request to PUBLISH and there is no change to the UCE capabilities, we
        // expected onCommandError() with COMMAND_CODE_NO_CHANGE.
        // But some of the vendor will instead send SIP code 999.
        // We need a patch to give to OEMs reporting this issue to consider SIP code 999 response
        // to PUBLISH in the same way that we handle COMMAND_CODE_NO_CHANGE.
        if (sipCode == 999) {
            onCommandError(RcsCapabilityExchangeImplBase.COMMAND_CODE_NO_CHANGE);
            return;
        }
        mResponseTimestamp = Instant.now();
        mNetworkRespSipCode = Optional.of(sipCode);
        mReasonPhrase = Optional.ofNullable(reason);
@@ -214,6 +223,15 @@ public class PublishRequestResponse {

    private void onNetworkResponse(int sipCode, String reasonPhrase, int reasonHeaderCause,
            String reasonHeaderText) {
        // When we send a request to PUBLISH and there is no change to the UCE capabilities, we
        // expected onCommandError() with COMMAND_CODE_NO_CHANGE.
        // But some of the vendor will instead send SIP code 999.
        // We need a patch to give to OEMs reporting this issue to consider SIP code 999 response
        // to PUBLISH in the same way that we handle COMMAND_CODE_NO_CHANGE.
        if (sipCode == 999) {
            onCommandError(RcsCapabilityExchangeImplBase.COMMAND_CODE_NO_CHANGE);
            return;
        }
        mResponseTimestamp = Instant.now();
        mNetworkRespSipCode = Optional.of(sipCode);
        mReasonPhrase = Optional.ofNullable(reasonPhrase);