1
我正在尝试开发基本代码来阻止Android中的调用。我的代码最初工作,但现在不是。Android中的块调用
代码块的所有调用
@Override
public void onReceive(Context context, Intent intent) {
// TODO Auto-generated method stub
tm = (TelephonyManager) context
.getSystemService(Context.TELEPHONY_SERVICE);
try {
Class<?> c = Class.forName(tm.getClass().getName());
Method m = c.getDeclaredMethod("getITelephony");
m.setAccessible(true);
ITelephony是所使用的接口
telephony = (ITelephony) m.invoke(tm);
不能调用任何可用的功能
telephony.endCall();
telephony.notifyAll();
} catch (Exception e) {
// TODO: handle exception
}
}