public static int getVoiceNetworkType (ServiceState serviceState)
{
Method m = null;
try {
// Java reflection to gain access to TelephonyManager's
// ITelephony getter
Class c = Class.forName(serviceState.getClass().getName());
Method mI = c.getDeclaredMethod("getRilVoiceRadioTechnology");
mI.setAccessible(true);
int voiceTechRil = (Integer)mI.invoke(serviceState);
int voiceTech = PhoneState.rilRadioTechnologyToNetworkType(voiceTechRil);
return voiceTech;
}
catch (Exception e)
{
String s = e.toString();
//LoggerUtil.logToFile(LoggerUtil.Level.ERROR, TAG, "getVoiceNetworkType", "exception", e);
}
return -1;
}
PhoneState.java 文件源码
java
阅读 24
收藏 0
点赞 0
评论 0
项目:android-QoS
作者:
评论列表
文章目录