public class SIMRecords extends IccRecords
IccRecords.IccRecordLoaded
Handler.Callback
Modifier and Type | Field and Description |
---|---|
protected static int |
EVENT_GET_AD_DONE |
protected static int |
EVENT_GET_MSISDN_DONE |
protected static int |
EVENT_GET_SST_DONE |
protected static String |
LOG_TAG |
CALL_FORWARDING_STATUS_DISABLED, CALL_FORWARDING_STATUS_ENABLED, CALL_FORWARDING_STATUS_UNKNOWN, DBG, EVENT_APP_READY, EVENT_CFI, EVENT_GET_ICC_RECORD_DONE, EVENT_MWI, EVENT_SET_MSISDN_DONE, EVENT_SPN, mAdnCache, mCi, mContext, mDestroyed, mFh, mFullIccId, mGid1, mGid2, mIccId, mImsi, mImsiReadyRegistrants, mIsVoiceMailFixed, mMailboxIndex, mMncLength, mMsisdn, mMsisdnTag, mNetworkSelectionModeAutomaticRegistrants, mNewMsisdn, mNewMsisdnTag, mNewSmsRegistrants, mNewVoiceMailNum, mNewVoiceMailTag, mParentApp, mPrefLang, mRecordsEventsRegistrants, mRecordsLoadedRegistrants, mRecordsRequested, mRecordsToLoad, mTelephonyManager, mVoiceMailNum, mVoiceMailTag, SPN_RULE_SHOW_PLMN, SPN_RULE_SHOW_SPN, UNINITIALIZED, UNKNOWN, VDBG
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
Constructor and Description |
---|
SIMRecords(UiccCardApplication app,
Context c,
CommandsInterface ci) |
Modifier and Type | Method and Description |
---|---|
void |
dispose()
Call when the IccRecords object is no longer going to be used.
|
void |
dump(FileDescriptor fd,
PrintWriter pw,
String[] args) |
protected void |
fetchSimRecords() |
protected void |
finalize()
Called by the garbage collector on an object when garbage collection
determines that there are no more references to the object.
|
int |
getDisplayRule(String plmn)
Returns the SpnDisplayRule based on settings on the SIM and the
specified plmn (currently-registered PLMN).
|
String |
getGid1()
Get the Group Identifier Level 1 (GID1) on a SIM for GSM.
|
String |
getGid2()
Get the Group Identifier Level 2 (GID2) on a SIM.
|
String |
getIMSI()
Get the International Mobile Subscriber ID (IMSI) on a SIM
for GSM, UMTS and like networks.
|
String |
getMsisdnAlphaTag() |
String |
getMsisdnNumber() |
String |
getOperatorNumeric()
Returns the 5 or 6 digit MCC/MNC of the operator that
provided the SIM card.
|
UsimServiceTable |
getUsimServiceTable() |
int |
getVoiceCallForwardingFlag()
Get the current Voice call forwarding flag for GSM/UMTS and the like SIMs
|
String |
getVoiceMailAlphaTag() |
String |
getVoiceMailNumber() |
int |
getVoiceMessageCount()
Called by GsmCdmaPhone to update VoiceMail count
|
void |
handleMessage(Message msg)
Subclasses must implement this to receive messages.
|
boolean |
isCspPlmnEnabled()
Return true if "Restriction of menu options for manual PLMN selection"
bit is set or EF_CSP data is unavailable, return false otherwise.
|
protected void |
log(String s)
Write string to log file
|
protected void |
loge(String s)
Write error string to log file.
|
protected void |
logv(String s) |
protected void |
logw(String s,
Throwable tr) |
protected void |
onAllRecordsLoaded() |
void |
onReady() |
protected void |
onRecordLoaded() |
void |
onRefresh(boolean fileChanged,
int[] fileList)
Called by STK Service when REFRESH is received.
|
protected void |
resetRecords() |
void |
setMsisdnNumber(String alphaTag,
String number,
Message onComplete)
Set subscriber number to SIM record
The subscriber number is stored in EF_MSISDN (TS 51.011)
When the operation is complete, onComplete will be sent to its handler
|
void |
setVoiceCallForwardingFlag(int line,
boolean enable,
String dialNumber)
Set the voice call forwarding flag for GSM/UMTS and the like SIMs
|
void |
setVoiceMailNumber(String alphaTag,
String voiceNumber,
Message onComplete)
Set voice mail number to SIM record
The voice mail number can be stored either in EF_MBDN (TS 51.011) or
EF_MAILBOX_CPHS (CPHS 4.2)
If EF_MBDN is available, store the voice mail number to EF_MBDN
If EF_MAILBOX_CPHS is enabled, store the voice mail number to EF_CHPS
So the voice mail number will be stored in both EFs if both are available
Return error only if both EF_MBDN and EF_MAILBOX_CPHS fail.
|
void |
setVoiceMessageWaiting(int line,
int countWaiting)
Sets the SIM voice message waiting indicator records
|
String |
toString()
Returns a string representation of the object.
|
findBestLanguage, getAdnCache, getFullIccId, getIccId, getIccSimChallengeResponse, getIsimRecords, getNAI, getRecordsLoaded, getServiceProviderName, getSimLanguage, isProvisioned, onIccRefreshInit, registerForImsiReady, registerForNetworkSelectionModeAutomatic, registerForNewSms, registerForRecordsEvents, registerForRecordsLoaded, setImsi, setServiceProviderName, setSimLanguage, setSystemProperty, unregisterForImsiReady, unregisterForNetworkSelectionModeAutomatic, unregisterForNewSms, unregisterForRecordsEvents, unregisterForRecordsLoaded
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
protected static final String LOG_TAG
protected static final int EVENT_GET_AD_DONE
protected static final int EVENT_GET_MSISDN_DONE
protected static final int EVENT_GET_SST_DONE
public SIMRecords(UiccCardApplication app, Context c, CommandsInterface ci)
public String toString()
Object
toString
method returns a string that
"textually represents" this object. The result should
be a concise but informative representation that is easy for a
person to read.
It is recommended that all subclasses override this method.
The toString
method for class Object
returns a string consisting of the name of the class of which the
object is an instance, the at-sign character `@
', and
the unsigned hexadecimal representation of the hash code of the
object. In other words, this method returns a string equal to the
value of:
getClass().getName() + '@' + Integer.toHexString(hashCode())
toString
in class IccRecords
public void dispose()
IccRecords
dispose
in class IccRecords
protected void finalize()
Object
finalize
method to dispose of
system resources or to perform other cleanup.
The general contract of finalize
is that it is invoked
if and when the JavaTM virtual
machine has determined that there is no longer any
means by which this object can be accessed by any thread that has
not yet died, except as a result of an action taken by the
finalization of some other object or class which is ready to be
finalized. The finalize
method may take any action, including
making this object available again to other threads; the usual purpose
of finalize
, however, is to perform cleanup actions before
the object is irrevocably discarded. For example, the finalize method
for an object that represents an input/output connection might perform
explicit I/O transactions to break the connection before the object is
permanently discarded.
The finalize
method of class Object
performs no
special action; it simply returns normally. Subclasses of
Object
may override this definition.
The Java programming language does not guarantee which thread will
invoke the finalize
method for any given object. It is
guaranteed, however, that the thread that invokes finalize will not
be holding any user-visible synchronization locks when finalize is
invoked. If an uncaught exception is thrown by the finalize method,
the exception is ignored and finalization of that object terminates.
After the finalize
method has been invoked for an object, no
further action is taken until the Java virtual machine has again
determined that there is no longer any means by which this object can
be accessed by any thread that has not yet died, including possible
actions by other objects or classes which are ready to be finalized,
at which point the object may be discarded.
The finalize
method is never invoked more than once by a Java
virtual machine for any given object.
Any exception thrown by the finalize
method causes
the finalization of this object to be halted, but is otherwise
ignored.
protected void resetRecords()
public String getIMSI()
getIMSI
in class IccRecords
public String getMsisdnNumber()
getMsisdnNumber
in class IccRecords
public String getGid1()
IccRecords
getGid1
in class IccRecords
public String getGid2()
IccRecords
getGid2
in class IccRecords
public UsimServiceTable getUsimServiceTable()
getUsimServiceTable
in class IccRecords
public void setMsisdnNumber(String alphaTag, String number, Message onComplete)
setMsisdnNumber
in class IccRecords
alphaTag
- alpha-tagging of the dailing nubmer (up to 10 characters)number
- dailing nubmer (up to 20 digits)
if the number starts with '+', then set to international TOAonComplete
- onComplete.obj will be an AsyncResult
((AsyncResult)onComplete.obj).exception == null on success
((AsyncResult)onComplete.obj).exception != null on failpublic String getMsisdnAlphaTag()
getMsisdnAlphaTag
in class IccRecords
public String getVoiceMailNumber()
getVoiceMailNumber
in class IccRecords
public void setVoiceMailNumber(String alphaTag, String voiceNumber, Message onComplete)
setVoiceMailNumber
in class IccRecords
alphaTag
- alpha-tagging of the dailing nubmer (upto 10 characters)voiceNumber
- dailing nubmer (upto 20 digits)
if the number is start with '+', then set to international TOAonComplete
- onComplete.obj will be an AsyncResult
((AsyncResult)onComplete.obj).exception == null on success
((AsyncResult)onComplete.obj).exception != null on failpublic String getVoiceMailAlphaTag()
getVoiceMailAlphaTag
in class IccRecords
public void setVoiceMessageWaiting(int line, int countWaiting)
setVoiceMessageWaiting
in class IccRecords
line
- GSM Subscriber Profile Number, one-based. Only '1' is supportedcountWaiting
- The number of messages waiting, if known. Use
-1 to indicate that an unknown number of
messages are waitingpublic int getVoiceMessageCount()
IccRecords
getVoiceMessageCount
in class IccRecords
public int getVoiceCallForwardingFlag()
getVoiceCallForwardingFlag
in class IccRecords
public void setVoiceCallForwardingFlag(int line, boolean enable, String dialNumber)
setVoiceCallForwardingFlag
in class IccRecords
line
- to enable/disabledialNumber
- to which CFU is enabledpublic void onRefresh(boolean fileChanged, int[] fileList)
onRefresh
in class IccRecords
fileChanged
- indicates whether any files changedfileList
- if non-null, a list of EF files that changedpublic String getOperatorNumeric()
getOperatorNumeric
in class IccRecords
public void handleMessage(Message msg)
Handler
handleMessage
in class IccRecords
protected void onRecordLoaded()
onRecordLoaded
in class IccRecords
protected void onAllRecordsLoaded()
onAllRecordsLoaded
in class IccRecords
public void onReady()
onReady
in class IccRecords
protected void fetchSimRecords()
public int getDisplayRule(String plmn)
getDisplayRule
in class IccRecords
protected void log(String s)
IccRecords
log
in class IccRecords
s
- is the string to writeprotected void loge(String s)
IccRecords
loge
in class IccRecords
s
- is the string to writeprotected void logv(String s)
public boolean isCspPlmnEnabled()
isCspPlmnEnabled
in class IccRecords
public void dump(FileDescriptor fd, PrintWriter pw, String[] args)
dump
in class IccRecords