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

Commit 29f2f999 authored by twen.chang's avatar twen.chang Committed by android-build-merger
Browse files

Merge changes from topics \'Add RIL Error code list\', \'Fix bug of...

Merge changes from topics \'Add RIL Error code list\', \'Fix bug of getRingingCall\' into mm-wireless-dev
am: dd726155

* commit 'dd726155':
  Add RIL Error code list
  Fix bug of getRingingCall
parents b4030827 dd726155
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -76,6 +76,11 @@ public class CommandException extends RuntimeException {
        NO_SMS_TO_ACK,
        NETWORK_ERR,
        REQUEST_RATE_LIMITED,
        SIM_BUSY,
        SIM_FULL,
        NETWORK_REJECT,
        OPERATION_NOT_ALLOWED,
        EMPTY_RECORD,
        OEM_ERROR_1,
        OEM_ERROR_2,
        OEM_ERROR_3,
@@ -215,6 +220,16 @@ public class CommandException extends RuntimeException {
                return new CommandException(Error.NETWORK_ERR);
            case RILConstants.REQUEST_RATE_LIMITED:
                return new CommandException(Error.REQUEST_RATE_LIMITED);
            case RILConstants.SIM_BUSY:
                return new CommandException(Error.SIM_BUSY);
            case RILConstants.SIM_FULL:
                return new CommandException(Error.SIM_FULL);
            case RILConstants.NETWORK_REJECT:
                return new CommandException(Error.NETWORK_REJECT);
            case RILConstants.OPERATION_NOT_ALLOWED:
                return new CommandException(Error.OPERATION_NOT_ALLOWED);
            case RILConstants.EMPTY_RECORD:
                return new CommandException(Error.EMPTY_RECORD);
            case RILConstants.OEM_ERROR_1:
                return new CommandException(Error.OEM_ERROR_1);
            case RILConstants.OEM_ERROR_2:
+8 −3
Original line number Diff line number Diff line
@@ -833,9 +833,14 @@ public class GsmCdmaPhone extends Phone {
    @Override
    public Call getRingingCall() {
        Phone imsPhone = mImsPhone;
        if ( mCT.mRingingCall != null && mCT.mRingingCall.isRinging() ) {
            return mCT.mRingingCall;
        } else if ( imsPhone != null ) {
        // It returns the ringing call of ImsPhone if the ringing call of GSMPhone isn't ringing.
        // In CallManager.registerPhone(), it always registers ringing call of ImsPhone, because
        // the ringing call of GSMPhone isn't ringing. Consequently, it can't answer GSM call
        // successfully by invoking TelephonyManager.answerRingingCall() since the implementation
        // in PhoneInterfaceManager.answerRingingCallInternal() could not get the correct ringing
        // call from CallManager. So we check the ringing call state of imsPhone first as
        // accpetCall() does.
        if ( imsPhone != null && imsPhone.getRingingCall().isRinging()) {
            return imsPhone.getRingingCall();
        }
        return mCT.mRingingCall;