public abstract class IccFileHandler extends Handler implements IccConstants
Handler.Callback
Modifier and Type | Field and Description |
---|---|
protected static int |
COMMAND_GET_RESPONSE |
protected static int |
COMMAND_READ_BINARY |
protected static int |
COMMAND_READ_RECORD |
protected static int |
COMMAND_SEEK |
protected static int |
COMMAND_UPDATE_BINARY |
protected static int |
COMMAND_UPDATE_RECORD |
protected static int |
EF_TYPE_CYCLIC |
protected static int |
EF_TYPE_LINEAR_FIXED |
protected static int |
EF_TYPE_TRANSPARENT |
protected static int |
EVENT_GET_BINARY_SIZE_DONE
Finished retrieving size of transparent EF; start loading.
|
protected static int |
EVENT_GET_EF_LINEAR_RECORD_SIZE_DONE
Finished retrieving record size; post result.
|
protected static int |
EVENT_GET_RECORD_SIZE_DONE
Finished retrieving size of records for linear-fixed EF; now load.
|
protected static int |
EVENT_GET_RECORD_SIZE_IMG_DONE
Finished retrieving size of record for EFimg now.
|
protected static int |
EVENT_READ_BINARY_DONE
Finished loading contents of transparent EF; post result.
|
protected static int |
EVENT_READ_ICON_DONE
Finished retrieving icon data; post result.
|
protected static int |
EVENT_READ_IMG_DONE
Finished retrieving image instance record; post result.
|
protected static int |
EVENT_READ_RECORD_DONE
Finished loading single record from a linear-fixed EF; post result.
|
protected static int |
GET_RESPONSE_EF_IMG_SIZE_BYTES |
protected static int |
GET_RESPONSE_EF_SIZE_BYTES |
protected String |
mAid |
protected CommandsInterface |
mCi |
protected UiccCardApplication |
mParentApp |
protected static int |
READ_RECORD_MODE_ABSOLUTE |
protected static int |
RESPONSE_DATA_ACCESS_CONDITION_1 |
protected static int |
RESPONSE_DATA_ACCESS_CONDITION_2 |
protected static int |
RESPONSE_DATA_ACCESS_CONDITION_3 |
protected static int |
RESPONSE_DATA_FILE_ID_1 |
protected static int |
RESPONSE_DATA_FILE_ID_2 |
protected static int |
RESPONSE_DATA_FILE_SIZE_1 |
protected static int |
RESPONSE_DATA_FILE_SIZE_2 |
protected static int |
RESPONSE_DATA_FILE_STATUS |
protected static int |
RESPONSE_DATA_FILE_TYPE |
protected static int |
RESPONSE_DATA_LENGTH |
protected static int |
RESPONSE_DATA_RECORD_LENGTH |
protected static int |
RESPONSE_DATA_RFU_1 |
protected static int |
RESPONSE_DATA_RFU_2 |
protected static int |
RESPONSE_DATA_RFU_3 |
protected static int |
RESPONSE_DATA_STRUCTURE |
protected static int |
TYPE_DF |
protected static int |
TYPE_EF |
protected static int |
TYPE_MF |
protected static int |
TYPE_RFU |
CDMA_SMS_RECORD_LENGTH, DF_ADF, DF_CDMA, DF_GRAPHICS, DF_GSM, DF_PHONEBOOK, DF_TELECOM, EF_AD, EF_ADN, EF_CFF_CPHS, EF_CFIS, EF_CSIM_CDMAHOME, EF_CSIM_EPRL, EF_CSIM_IMSIM, EF_CSIM_LI, EF_CSIM_MDN, EF_CSIM_MIPUPP, EF_CSIM_SPN, EF_CSP_CPHS, EF_CST, EF_DOMAIN, EF_EXT1, EF_EXT2, EF_EXT3, EF_EXT5, EF_EXT6, EF_FDN, EF_GID1, EF_GID2, EF_ICCID, EF_IMG, EF_IMPI, EF_IMPU, EF_INFO_CPHS, EF_IST, EF_LI, EF_MAILBOX_CPHS, EF_MBDN, EF_MBI, EF_MSISDN, EF_MWIS, EF_OPL, EF_PBR, EF_PCSCF, EF_PL, EF_PNN, EF_PSI, EF_RUIM_SPN, EF_SDN, EF_SMS, EF_SPDI, EF_SPN, EF_SPN_CPHS, EF_SPN_SHORT_CPHS, EF_SST, EF_VOICE_MAIL_INDICATOR_CPHS, MF_SIM, SMS_RECORD_LENGTH
Modifier | Constructor and Description |
---|---|
protected |
IccFileHandler(UiccCardApplication app,
String aid,
CommandsInterface ci)
Default constructor
|
Modifier and Type | Method and Description |
---|---|
void |
dispose() |
protected String |
getCommonIccEFPath(int efid)
Returns the root path of the EF file.
|
void |
getEFLinearRecordSize(int fileid,
Message onLoaded)
get record size for a linear fixed EF
|
void |
getEFLinearRecordSize(int fileid,
String path,
Message onLoaded)
get record size for a linear fixed EF
|
protected abstract String |
getEFPath(int efid) |
void |
handleMessage(Message msg)
Subclasses must implement this to receive messages.
|
void |
loadEFImgLinearFixed(int recordNum,
Message onLoaded)
Load a image instance record from a SIM Linear Fixed EF-IMG
|
void |
loadEFImgTransparent(int fileid,
int highOffset,
int lowOffset,
int length,
Message onLoaded)
Load a SIM Transparent EF-IMG.
|
void |
loadEFLinearFixed(int fileid,
int recordNum,
Message onLoaded)
Load a record from a SIM Linear Fixed EF
|
void |
loadEFLinearFixed(int fileid,
String path,
int recordNum,
Message onLoaded)
Load a record from a SIM Linear Fixed EF
|
void |
loadEFLinearFixedAll(int fileid,
Message onLoaded)
Load all records from a SIM Linear Fixed EF
|
void |
loadEFLinearFixedAll(int fileid,
String path,
Message onLoaded)
Load all records from a SIM Linear Fixed EF
|
void |
loadEFTransparent(int fileid,
int size,
Message onLoaded)
Load first @size bytes from SIM Transparent EF
|
void |
loadEFTransparent(int fileid,
Message onLoaded)
Load a SIM Transparent EF
|
protected abstract void |
logd(String s) |
protected abstract void |
loge(String s) |
void |
updateEFLinearFixed(int fileid,
int recordNum,
byte[] data,
String pin2,
Message onComplete)
Update a record in a linear fixed EF
|
void |
updateEFLinearFixed(int fileid,
String path,
int recordNum,
byte[] data,
String pin2,
Message onComplete)
Update a record in a linear fixed EF
|
void |
updateEFTransparent(int fileid,
byte[] data,
Message onComplete)
Update a transparent EF
|
dispatchMessage, dump, getLooper, getMessageName, getTraceName, hasCallbacks, hasMessages, hasMessages, obtainMessage, obtainMessage, obtainMessage, obtainMessage, obtainMessage, post, postAtFrontOfQueue, postAtTime, postAtTime, postDelayed, removeCallbacks, removeCallbacks, removeCallbacksAndMessages, removeMessages, removeMessages, runWithScissors, sendEmptyMessage, sendEmptyMessageAtTime, sendEmptyMessageDelayed, sendMessage, sendMessageAtFrontOfQueue, sendMessageAtTime, sendMessageDelayed, toString
protected static final int COMMAND_READ_BINARY
protected static final int COMMAND_UPDATE_BINARY
protected static final int COMMAND_READ_RECORD
protected static final int COMMAND_UPDATE_RECORD
protected static final int COMMAND_SEEK
protected static final int COMMAND_GET_RESPONSE
protected static final int READ_RECORD_MODE_ABSOLUTE
protected static final int EF_TYPE_TRANSPARENT
protected static final int EF_TYPE_LINEAR_FIXED
protected static final int EF_TYPE_CYCLIC
protected static final int TYPE_RFU
protected static final int TYPE_MF
protected static final int TYPE_DF
protected static final int TYPE_EF
protected static final int GET_RESPONSE_EF_SIZE_BYTES
protected static final int GET_RESPONSE_EF_IMG_SIZE_BYTES
protected static final int RESPONSE_DATA_RFU_1
protected static final int RESPONSE_DATA_RFU_2
protected static final int RESPONSE_DATA_FILE_SIZE_1
protected static final int RESPONSE_DATA_FILE_SIZE_2
protected static final int RESPONSE_DATA_FILE_ID_1
protected static final int RESPONSE_DATA_FILE_ID_2
protected static final int RESPONSE_DATA_FILE_TYPE
protected static final int RESPONSE_DATA_RFU_3
protected static final int RESPONSE_DATA_ACCESS_CONDITION_1
protected static final int RESPONSE_DATA_ACCESS_CONDITION_2
protected static final int RESPONSE_DATA_ACCESS_CONDITION_3
protected static final int RESPONSE_DATA_FILE_STATUS
protected static final int RESPONSE_DATA_LENGTH
protected static final int RESPONSE_DATA_STRUCTURE
protected static final int RESPONSE_DATA_RECORD_LENGTH
protected static final int EVENT_GET_BINARY_SIZE_DONE
protected static final int EVENT_READ_BINARY_DONE
protected static final int EVENT_GET_RECORD_SIZE_DONE
protected static final int EVENT_READ_RECORD_DONE
protected static final int EVENT_GET_EF_LINEAR_RECORD_SIZE_DONE
protected static final int EVENT_READ_IMG_DONE
protected static final int EVENT_READ_ICON_DONE
protected static final int EVENT_GET_RECORD_SIZE_IMG_DONE
protected final CommandsInterface mCi
protected final UiccCardApplication mParentApp
protected final String mAid
protected IccFileHandler(UiccCardApplication app, String aid, CommandsInterface ci)
public void dispose()
public void loadEFLinearFixed(int fileid, String path, int recordNum, Message onLoaded)
fileid
- EF idpath
- Path of the EF on the cardrecordNum
- 1-based (not 0-based) record numberonLoaded
- ((AsyncResult)(onLoaded.obj)).result is the byte[]public void loadEFLinearFixed(int fileid, int recordNum, Message onLoaded)
fileid
- EF idrecordNum
- 1-based (not 0-based) record numberonLoaded
- ((AsyncResult)(onLoaded.obj)).result is the byte[]public void loadEFImgLinearFixed(int recordNum, Message onLoaded)
recordNum
- 1-based (not 0-based) record numberonLoaded
- ((AsyncResult)(onLoaded.obj)).result is the byte[]public void getEFLinearRecordSize(int fileid, String path, Message onLoaded)
fileid
- EF idpath
- Path of the EF on the cardonLoaded
- ((AsnyncResult)(onLoaded.obj)).result is the recordSize[]
int[0] is the record length int[1] is the total length of the EF
file int[3] is the number of records in the EF file So int[0] *
int[3] = int[1]public void getEFLinearRecordSize(int fileid, Message onLoaded)
fileid
- EF idonLoaded
- ((AsnyncResult)(onLoaded.obj)).result is the recordSize[]
int[0] is the record length int[1] is the total length of the EF
file int[3] is the number of records in the EF file So int[0] *
int[3] = int[1]public void loadEFLinearFixedAll(int fileid, String path, Message onLoaded)
fileid
- EF idpath
- Path of the EF on the cardonLoaded
- ((AsyncResult)(onLoaded.obj)).result is an ArrayListpublic void loadEFLinearFixedAll(int fileid, Message onLoaded)
fileid
- EF idonLoaded
- ((AsyncResult)(onLoaded.obj)).result is an ArrayListpublic void loadEFTransparent(int fileid, Message onLoaded)
fileid
- EF idonLoaded
- ((AsyncResult)(onLoaded.obj)).result is the byte[]public void loadEFTransparent(int fileid, int size, Message onLoaded)
fileid
- EF idsize
- onLoaded
- ((AsyncResult)(onLoaded.obj)).result is the byte[]public void loadEFImgTransparent(int fileid, int highOffset, int lowOffset, int length, Message onLoaded)
fileid
- EF idonLoaded
- ((AsyncResult)(onLoaded.obj)).result is the byte[]public void updateEFLinearFixed(int fileid, String path, int recordNum, byte[] data, String pin2, Message onComplete)
fileid
- EF idpath
- Path of the EF on the cardrecordNum
- 1-based (not 0-based) record numberdata
- must be exactly as long as the record in the EFpin2
- for CHV2 operations, otherwist must be nullonComplete
- onComplete.obj will be an AsyncResult
onComplete.obj.userObj will be a IccIoResult on successpublic void updateEFLinearFixed(int fileid, int recordNum, byte[] data, String pin2, Message onComplete)
fileid
- EF idrecordNum
- 1-based (not 0-based) record numberdata
- must be exactly as long as the record in the EFpin2
- for CHV2 operations, otherwist must be nullonComplete
- onComplete.obj will be an AsyncResult
onComplete.obj.userObj will be a IccIoResult on successpublic void updateEFTransparent(int fileid, byte[] data, Message onComplete)
fileid
- EF iddata
- must be exactly as long as the EFpublic void handleMessage(Message msg)
Handler
handleMessage
in class Handler
protected String getCommonIccEFPath(int efid)
efid
- of path to retrieveprotected abstract String getEFPath(int efid)
protected abstract void logd(String s)
protected abstract void loge(String s)