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

Commit f7a91ba6 authored by Hyunho's avatar Hyunho
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
Merged-In: I01cfbfcd65f68b884db4df79d1658bfe04f5becf
parent d92dddbb
Loading
Loading
Loading
Loading
+14 −0
Original line number Diff line number Diff line
@@ -199,6 +199,13 @@ 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.
        if (sipCode == 999) {
            onCommandError(RcsCapabilityExchangeImplBase.COMMAND_CODE_NO_CHANGE);
            return;
        }
        mResponseTimestamp = Instant.now();
        mNetworkRespSipCode = Optional.of(sipCode);
        mReasonPhrase = Optional.ofNullable(reason);
@@ -214,6 +221,13 @@ 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.
        if (sipCode == 999) {
            onCommandError(RcsCapabilityExchangeImplBase.COMMAND_CODE_NO_CHANGE);
            return;
        }
        mResponseTimestamp = Instant.now();
        mNetworkRespSipCode = Optional.of(sipCode);
        mReasonPhrase = Optional.ofNullable(reasonPhrase);