使用官方 AVD rev。3
调用这个:
ActivityCompat.requestPermissions(activity, new String[]{"android.permission.USE_CREDENTIALS"}, REQUEST_PERMISSION_CREDENTIALS);
立即触发:
onRequestPermissionsResult (int requestCode, String[] permissions, int[] grantResults)
结果代码是PackageManager.PERMISSION_DENIED
有人有修复吗?
更新:已知受影响:
Manifest.permission.CHANGE_NETWORK_STATE
Manifest.permission.WRITE_SETTINGS (solved, see Sam's answer)
android.permission.USE_CREDENTIALS (solved, read Update 2)
READ_SMS
更新 2:查看优秀的公认答案。本质上,USE_CREDENTIALS 现在是一个安全的权限。打败我为什么 sdk 不简单地为它返回 PERMISSION_GRANTED ......