FileDocCategorySizeDatePackage
SimCard.javaAPI DocAndroid 1.5 API7785Wed May 06 22:42:00 BST 2009com.android.internal.telephony

SimCard

public interface SimCard
{@hide}

Fields Summary
public static final String
INTENT_KEY_SIM_STATE
public static final String
INTENT_VALUE_SIM_NOT_READY
public static final String
INTENT_VALUE_SIM_ABSENT
public static final String
INTENT_VALUE_SIM_LOCKED
public static final String
INTENT_VALUE_SIM_READY
public static final String
INTENT_VALUE_SIM_IMSI
public static final String
INTENT_VALUE_SIM_LOADED
public static final String
INTENT_KEY_LOCKED_REASON
public static final String
INTENT_VALUE_LOCKED_ON_PIN
public static final String
INTENT_VALUE_LOCKED_ON_PUK
public static final String
INTENT_VALUE_LOCKED_NETWORK
Constructors Summary
Methods Summary
public voidchangeSimFdnPassword(java.lang.String oldPassword, java.lang.String newPassword, android.os.Message onComplete)
Change the sim password used in sim fdn enable When the operation is complete, onComplete will be sent to its handler

param
oldPassword is the old password
param
newPassword is the new password
param
onComplete onComplete.obj will be an AsyncResult ((AsyncResult)onComplete.obj).exception == null on success ((AsyncResult)onComplete.obj).exception != null on fail

public voidchangeSimLockPassword(java.lang.String oldPassword, java.lang.String newPassword, android.os.Message onComplete)
Change the sim password used in sim pin lock When the operation is complete, onComplete will be sent to its handler

param
oldPassword is the old password
param
newPassword is the new password
param
onComplete onComplete.obj will be an AsyncResult ((AsyncResult)onComplete.obj).exception == null on success ((AsyncResult)onComplete.obj).exception != null on fail

public java.lang.StringgetServiceProviderName()
Returns service provider name stored in SIM card. If there is no service provider name associated or the record is not yet available, null will be returned

Please use this value when display Service Provider Name in idle mode

Usage of this provider name in the UI is a common carrier requirement. Also available via Android property "gsm.sim.operator.alpha"

return
Service Provider Name stored in SIM card null if no service provider name associated or the record is not yet available

public booleangetSimFdnEnabled()
Check whether sim fdn (fixed dialing number) is enabled This is a sync call which returns the cached pin enabled state

return
true for sim fdn enabled false for sim fdn disabled

public booleangetSimLockEnabled()
Check whether sim pin lock is enabled This is a sync call which returns the cached pin enabled state

return
true for sim locked enabled false for sim locked disabled

public com.android.internal.telephony.SimCard$StategetState()

public voidregisterForAbsent(android.os.Handler h, int what, java.lang.Object obj)
Notifies handler of any transition into State.ABSENT

public voidregisterForLocked(android.os.Handler h, int what, java.lang.Object obj)
Notifies handler of any transition into State.isPinLocked()

public voidregisterForNetworkLocked(android.os.Handler h, int what, java.lang.Object obj)
Notifies handler of any transition into State.NETWORK_LOCKED

public voidsetSimFdnEnabled(boolean enabled, java.lang.String password, android.os.Message onComplete)
Set the sim fdn enabled or disabled When the operation is complete, onComplete will be sent to its handler

param
enabled "true" for locked "false" for unlocked.
param
password needed to change the sim fdn enable, aka Pin2
param
onComplete onComplete.obj will be an AsyncResult ((AsyncResult)onComplete.obj).exception == null on success ((AsyncResult)onComplete.obj).exception != null on fail

public voidsetSimLockEnabled(boolean enabled, java.lang.String password, android.os.Message onComplete)
Set the sim pin lock enabled or disabled When the operation is complete, onComplete will be sent to its handler

param
enabled "true" for locked "false" for unlocked.
param
password needed to change the sim pin state, aka. Pin1
param
onComplete onComplete.obj will be an AsyncResult ((AsyncResult)onComplete.obj).exception == null on success ((AsyncResult)onComplete.obj).exception != null on fail

public voidsupplyNetworkDepersonalization(java.lang.String pin, android.os.Message onComplete)

public voidsupplyPin(java.lang.String pin, android.os.Message onComplete)
Supply the SIM PIN to the SIM When the operation is complete, onComplete will be sent to it's Handler. onComplete.obj will be an AsyncResult ((AsyncResult)onComplete.obj).exception == null on success ((AsyncResult)onComplete.obj).exception != null on fail If the supplied PIN is incorrect: ((AsyncResult)onComplete.obj).exception != null && ((AsyncResult)onComplete.obj).exception instanceof com.android.internal.telephony.gsm.CommandException) && ((CommandException)(((AsyncResult)onComplete.obj).exception)) .getCommandError() == CommandException.Error.PASSWORD_INCORRECT

public voidsupplyPin2(java.lang.String pin2, android.os.Message onComplete)

public voidsupplyPuk(java.lang.String puk, java.lang.String newPin, android.os.Message onComplete)

public voidsupplyPuk2(java.lang.String puk2, java.lang.String newPin2, android.os.Message onComplete)

public voidunregisterForAbsent(android.os.Handler h)

public voidunregisterForLocked(android.os.Handler h)

public voidunregisterForNetworkLocked(android.os.Handler h)