NDT のダウンロード リンクが見つかりません。ReportScreen.displayNetworkInfo() メソッドを分析したいと考えています。
user244333
質問する
490 次
1 に答える
3
見逃しただけだと思います。リンクはそのページにありますが、ハイパーリンクのテキストは 1 つの小さな単語 (「こちら」) だけであり、ブラウザーによっては目立たない場合があります。
ソースコードへの完全なリンクは次のとおりです。
確認したところ、ReportScreen.java ファイルがあります。
/**
* Displays various network/radio info
*/
public void displayNetworkInfo(){
if(RadioInfo.getSignalLevel(RadioInfo.WAF_3GPP)!=RadioInfo.LEVEL_NO_COVERAGE){
add(new EditField("3GPP Signal Level: ",RadioInfo.getSignalLevel(RadioInfo.WAF_3GPP)+"dBm",255,EditField.READONLY));
add(new SeparatorField());
}
if(RadioInfo.getSignalLevel(RadioInfo.WAF_CDMA)!=RadioInfo.LEVEL_NO_COVERAGE){
add(new EditField("CDMA Signal Level: ",RadioInfo.getSignalLevel(RadioInfo.WAF_CDMA)+"dBm",255,EditField.READONLY));
add(new SeparatorField());
}
if(RadioInfo.getSignalLevel(RadioInfo.WAF_IDEN)!=RadioInfo.LEVEL_NO_COVERAGE){
add(new EditField("iDEN Signal Level: ",RadioInfo.getSignalLevel(RadioInfo.WAF_IDEN)+"dBm",255,EditField.READONLY));
add(new SeparatorField());
}
if(RadioInfo.getSignalLevel(RadioInfo.WAF_WLAN)!=RadioInfo.LEVEL_NO_COVERAGE){
add(new EditField("WLAN Signal Level: ",RadioInfo.getSignalLevel(RadioInfo.WAF_WLAN)+"dBm",255,EditField.READONLY));
add(new SeparatorField());
}
add(new EditField("Network: ",RadioInfo.getCurrentNetworkName(),255,EditField.READONLY));
add(new SeparatorField());
String netType="";
switch(RadioInfo.getNetworkType()){
case RadioInfo.NETWORK_CDMA:
netType="CDMA";
break;
case RadioInfo.NETWORK_GPRS:
netType="GPRS";
break;
case RadioInfo.NETWORK_IDEN:
netType="IDEN";
break;
case RadioInfo.NETWORK_NONE:
netType="NONE";
break;
case RadioInfo.NETWORK_UMTS:
netType="UMTS";
break;
case RadioInfo.NETWORK_802_11:
netType="802.11";
break;
default:
netType="Failed to determine";
}
add(new EditField("Network Type: ",netType,255,EditField.READONLY));
add(new SeparatorField());
int activeWAFS = RadioInfo.getNetworkService();
String services = "";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_DATA)>0)
services+="Data + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_DIRECT_CONNECT)>0)
services+="Direct Connect + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_E911_CALLBACK_MODE)>0)
services+="E911 Callback + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_EDGE)>0)
services+="EDGE + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_EMERGENCY_ONLY)>0)
services+="Emergency Only + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_EVDO)>0 && RadioInfo.getNetworkType()==RadioInfo.NETWORK_CDMA)
services+="EVDO + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_EVDO_ONLY)>0)
services+="EVDO Only + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_GAN)>0)
services+="GAN + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_IN_CITY_ZONE)>0)
services+="City Zone + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_IN_HOME_ZONE)>0)
services+="Home Zone + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_MODEM_MODE_ENABLED)>0)
services+="Modem Mode + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_ROAMING)>0)
services+="Roaming + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_ROAMING_OFF_CAMPUS)>0)
services+="Roaming Off-campus + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_SUPPRESS_ROAMING)>0)
services+="Supress Roaming + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_UMTS)>0)
services+="UMTS + ";
if((activeWAFS & RadioInfo.NETWORK_SERVICE_VOICE)>0)
services+="Voice + ";
if(services.length()>2){
add(new EditField("Network Services: ",services.substring(0,services.length()-2),255,EditField.READONLY));
add(new SeparatorField());
} else{
add(new EditField("Network Services: ","No Service Found",255,EditField.READONLY));
add(new SeparatorField());
}
add(new EditField("PIN: ",Integer.toHexString(DeviceInfo.getDeviceId())+"",255,EditField.READONLY));
add(new SeparatorField());
add(new EditField("Battery: ",DeviceInfo.getBatteryLevel()+"%",255,EditField.READONLY));
add(new SeparatorField());
add(new SeparatorField());
}
于 2012-08-14T07:18:51.953 に答える