endCall
来源:互联网 发布:0基础学美工 编辑:程序博客网 时间:2024/05/01 23:15
package com.android.internal.telephony;
import android.os.Bundle;
import java.util.List;
/**
* Interface used to interact with the phone. Mostly this is used by the
* TelephonyManager class. A few places are still using this directly.
* Please clean them up if possible and use TelephonyManager insteadl.
*
* {@hide}
*/
interface ITelephony {
/**
* End call or go to the Home screen
*
* @return whether it hung up
*/
boolean endCall();
}
------------------------------------------------------------------
private void endCall() {
// IBinder biner = (IBinder) getSystemService(Context.TELEPHONY_SERVICE);try {
Class clazz = BlockService.class.getClassLoader().loadClass("android.os.ServiceManager");
Method getService = clazz.getDeclaredMethod("getService", String.class);
IBinder binder = (IBinder) getService.invoke(null, Context.TELEPHONY_SERVICE);
ITelephony itm = ITelephony.Stub.asInterface(binder);
itm.endCall();
Log.d(TAG, "Itm :" + itm);
} catch (ClassNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (NoSuchMethodException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalAccessException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IllegalArgumentException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (InvocationTargetException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (RemoteException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
}
0 0
- endCall
- Android调用ITelephony类的endCall()方法
- Android调用ITelephony类的endCall()方法
- Android调用ITelephony类的endCall()方法 【转】
- Android调用ITelephony类的endCall()方法 【转】
- 调用ITelephony的endCall( )方法自动挂断电话
- 利用JAVA反射机制调用ITelephony的endCall()结束通话
- android黑名单挂断电话(endCall)反射方法获取
- Android调用ITelephony类的endCall()方法 实现来电拒接
- Android4.0中修改挂断键(ENDCALL)的默认行为
- 安卓数据持久化工具类总结
- c#如何实现从xml中加载树目录,并且显示完整的Text
- JAVA和C++比较之我见
- JAVA菜鸟入门(4) Int vs Integer
- 静态语言和动态语言的概念和区别
- endCall
- CRC8 CRC16 查表法
- 数组到序存放再输出
- MFC 消息种类
- 理解变量在内存的存储原理
- 编译test代码
- 位图索引
- Methods
- Xcode中SVN不能提交.a文件的解决方法