Loading telephony/java/com/android/internal/telephony/CommandsInterface.java +17 −0 Original line number Diff line number Diff line Loading @@ -754,6 +754,15 @@ public interface CommandsInterface { */ void getIMSI(Message result); /** * returned message * retMsg.obj = AsyncResult ar * ar.exception carries exception on failure * ar.userObject contains the orignal value of result.obj * ar.result is String containing IMSI on success */ void getIMSIForApp(String aid, Message result); /** * returned message * retMsg.obj = AsyncResult ar Loading Loading @@ -1049,6 +1058,14 @@ public interface CommandsInterface { void iccIO (int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, Message response); /** * parameters equivalent to 27.007 AT+CRSM command * response.obj will be an AsyncResult * response.obj.userObj will be a IccIoResult on success */ void iccIOForApp (int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, String aid, Message response); /** * (AsyncResult)response.obj).result is an int[] with element [0] set to * 1 for "CLIP is provisioned", and 0 for "CLIP is not provisioned". Loading telephony/java/com/android/internal/telephony/IccCardStatus.java +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import java.util.ArrayList; * {@hide} */ public class IccCardStatus { static final int CARD_MAX_APPS = 8; public static final int CARD_MAX_APPS = 8; public enum CardState { CARDSTATE_ABSENT, Loading telephony/java/com/android/internal/telephony/IccFileHandler.java +29 −19 Original line number Diff line number Diff line Loading @@ -145,8 +145,9 @@ public abstract class IccFileHandler extends Handler implements IccConstants { = obtainMessage(EVENT_GET_RECORD_SIZE_DONE, new LoadLinearFixedContext(fileid, recordNum, onLoaded)); phone.mCM.iccIO(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, response); phone.mCM.iccIOForApp(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -164,9 +165,10 @@ public abstract class IccFileHandler extends Handler implements IccConstants { onLoaded)); // TODO(): Verify when path changes are done. phone.mCM.iccIO(COMMAND_GET_RESPONSE, IccConstants.EF_IMG, "img", phone.mCM.iccIOForApp(COMMAND_GET_RESPONSE, IccConstants.EF_IMG, "img", recordNum, READ_RECORD_MODE_ABSOLUTE, GET_RESPONSE_EF_IMG_SIZE_BYTES, null, null, response); GET_RESPONSE_EF_IMG_SIZE_BYTES, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -182,8 +184,9 @@ public abstract class IccFileHandler extends Handler implements IccConstants { Message response = obtainMessage(EVENT_GET_EF_LINEAR_RECORD_SIZE_DONE, new LoadLinearFixedContext(fileid, onLoaded)); phone.mCM.iccIO(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, response); phone.mCM.iccIOForApp(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -199,8 +202,9 @@ public abstract class IccFileHandler extends Handler implements IccConstants { Message response = obtainMessage(EVENT_GET_RECORD_SIZE_DONE, new LoadLinearFixedContext(fileid,onLoaded)); phone.mCM.iccIO(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, response); phone.mCM.iccIOForApp(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -217,8 +221,9 @@ public abstract class IccFileHandler extends Handler implements IccConstants { Message response = obtainMessage(EVENT_GET_BINARY_SIZE_DONE, fileid, 0, onLoaded); phone.mCM.iccIO(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, response); phone.mCM.iccIOForApp(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -236,8 +241,8 @@ public abstract class IccFileHandler extends Handler implements IccConstants { Message response = obtainMessage(EVENT_READ_ICON_DONE, fileid, 0, onLoaded); phone.mCM.iccIO(COMMAND_READ_BINARY, fileid, "img", highOffset, lowOffset, length, null, null, response); phone.mCM.iccIOForApp(COMMAND_READ_BINARY, fileid, "img", highOffset, lowOffset, length, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -251,9 +256,10 @@ public abstract class IccFileHandler extends Handler implements IccConstants { */ public void updateEFLinearFixed(int fileid, int recordNum, byte[] data, String pin2, Message onComplete) { phone.mCM.iccIO(COMMAND_UPDATE_RECORD, fileid, getEFPath(fileid), phone.mCM.iccIOForApp(COMMAND_UPDATE_RECORD, fileid, getEFPath(fileid), recordNum, READ_RECORD_MODE_ABSOLUTE, data.length, IccUtils.bytesToHexString(data), pin2, onComplete); IccUtils.bytesToHexString(data), pin2, phone.getIccCard().getAid(), onComplete); } /** Loading @@ -262,9 +268,10 @@ public abstract class IccFileHandler extends Handler implements IccConstants { * @param data must be exactly as long as the EF */ public void updateEFTransparent(int fileid, byte[] data, Message onComplete) { phone.mCM.iccIO(COMMAND_UPDATE_BINARY, fileid, getEFPath(fileid), phone.mCM.iccIOForApp(COMMAND_UPDATE_BINARY, fileid, getEFPath(fileid), 0, 0, data.length, IccUtils.bytesToHexString(data), null, onComplete); IccUtils.bytesToHexString(data), null, phone.getIccCard().getAid(), onComplete); } Loading Loading @@ -395,10 +402,11 @@ public abstract class IccFileHandler extends Handler implements IccConstants { lc.results = new ArrayList<byte[]>(lc.countRecords); } phone.mCM.iccIO(COMMAND_READ_RECORD, lc.efid, getEFPath(lc.efid), phone.mCM.iccIOForApp(COMMAND_READ_RECORD, lc.efid, getEFPath(lc.efid), lc.recordNum, READ_RECORD_MODE_ABSOLUTE, lc.recordSize, null, null, phone.getIccCard().getAid(), obtainMessage(EVENT_READ_RECORD_DONE, lc)); break; case EVENT_GET_BINARY_SIZE_DONE: Loading Loading @@ -433,8 +441,9 @@ public abstract class IccFileHandler extends Handler implements IccConstants { size = ((data[RESPONSE_DATA_FILE_SIZE_1] & 0xff) << 8) + (data[RESPONSE_DATA_FILE_SIZE_2] & 0xff); phone.mCM.iccIO(COMMAND_READ_BINARY, fileid, getEFPath(fileid), phone.mCM.iccIOForApp(COMMAND_READ_BINARY, fileid, getEFPath(fileid), 0, 0, size, null, null, phone.getIccCard().getAid(), obtainMessage(EVENT_READ_BINARY_DONE, fileid, 0, response)); break; Loading Loading @@ -468,10 +477,11 @@ public abstract class IccFileHandler extends Handler implements IccConstants { if (lc.recordNum > lc.countRecords) { sendResult(response, lc.results, null); } else { phone.mCM.iccIO(COMMAND_READ_RECORD, lc.efid, getEFPath(lc.efid), phone.mCM.iccIOForApp(COMMAND_READ_RECORD, lc.efid, getEFPath(lc.efid), lc.recordNum, READ_RECORD_MODE_ABSOLUTE, lc.recordSize, null, null, phone.getIccCard().getAid(), obtainMessage(EVENT_READ_RECORD_DONE, lc)); } } Loading telephony/java/com/android/internal/telephony/RIL.java +21 −3 Original line number Diff line number Diff line Loading @@ -880,9 +880,19 @@ public final class RIL extends BaseCommands implements CommandsInterface { public void getIMSI(Message result) { getIMSIForApp(null, result); } public void getIMSIForApp(String aid, Message result) { RILRequest rr = RILRequest.obtain(RIL_REQUEST_GET_IMSI, result); if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)); rr.mp.writeInt(1); rr.mp.writeString(aid); if (RILJ_LOGD) riljLog(rr.serialString() + "> getIMSI: " + requestToString(rr.mRequest) + " aid: " + aid); send(rr); } Loading Loading @@ -1435,6 +1445,11 @@ public final class RIL extends BaseCommands implements CommandsInterface { public void iccIO (int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, Message result) { iccIOForApp(command, fileid, path, p1, p2, p3, data, pin2, null, result); } public void iccIOForApp (int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, String aid, Message result) { //Note: This RIL request has not been renamed to ICC, // but this request is also valid for SIM and RUIM RILRequest rr Loading @@ -1448,12 +1463,15 @@ public final class RIL extends BaseCommands implements CommandsInterface { rr.mp.writeInt(p3); rr.mp.writeString(data); rr.mp.writeString(pin2); rr.mp.writeString(aid); if (RILJ_LOGD) riljLog(rr.serialString() + "> iccIO: " + requestToString(rr.mRequest) if (RILJ_LOGD) riljLog(rr.serialString() + "> iccIO: " + requestToString(rr.mRequest) + " 0x" + Integer.toHexString(command) + " 0x" + Integer.toHexString(fileid) + " " + " path: " + path + "," + p1 + "," + p2 + "," + p3); + p1 + "," + p2 + "," + p3 + " aid: " + aid); send(rr); } Loading telephony/java/com/android/internal/telephony/cdma/CdmaLteUiccFileHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -55,8 +55,8 @@ public final class CdmaLteUiccFileHandler extends IccFileHandler { if (fileid == EF_CSIM_EPRL) { // Entire PRL could be huge. We are only interested in // the first 4 bytes of the record. phone.mCM.iccIO(COMMAND_READ_BINARY, fileid, getEFPath(fileid), 0, 0, 4, null, null, phone.mCM.iccIOForApp(COMMAND_READ_BINARY, fileid, getEFPath(fileid), 0, 0, 4, null, null, phone.getIccCard().getAid(), obtainMessage(EVENT_READ_BINARY_DONE, fileid, 0, onLoaded)); } else { Loading Loading
telephony/java/com/android/internal/telephony/CommandsInterface.java +17 −0 Original line number Diff line number Diff line Loading @@ -754,6 +754,15 @@ public interface CommandsInterface { */ void getIMSI(Message result); /** * returned message * retMsg.obj = AsyncResult ar * ar.exception carries exception on failure * ar.userObject contains the orignal value of result.obj * ar.result is String containing IMSI on success */ void getIMSIForApp(String aid, Message result); /** * returned message * retMsg.obj = AsyncResult ar Loading Loading @@ -1049,6 +1058,14 @@ public interface CommandsInterface { void iccIO (int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, Message response); /** * parameters equivalent to 27.007 AT+CRSM command * response.obj will be an AsyncResult * response.obj.userObj will be a IccIoResult on success */ void iccIOForApp (int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, String aid, Message response); /** * (AsyncResult)response.obj).result is an int[] with element [0] set to * 1 for "CLIP is provisioned", and 0 for "CLIP is not provisioned". Loading
telephony/java/com/android/internal/telephony/IccCardStatus.java +1 −1 Original line number Diff line number Diff line Loading @@ -24,7 +24,7 @@ import java.util.ArrayList; * {@hide} */ public class IccCardStatus { static final int CARD_MAX_APPS = 8; public static final int CARD_MAX_APPS = 8; public enum CardState { CARDSTATE_ABSENT, Loading
telephony/java/com/android/internal/telephony/IccFileHandler.java +29 −19 Original line number Diff line number Diff line Loading @@ -145,8 +145,9 @@ public abstract class IccFileHandler extends Handler implements IccConstants { = obtainMessage(EVENT_GET_RECORD_SIZE_DONE, new LoadLinearFixedContext(fileid, recordNum, onLoaded)); phone.mCM.iccIO(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, response); phone.mCM.iccIOForApp(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -164,9 +165,10 @@ public abstract class IccFileHandler extends Handler implements IccConstants { onLoaded)); // TODO(): Verify when path changes are done. phone.mCM.iccIO(COMMAND_GET_RESPONSE, IccConstants.EF_IMG, "img", phone.mCM.iccIOForApp(COMMAND_GET_RESPONSE, IccConstants.EF_IMG, "img", recordNum, READ_RECORD_MODE_ABSOLUTE, GET_RESPONSE_EF_IMG_SIZE_BYTES, null, null, response); GET_RESPONSE_EF_IMG_SIZE_BYTES, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -182,8 +184,9 @@ public abstract class IccFileHandler extends Handler implements IccConstants { Message response = obtainMessage(EVENT_GET_EF_LINEAR_RECORD_SIZE_DONE, new LoadLinearFixedContext(fileid, onLoaded)); phone.mCM.iccIO(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, response); phone.mCM.iccIOForApp(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -199,8 +202,9 @@ public abstract class IccFileHandler extends Handler implements IccConstants { Message response = obtainMessage(EVENT_GET_RECORD_SIZE_DONE, new LoadLinearFixedContext(fileid,onLoaded)); phone.mCM.iccIO(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, response); phone.mCM.iccIOForApp(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -217,8 +221,9 @@ public abstract class IccFileHandler extends Handler implements IccConstants { Message response = obtainMessage(EVENT_GET_BINARY_SIZE_DONE, fileid, 0, onLoaded); phone.mCM.iccIO(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, response); phone.mCM.iccIOForApp(COMMAND_GET_RESPONSE, fileid, getEFPath(fileid), 0, 0, GET_RESPONSE_EF_SIZE_BYTES, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -236,8 +241,8 @@ public abstract class IccFileHandler extends Handler implements IccConstants { Message response = obtainMessage(EVENT_READ_ICON_DONE, fileid, 0, onLoaded); phone.mCM.iccIO(COMMAND_READ_BINARY, fileid, "img", highOffset, lowOffset, length, null, null, response); phone.mCM.iccIOForApp(COMMAND_READ_BINARY, fileid, "img", highOffset, lowOffset, length, null, null, phone.getIccCard().getAid(), response); } /** Loading @@ -251,9 +256,10 @@ public abstract class IccFileHandler extends Handler implements IccConstants { */ public void updateEFLinearFixed(int fileid, int recordNum, byte[] data, String pin2, Message onComplete) { phone.mCM.iccIO(COMMAND_UPDATE_RECORD, fileid, getEFPath(fileid), phone.mCM.iccIOForApp(COMMAND_UPDATE_RECORD, fileid, getEFPath(fileid), recordNum, READ_RECORD_MODE_ABSOLUTE, data.length, IccUtils.bytesToHexString(data), pin2, onComplete); IccUtils.bytesToHexString(data), pin2, phone.getIccCard().getAid(), onComplete); } /** Loading @@ -262,9 +268,10 @@ public abstract class IccFileHandler extends Handler implements IccConstants { * @param data must be exactly as long as the EF */ public void updateEFTransparent(int fileid, byte[] data, Message onComplete) { phone.mCM.iccIO(COMMAND_UPDATE_BINARY, fileid, getEFPath(fileid), phone.mCM.iccIOForApp(COMMAND_UPDATE_BINARY, fileid, getEFPath(fileid), 0, 0, data.length, IccUtils.bytesToHexString(data), null, onComplete); IccUtils.bytesToHexString(data), null, phone.getIccCard().getAid(), onComplete); } Loading Loading @@ -395,10 +402,11 @@ public abstract class IccFileHandler extends Handler implements IccConstants { lc.results = new ArrayList<byte[]>(lc.countRecords); } phone.mCM.iccIO(COMMAND_READ_RECORD, lc.efid, getEFPath(lc.efid), phone.mCM.iccIOForApp(COMMAND_READ_RECORD, lc.efid, getEFPath(lc.efid), lc.recordNum, READ_RECORD_MODE_ABSOLUTE, lc.recordSize, null, null, phone.getIccCard().getAid(), obtainMessage(EVENT_READ_RECORD_DONE, lc)); break; case EVENT_GET_BINARY_SIZE_DONE: Loading Loading @@ -433,8 +441,9 @@ public abstract class IccFileHandler extends Handler implements IccConstants { size = ((data[RESPONSE_DATA_FILE_SIZE_1] & 0xff) << 8) + (data[RESPONSE_DATA_FILE_SIZE_2] & 0xff); phone.mCM.iccIO(COMMAND_READ_BINARY, fileid, getEFPath(fileid), phone.mCM.iccIOForApp(COMMAND_READ_BINARY, fileid, getEFPath(fileid), 0, 0, size, null, null, phone.getIccCard().getAid(), obtainMessage(EVENT_READ_BINARY_DONE, fileid, 0, response)); break; Loading Loading @@ -468,10 +477,11 @@ public abstract class IccFileHandler extends Handler implements IccConstants { if (lc.recordNum > lc.countRecords) { sendResult(response, lc.results, null); } else { phone.mCM.iccIO(COMMAND_READ_RECORD, lc.efid, getEFPath(lc.efid), phone.mCM.iccIOForApp(COMMAND_READ_RECORD, lc.efid, getEFPath(lc.efid), lc.recordNum, READ_RECORD_MODE_ABSOLUTE, lc.recordSize, null, null, phone.getIccCard().getAid(), obtainMessage(EVENT_READ_RECORD_DONE, lc)); } } Loading
telephony/java/com/android/internal/telephony/RIL.java +21 −3 Original line number Diff line number Diff line Loading @@ -880,9 +880,19 @@ public final class RIL extends BaseCommands implements CommandsInterface { public void getIMSI(Message result) { getIMSIForApp(null, result); } public void getIMSIForApp(String aid, Message result) { RILRequest rr = RILRequest.obtain(RIL_REQUEST_GET_IMSI, result); if (RILJ_LOGD) riljLog(rr.serialString() + "> " + requestToString(rr.mRequest)); rr.mp.writeInt(1); rr.mp.writeString(aid); if (RILJ_LOGD) riljLog(rr.serialString() + "> getIMSI: " + requestToString(rr.mRequest) + " aid: " + aid); send(rr); } Loading Loading @@ -1435,6 +1445,11 @@ public final class RIL extends BaseCommands implements CommandsInterface { public void iccIO (int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, Message result) { iccIOForApp(command, fileid, path, p1, p2, p3, data, pin2, null, result); } public void iccIOForApp (int command, int fileid, String path, int p1, int p2, int p3, String data, String pin2, String aid, Message result) { //Note: This RIL request has not been renamed to ICC, // but this request is also valid for SIM and RUIM RILRequest rr Loading @@ -1448,12 +1463,15 @@ public final class RIL extends BaseCommands implements CommandsInterface { rr.mp.writeInt(p3); rr.mp.writeString(data); rr.mp.writeString(pin2); rr.mp.writeString(aid); if (RILJ_LOGD) riljLog(rr.serialString() + "> iccIO: " + requestToString(rr.mRequest) if (RILJ_LOGD) riljLog(rr.serialString() + "> iccIO: " + requestToString(rr.mRequest) + " 0x" + Integer.toHexString(command) + " 0x" + Integer.toHexString(fileid) + " " + " path: " + path + "," + p1 + "," + p2 + "," + p3); + p1 + "," + p2 + "," + p3 + " aid: " + aid); send(rr); } Loading
telephony/java/com/android/internal/telephony/cdma/CdmaLteUiccFileHandler.java +2 −2 Original line number Diff line number Diff line Loading @@ -55,8 +55,8 @@ public final class CdmaLteUiccFileHandler extends IccFileHandler { if (fileid == EF_CSIM_EPRL) { // Entire PRL could be huge. We are only interested in // the first 4 bytes of the record. phone.mCM.iccIO(COMMAND_READ_BINARY, fileid, getEFPath(fileid), 0, 0, 4, null, null, phone.mCM.iccIOForApp(COMMAND_READ_BINARY, fileid, getEFPath(fileid), 0, 0, 4, null, null, phone.getIccCard().getAid(), obtainMessage(EVENT_READ_BINARY_DONE, fileid, 0, onLoaded)); } else { Loading