本文介绍了某些权限“的ProtectionLevel似乎错误地记录或实施的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我通过很多的权限标记为 PROTECTION_NORMAL PROTECTION_DANGEROUS 的ListView 。当点击我的应用程序调用 ActivityCompat.requestPermission()

所有的权限,我测试了(我的意思是所有的正常危险的)工作正常在我的模拟器,除了一些权限

  • CHANGE_NETWORK_STATE

请求 CHANGE_NETWORK_STATE 总是返回 PackageManager.PERMISSION_DENIED (甚至没有提示)。 我希望它默认授予的权限,因为它的标记正常,或者如果文件是错误的,要被提示为它呢。

  • GET_ACCOUNTS

请求 GET_ACCOUNTS 和提示后,但文档列出了该许可为正常不是危险(对话框询问访问您的联系人)。 我希望它默认授予的权限,因为它的标记正常,而不是被提示输入了。

  • READ_CELL_BROADCASTS

时的上市从<$权限C $ C>短信权限组,但该权限不存在于 Manifest.permission 包。

是的,所有权限都在我的的Andr​​oidManifest.xml 的。

问题

  1. 我是唯一一个有此?
  2. 在它是仿真器的具体情况?
  3. 是文档故障或为preVIEW建错了吗?
解决方案

事实上,他们是。

原来,这些都是工作正在进行中,大多承认错误。

我贴的 GET_ACCOUNTS 一个新的bug,这是尚未报道。

大多是固定的最终发布/文档(又名不是preVIEW)。

I'm running through many permissions tagged PROTECTION_NORMAL and PROTECTION_DANGEROUS in a ListView. Upon click my application calls ActivityCompat.requestPermission().

All permissions I tested (by that I mean all normal and dangerous permissions for API-7 and above I could find) are working fine on my Emulator, except for some:

  • CHANGE_NETWORK_STATE

Requesting CHANGE_NETWORK_STATE always returns PackageManager.PERMISSION_DENIED (without even prompting). I would expect it granted by default since it's flagged normal, or if the documentation is wrong, to be prompted for it then.

  • GET_ACCOUNTS

Requesting GET_ACCOUNTS works after prompting, but the documentation lists this permission as normal not dangerous (the dialog asks for "access your contacts"). I would expect it granted by default since it's flagged normal and not to be prompted for it.

  • READ_CELL_BROADCASTS

Is listed as a permission from the SMS permission group, but that permission does not exists in the Manifest.permission package.

Yes, all permissions are in my AndroidManifest.xml.

Questions

  1. Am I the only one to have this?
  2. Is it emulator-specific?
  3. Is the documentation faulty or is the preview build wrong?
解决方案

Indeed they are.

Turns out those are work-in-progress and mostly acknowledge bugs.

I posted a new bug for GET_ACCOUNTS, that was yet to be reported.

Mostly to be fixed for final release / documentation (aka NOT preview).

这篇关于某些权限“的ProtectionLevel似乎错误地记录或实施的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

07-07 23:03