[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
This commit is contained in:
@@ -6765,8 +6765,8 @@ public class TelephonyManager {
|
|||||||
try {
|
try {
|
||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
if (telephony != null) {
|
if (telephony != null) {
|
||||||
return telephony.iccOpenLogicalChannelBySlot(slotIndex, getOpPackageName(), aid,
|
return telephony.iccOpenLogicalChannelByPort(slotIndex, DEFAULT_PORT_INDEX,
|
||||||
p2);
|
getOpPackageName(), aid, p2);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ex) {
|
||||||
@@ -6877,7 +6877,8 @@ public class TelephonyManager {
|
|||||||
try {
|
try {
|
||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
if (telephony != null) {
|
if (telephony != null) {
|
||||||
return telephony.iccCloseLogicalChannelBySlot(slotIndex, channel);
|
return telephony.iccCloseLogicalChannelByPort(slotIndex, DEFAULT_PORT_INDEX,
|
||||||
|
channel);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ex) {
|
||||||
@@ -6970,8 +6971,8 @@ public class TelephonyManager {
|
|||||||
try {
|
try {
|
||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
if (telephony != null) {
|
if (telephony != null) {
|
||||||
return telephony.iccTransmitApduLogicalChannelBySlot(slotIndex, channel, cla,
|
return telephony.iccTransmitApduLogicalChannelByPort(slotIndex, DEFAULT_PORT_INDEX,
|
||||||
instruction, p1, p2, p3, data);
|
channel, cla, instruction, p1, p2, p3, data);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ex) {
|
||||||
@@ -7085,8 +7086,8 @@ public class TelephonyManager {
|
|||||||
try {
|
try {
|
||||||
ITelephony telephony = getITelephony();
|
ITelephony telephony = getITelephony();
|
||||||
if (telephony != null) {
|
if (telephony != null) {
|
||||||
return telephony.iccTransmitApduBasicChannelBySlot(slotIndex, getOpPackageName(),
|
return telephony.iccTransmitApduBasicChannelByPort(slotIndex, DEFAULT_PORT_INDEX,
|
||||||
cla, instruction, p1, p2, p3, data);
|
getOpPackageName(), cla, instruction, p1, p2, p3, data);
|
||||||
}
|
}
|
||||||
} catch (RemoteException ex) {
|
} catch (RemoteException ex) {
|
||||||
} catch (NullPointerException ex) {
|
} catch (NullPointerException ex) {
|
||||||
|
|||||||
@@ -584,18 +584,19 @@ interface ITelephony {
|
|||||||
void setCellInfoListRate(int rateInMillis);
|
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.
|
* Input parameters equivalent to TS 27.007 AT+CCHO command.
|
||||||
*
|
*
|
||||||
* @param slotIndex The physical slot index of the target ICC card
|
* @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 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 iccOpenLogicalChannelBySlot(
|
IccOpenLogicalChannelResponse iccOpenLogicalChannelByPort(
|
||||||
int slotIndex, String callingPackage, String AID, int p2);
|
int slotIndex, int portIndex, String callingPackage, String AID, int p2);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Opens a logical channel to the ICC card.
|
* Opens a logical channel to the ICC card.
|
||||||
@@ -612,16 +613,17 @@ interface ITelephony {
|
|||||||
int subId, String callingPackage, String AID, int p2);
|
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.
|
* Input parameters equivalent to TS 27.007 AT+CCHC command.
|
||||||
*
|
*
|
||||||
* @param slotIndex The physical slot index of the target ICC card
|
* @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
|
* @param channel is the channel id to be closed as returned by a
|
||||||
* successful iccOpenLogicalChannel.
|
* successful iccOpenLogicalChannel.
|
||||||
* @return true if the channel was closed successfully.
|
* @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.
|
* Closes a previously opened logical channel to the ICC card.
|
||||||
@@ -637,11 +639,12 @@ interface ITelephony {
|
|||||||
boolean iccCloseLogicalChannel(int subId, int channel);
|
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.
|
* Input parameters equivalent to TS 27.007 AT+CGLA command.
|
||||||
*
|
*
|
||||||
* @param slotIndex The physical slot index of the target ICC card
|
* @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
|
* @param channel is the channel id to be closed as returned by a
|
||||||
* successful iccOpenLogicalChannel.
|
* successful iccOpenLogicalChannel.
|
||||||
* @param cla Class of the APDU command.
|
* @param cla Class of the APDU command.
|
||||||
@@ -654,7 +657,7 @@ interface ITelephony {
|
|||||||
* @return The APDU response from the ICC card with the status appended at
|
* @return The APDU response from the ICC card with the status appended at
|
||||||
* the end.
|
* 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);
|
int p1, int p2, int p3, String data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -680,11 +683,12 @@ interface ITelephony {
|
|||||||
int p1, int p2, int p3, String data);
|
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.
|
* Input parameters equivalent to TS 27.007 AT+CSIM command.
|
||||||
*
|
*
|
||||||
* @param slotIndex The physical slot index of the target ICC card
|
* @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 callingPackage the name of the package making the call.
|
||||||
* @param cla Class of the APDU command.
|
* @param cla Class of the APDU command.
|
||||||
* @param instruction Instruction of the APDU command.
|
* @param instruction Instruction of the APDU command.
|
||||||
@@ -696,7 +700,7 @@ interface ITelephony {
|
|||||||
* @return The APDU response from the ICC card with the status appended at
|
* @return The APDU response from the ICC card with the status appended at
|
||||||
* the end.
|
* 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);
|
int instruction, int p1, int p2, int p3, String data);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user