Android屏蔽通话功能和短信功能
需求开发中,有个要求屏蔽电话功能和短信功能,禁止应用打电话或短信,禁止api开发出的应用打电话或短信。这个约束怎么做呢?
framework/base/core/res/res/values/config.xml.....<!-- Flag indicating whether the current device is "voice capable".If true, this means that the device supports circuit-switched(i.e. voice) phone calls over the telephony network, and isallowed to display the in-call UI while a cellular voice call isactive. This can be overridden to false for "data only" deviceswhich can't make voice calls and don't support any in-call UI.Note: this flag is subtly different from thePackageManager.FEATURE_TELEPHONY system feature, which isavailable on *any* device with a telephony radio, even if thedevice is data-only. --><bool name="config_voice_capable">false</bool> //禁止通话,该值设置false 。。。
<!-- Flag indicating whether the current device allows sms service.If true, this means that the device supports both sending andreceiving sms via the telephony network.This can be overridden to false for "data only" deviceswhich can't send and receive sms message.Note: Disable SMS also disable voicemail waiting sms,cell broadcasting sms, and MMS. --><bool name="config_sms_capable">false</bool>//禁止短信,该值设置false
。。。。。
mark~