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

Commit 12f844b0 authored by Nathan Harold's avatar Nathan Harold
Browse files

Remove obsolete getIsimChallengeResponse

This method is fully superceded by getIccAuthentication
Any callers should use the new method instead.

Bug: 27954896
Test: compilation
Change-Id: I8fb81a6c6cb1dcb278f4fe9d4ac4d3ae54a342c2
parent df844ef5
Loading
Loading
Loading
Loading
+0 −12
Original line number Diff line number Diff line
@@ -1721,18 +1721,6 @@ public interface CommandsInterface {
     */
    public int getLteOnCdmaMode();

    /**
     * Request the ISIM application on the UICC to perform the AKA
     * challenge/response algorithm for IMS authentication. The nonce string
     * and challenge response are Base64 encoded Strings.
     *
     * @param nonce the nonce string to pass with the ISIM authentication request
     * @param response a callback message with the String response in the obj field
     * @deprecated
     * @see requestIccSimAuthentication
     */
    public void requestIsimAuthentication(String nonce, Message response);

    /**
     * Request the SIM application on the UICC to perform authentication
     * challenge/response algorithm. The data string and challenge response are
+1 −13
Original line number Diff line number Diff line
@@ -26,8 +26,8 @@ import android.os.RemoteException;
import android.os.ServiceManager;
import android.telephony.ImsiEncryptionInfo;
import android.telephony.PhoneNumberUtils;
import android.telephony.SubscriptionManager;
import android.telephony.Rlog;
import android.telephony.SubscriptionManager;

import com.android.internal.telephony.uicc.IsimRecords;
import com.android.internal.telephony.uicc.UiccCard;
@@ -432,18 +432,6 @@ public class PhoneSubInfoController extends IPhoneSubInfo.Stub {
        }
    }

    public String getIsimChallengeResponse(String nonce) throws RemoteException {
        Phone phone = getPhone(getDefaultSubscription());
        mContext.enforceCallingOrSelfPermission(READ_PRIVILEGED_PHONE_STATE,
                "Requires READ_PRIVILEGED_PHONE_STATE");
        IsimRecords isim = phone.getIsimRecords();
        if (isim != null) {
            return isim.getIsimChallengeResponse(nonce);
        } else {
            return null;
        }
    }

    public String getIccSimChallengeResponse(int subId, int appType, int authType, String data)
            throws RemoteException {
        Phone phone = getPhone(subId);
+0 −20
Original line number Diff line number Diff line
@@ -2878,26 +2878,6 @@ public class RIL extends BaseCommands implements CommandsInterface {
        }
    }

    @Override
    public void requestIsimAuthentication(String nonce, Message result) {
        IRadio radioProxy = getRadioProxy(result);
        if (radioProxy != null) {
            RILRequest rr = obtainRequest(RIL_REQUEST_ISIM_AUTHENTICATION, result,
                    mRILDefaultWorkSource);

            if (RILJ_LOGD) {
                riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)
                        + " nonce = " + nonce);
            }

            try {
                radioProxy.requestIsimAuthentication(rr.mSerial, convertNullToEmptyString(nonce));
            } catch (RemoteException | RuntimeException e) {
                handleRadioProxyExceptionForRR(rr, "requestIsimAuthentication", e);
            }
        }
    }

    @Override
    public void acknowledgeIncomingGsmSmsWithPdu(boolean success, String ackPdu, Message result) {
        IRadio radioProxy = getRadioProxy(result);
+2 −1
Original line number Diff line number Diff line
@@ -914,12 +914,13 @@ public class RadioResponse extends IRadioResponse.Stub {
    }

    /**
     * This method is deprecated and should not be used.
     *
     * @param responseInfo Response info struct containing response type, serial no. and error
     * @param response response string of the challenge/response algo for ISIM auth in base64 format
     */
    public void requestIsimAuthenticationResponse(RadioResponseInfo responseInfo, String response) {
        responseString(responseInfo, response);
        throw new RuntimeException("Inexplicable response received for requestIsimAuthentication");
    }

    /**
+0 −4
Original line number Diff line number Diff line
@@ -547,10 +547,6 @@ class ImsPhoneCommandInterface extends BaseCommands implements CommandsInterface
            Message response) {
    }

    @Override
    public void requestIsimAuthentication(String nonce, Message response) {
    }

    @Override
    public void requestIccSimAuthentication(int authContext, String data, String aid, Message response) {
    }
Loading