//Alex 初始化 TelephonyManager
mTelephonyManager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);
//Alex
public int GetSimState(){
int simState = mTelephonyManager.getSimState();
return simState;
}
ChatContentsAdapter
//Alex
if(GexinMainActivity.getInstance().GetSimState()==TelephonyManager.SIM_STATE_READY)
msgState.setEnabled(true);
else
msgState.setEnabled(false);