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

Commit 232d1429 authored by Ricardo Cerqueira's avatar Ricardo Cerqueira
Browse files

SamsungQualcomm: Skip new requests on old RILs

Pre-8 RIL implementations lack support for both
RIL_REQUEST_SET_UNSOL_CELL_INFO_LIST_RATE and
RIL_REQUEST_IMS_REGISTRATION_STATE. Ignore both of
these to prevent lingering unanswered requests.

Change-Id: I4cfbfe52a14dea636823cb54a0cc4675de80698b
parent 61759138
Loading
Loading
Loading
Loading
+16 −1
Original line number Diff line number Diff line
@@ -290,6 +290,7 @@ public class SamsungQualcommRIL extends RIL implements CommandsInterface {
                if(cdmaSubscription != -1) {
                    setCdmaSubscriptionSource(mCdmaSubscription, null);
                }
                if(mRilVersion >= 8)
                    setCellInfoListRate(Integer.MAX_VALUE, null);
                notifyRegistrantsRilConnectionChanged(((int[])ret)[0]);
                break;
@@ -786,4 +787,18 @@ public class SamsungQualcommRIL extends RIL implements CommandsInterface {

        return ret;
    }

    @Override
    public void getImsRegistrationState(Message result) {
        if(mRilVersion >= 8)
            super.getImsRegistrationState(result);
        else {
            if (result != null) {
                CommandException ex = new CommandException(
                    CommandException.Error.REQUEST_NOT_SUPPORTED);
                AsyncResult.forMessage(result, null, ex);
                result.sendToTarget();
            }
        }
    }
}