[MEP] Add port index to icc logical channel open, close and trasmit APIs.
Modified logic to retrieve phoneId based on the slot index and port index as well. Test: build Bug: 199559346 Change-Id: I98036645023bd7ba12475d4a06ce64287401471b Merged-In: I98036645023bd7ba12475d4a06ce64287401471b
This commit is contained in:
@@ -6784,8 +6784,8 @@ public class TelephonyManager {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
if (telephony != null) {
|
||||
return telephony.iccOpenLogicalChannelBySlot(slotIndex, getOpPackageName(), aid,
|
||||
p2);
|
||||
return telephony.iccOpenLogicalChannelByPort(slotIndex, DEFAULT_PORT_INDEX,
|
||||
getOpPackageName(), aid, p2);
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
} catch (NullPointerException ex) {
|
||||
@@ -6883,7 +6883,8 @@ public class TelephonyManager {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
if (telephony != null) {
|
||||
return telephony.iccCloseLogicalChannelBySlot(slotIndex, channel);
|
||||
return telephony.iccCloseLogicalChannelByPort(slotIndex, DEFAULT_PORT_INDEX,
|
||||
channel);
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
} catch (NullPointerException ex) {
|
||||
@@ -6967,8 +6968,8 @@ public class TelephonyManager {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
if (telephony != null) {
|
||||
return telephony.iccTransmitApduLogicalChannelBySlot(slotIndex, channel, cla,
|
||||
instruction, p1, p2, p3, data);
|
||||
return telephony.iccTransmitApduLogicalChannelByPort(slotIndex, DEFAULT_PORT_INDEX,
|
||||
channel, cla, instruction, p1, p2, p3, data);
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
} catch (NullPointerException ex) {
|
||||
@@ -7070,8 +7071,8 @@ public class TelephonyManager {
|
||||
try {
|
||||
ITelephony telephony = getITelephony();
|
||||
if (telephony != null) {
|
||||
return telephony.iccTransmitApduBasicChannelBySlot(slotIndex, getOpPackageName(),
|
||||
cla, instruction, p1, p2, p3, data);
|
||||
return telephony.iccTransmitApduBasicChannelByPort(slotIndex, DEFAULT_PORT_INDEX,
|
||||
getOpPackageName(), cla, instruction, p1, p2, p3, data);
|
||||
}
|
||||
} catch (RemoteException ex) {
|
||||
} catch (NullPointerException ex) {
|
||||
|
||||
@@ -585,18 +585,19 @@ interface ITelephony {
|
||||
void setCellInfoListRate(int rateInMillis);
|
||||
|
||||
/**
|
||||
* Opens a logical channel to the ICC card using the physical slot index.
|
||||
* Opens a logical channel to the ICC card using the physical slot index and port index.
|
||||
*
|
||||
* Input parameters equivalent to TS 27.007 AT+CCHO command.
|
||||
*
|
||||
* @param slotIndex The physical slot index of the target ICC card
|
||||
* @param portIndex The unique index referring to a port belonging to the SIM slot
|
||||
* @param callingPackage the name of the package making the call.
|
||||
* @param AID Application id. See ETSI 102.221 and 101.220.
|
||||
* @param p2 P2 parameter (described in ISO 7816-4).
|
||||
* @return an IccOpenLogicalChannelResponse object.
|
||||
*/
|
||||
IccOpenLogicalChannelResponse iccOpenLogicalChannelBySlot(
|
||||
int slotIndex, String callingPackage, String AID, int p2);
|
||||
IccOpenLogicalChannelResponse iccOpenLogicalChannelByPort(
|
||||
int slotIndex, int portIndex, String callingPackage, String AID, int p2);
|
||||
|
||||
/**
|
||||
* Opens a logical channel to the ICC card.
|
||||
@@ -613,16 +614,17 @@ interface ITelephony {
|
||||
int subId, String callingPackage, String AID, int p2);
|
||||
|
||||
/**
|
||||
* Closes a previously opened logical channel to the ICC card using the physical slot index.
|
||||
* Closes a previously opened logical channel to the ICC card using the physical slot index and port index.
|
||||
*
|
||||
* Input parameters equivalent to TS 27.007 AT+CCHC command.
|
||||
*
|
||||
* @param slotIndex The physical slot index of the target ICC card
|
||||
* @param portIndex The unique index referring to a port belonging to the SIM slot
|
||||
* @param channel is the channel id to be closed as returned by a
|
||||
* successful iccOpenLogicalChannel.
|
||||
* @return true if the channel was closed successfully.
|
||||
*/
|
||||
boolean iccCloseLogicalChannelBySlot(int slotIndex, int channel);
|
||||
boolean iccCloseLogicalChannelByPort(int slotIndex, int portIndex, int channel);
|
||||
|
||||
/**
|
||||
* Closes a previously opened logical channel to the ICC card.
|
||||
@@ -638,11 +640,12 @@ interface ITelephony {
|
||||
boolean iccCloseLogicalChannel(int subId, int channel);
|
||||
|
||||
/**
|
||||
* Transmit an APDU to the ICC card over a logical channel using the physical slot index.
|
||||
* Transmit an APDU to the ICC card over a logical channel using the physical slot index and port index.
|
||||
*
|
||||
* Input parameters equivalent to TS 27.007 AT+CGLA command.
|
||||
*
|
||||
* @param slotIndex The physical slot index of the target ICC card
|
||||
* @param portIndex The unique index referring to a port belonging to the SIM slot
|
||||
* @param channel is the channel id to be closed as returned by a
|
||||
* successful iccOpenLogicalChannel.
|
||||
* @param cla Class of the APDU command.
|
||||
@@ -655,7 +658,7 @@ interface ITelephony {
|
||||
* @return The APDU response from the ICC card with the status appended at
|
||||
* the end.
|
||||
*/
|
||||
String iccTransmitApduLogicalChannelBySlot(int slotIndex, int channel, int cla, int instruction,
|
||||
String iccTransmitApduLogicalChannelByPort(int slotIndex, int portIndex, int channel, int cla, int instruction,
|
||||
int p1, int p2, int p3, String data);
|
||||
|
||||
/**
|
||||
@@ -681,11 +684,12 @@ interface ITelephony {
|
||||
int p1, int p2, int p3, String data);
|
||||
|
||||
/**
|
||||
* Transmit an APDU to the ICC card over the basic channel using the physical slot index.
|
||||
* Transmit an APDU to the ICC card over the basic channel using the physical slot index and port index.
|
||||
*
|
||||
* Input parameters equivalent to TS 27.007 AT+CSIM command.
|
||||
*
|
||||
* @param slotIndex The physical slot index of the target ICC card
|
||||
* @param portIndex The unique index referring to a port belonging to the SIM slot
|
||||
* @param callingPackage the name of the package making the call.
|
||||
* @param cla Class of the APDU command.
|
||||
* @param instruction Instruction of the APDU command.
|
||||
@@ -697,7 +701,7 @@ interface ITelephony {
|
||||
* @return The APDU response from the ICC card with the status appended at
|
||||
* the end.
|
||||
*/
|
||||
String iccTransmitApduBasicChannelBySlot(int slotIndex, String callingPackage, int cla,
|
||||
String iccTransmitApduBasicChannelByPort(int slotIndex, int portIndex, String callingPackage, int cla,
|
||||
int instruction, int p1, int p2, int p3, String data);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user