开发学院手机开发Android 开发 Android 测试工具类 阅读

Android 测试工具类

 2010-02-09 03:51:00 来源:WEB开发网   
核心提示:int simState = telMgr.getSimState();String simStateString = "NA";switch (simState) {case TelephonyManager.SIM_STATE_ABSENT:simStateString = "ABSE

int simState = telMgr.getSimState();

String simStateString = "NA";

switch (simState) {

case TelephonyManager.SIM_STATE_ABSENT:

simStateString = "ABSENT";

break;

case TelephonyManager.SIM_STATE_NETWORK_LOCKED:

simStateString = "NETWORK_LOCKED";

break;

case TelephonyManager.SIM_STATE_PIN_REQUIRED:

simStateString = "PIN_REQUIRED";

break;

case TelephonyManager.SIM_STATE_PUK_REQUIRED:

simStateString = "PUK_REQUIRED";

break;

case TelephonyManager.SIM_STATE_READY:

simStateString = "STATE_READY";

break;

case TelephonyManager.SIM_STATE_UNKNOWN:

simStateString = "STATE_UNKNOWN";

break;

}

StringBuilder sb = new StringBuilder();

sb.append("telMgr - ");

sb.append(" callState = " + callStateString);

sb.append(" cellLocationString = " + cellLocationString);

sb.append(" deviceId = " + deviceId);

sb.append(" deviceSoftwareVersion = " + deviceSoftwareVersion);

sb.append(" line1Number = " + line1Number);

sb.append(" networkCountryIso = " + networkCountryIso);

sb.append(" networkOperator = " + networkOperator);

sb.append(" networkOperatorName = " + networkOperatorName);

sb.append(" phoneTypeString = " + phoneTypeString);

sb.append(" simCountryIso = " + simCountryIso);

sb.append(" simOperator = " + simOperator);

sb.append(" simOperatorName = " + simOperatorName);

sb.append(" simSerialNumber = " + simSerialNumber);

sb.append(" simSubscriberId = " + simSubscriberId);

sb.append(" simStateString = " + simStateString);

return sb.toString();

}

}

上一页  1 2 3 

Tags:Android工具

编辑录入:coldstar [复制链接] [打 印]
[]
  • 好
  • 好的评价 如果觉得好,就请您
      0%(0)
  • 差
  • 差的评价 如果觉得差,就请您
      100%(1)
赞助商链接