List of usage examples for android.telephony TelephonyManager SIM_STATE_PIN_REQUIRED
int SIM_STATE_PIN_REQUIRED
To view the source code for android.telephony TelephonyManager SIM_STATE_PIN_REQUIRED.
Click Source Link
From source file:Main.java
/** * Returns a constant indicating the state of the default SIM card. * @param sim_state "getSimState()"//from w ww . j a v a 2 s.c o m */ public static String getSimStateStr(int sim_state) { switch (sim_state) { case TelephonyManager.SIM_STATE_UNKNOWN://0 return "SIM_STATE_UNKNOWN"; case TelephonyManager.SIM_STATE_ABSENT://1 return "SIM_STATE_ABSENT"; case TelephonyManager.SIM_STATE_PIN_REQUIRED://2 return "SIM_STATE_PIN_REQUIRED"; case TelephonyManager.SIM_STATE_PUK_REQUIRED://3 return "SIM_STATE_PUK_REQUIRED"; case TelephonyManager.SIM_STATE_NETWORK_LOCKED://4 return "SIM_STATE_NETWORK_LOCKED"; case TelephonyManager.SIM_STATE_READY://5 return "SIM_STATE_READY"; default: return UNKNOWN; } }
From source file:com.polyvi.xface.extension.telephony.XTelephonyExt.java
/** * sim??/* www.j ava 2 s . c o m*/ * * @param tm * @return */ private boolean checkSimCardState(TelephonyManager tm) { int simState = tm.getSimState(); switch (simState) { case TelephonyManager.SIM_STATE_ABSENT: return false; case TelephonyManager.SIM_STATE_NETWORK_LOCKED: return true; case TelephonyManager.SIM_STATE_PIN_REQUIRED: return true; case TelephonyManager.SIM_STATE_PUK_REQUIRED: return true; case TelephonyManager.SIM_STATE_READY: return true; case TelephonyManager.SIM_STATE_UNKNOWN: return false; default: return false; } }