取消系统未接通知

03-09 16:21:59.340: W/System.err(5239): java.lang.SecurityException: Neither user 10043 nor current process has android.permission.MODIFY_PHONE_STATE.


REASON:

The problem you're having is specific to Android 2.3 (Gingerbread). Any code you have that requires MODIFY_PHONE_STATE will work all the way up to (and including) Android 2.2, but will break for Android 2.3+.

A change was checked in by David Brown that limits the use of the MODIFY_PHONE_STATE permission to system apps. System apps are either

  1. Pre-installed into a system folder on the ROM
  2. Compiled by a manufacturer using their security certificate

There is an open issue for this, and I encourage everyone to star it.

I suspect you're trying to use a hidden API like ITelephony. I am - and I got burned by this. The Android team's justification is that it was hidden and you shouldn't have been using it anyways. My personal belief is that there was no security risk (it needed a permission) so just leave it in place until they finish building a proper public Telephony API.

David Brown's email address can be found in the checkin log (linked above)... although I'm not sure if it's a throwaway address or actively monitored by him. It's certainly worth reaching out to him to see why he changed this / if he will roll it back.




评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值