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

Commit cda9a836 authored by Derek Tan's avatar Derek Tan
Browse files

Prevent any app except LPA to create logical channel to AID of ISD-R.

Bug: 33077154
Test: manual verification using LPA and Tycho.

Change-Id: I4ef85529d0f63d46849d5afe76df90a27171e7db
parent be6989cb
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -3765,7 +3765,7 @@ public class TelephonyManager {
        try {
        try {
            ITelephony telephony = getITelephony();
            ITelephony telephony = getITelephony();
            if (telephony != null)
            if (telephony != null)
                return telephony.iccOpenLogicalChannel(subId, AID, p2);
                return telephony.iccOpenLogicalChannel(subId, getOpPackageName(), AID, p2);
        } catch (RemoteException ex) {
        } catch (RemoteException ex) {
        } catch (NullPointerException ex) {
        } catch (NullPointerException ex) {
        }
        }
@@ -6762,4 +6762,3 @@ public class TelephonyManager {
        return null;
        return null;
    }
    }
}
}
+3 −1
Original line number Original line Diff line number Diff line
@@ -623,11 +623,13 @@ interface ITelephony {
     * Input parameters equivalent to TS 27.007 AT+CCHO command.
     * Input parameters equivalent to TS 27.007 AT+CCHO command.
     *
     *
     * @param subId The subscription to use.
     * @param subId The subscription to use.
     * @param callingPackage the name of the package making the call.
     * @param AID Application id. See ETSI 102.221 and 101.220.
     * @param AID Application id. See ETSI 102.221 and 101.220.
     * @param p2 P2 parameter (described in ISO 7816-4).
     * @param p2 P2 parameter (described in ISO 7816-4).
     * @return an IccOpenLogicalChannelResponse object.
     * @return an IccOpenLogicalChannelResponse object.
     */
     */
    IccOpenLogicalChannelResponse iccOpenLogicalChannel(int subId, String AID, int p2);
    IccOpenLogicalChannelResponse iccOpenLogicalChannel(
            int subId, String callingPackage, String AID, int p2);


    /**
    /**
     * Closes a previously opened logical channel to the ICC card.
     * Closes a previously opened logical channel to the ICC card.