gpt4 book ai didi

android - 权限拒绝 : reading com. android.providers.contacts.CallLogProvider

转载 作者:行者123 更新时间:2023-11-29 00:32:22 25 4
gpt4 key购买 nike

我在特定手机和运营商上遇到此异常:Verizon 上的 Samsung Galaxy S3。我已经在带有 Sprint 的 Evo 和带有 AT&T 的 Galaxy Nexus 中进行了测试,没有一个给我这个错误。我想知道电话运营商是否对现在需要额外特殊权限的操作系统进行了任何修改。我从一位拥有 Galaxy S3 的客户那里远程记录了以下堆栈跟踪:

堆栈跟踪:

    Permission Denial: reading com.android.providers.contacts.CallLogProvider 
uri content://call_log/calls from pid=23104, uid=10233
requires android.permission.READ_CALL_LOG, or grantUriPermission()
java.lang.SecurityException: Permission Denial: reading
com.android.providers.contacts.CallLogProvider
uri content://call_log/calls from pid=23104, uid=10233
requires android.permission.READ_CALL_LOG, or grantUriPermission()
at android.os.Parcel.readException(Parcel.java:1430) at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:188) at
android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:140) at
android.content.ContentProviderProxy.query(ContentProviderNative.java:423) at
android.content.ContentResolver.query(ContentResolver.java:375) at
android.content.ContentResolver.query(ContentResolver.java:318)

list :

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="xyz"
android:installLocation="auto"
android:versionCode="1"
android:versionName="1" >

<uses-permission android:name="android.permission.RECEIVE_BOOT_COMPLETED" />
<uses-permission android:name="android.permission.READ_CONTACTS" />
<uses-permission android:name="android.permission.READ_PHONE_STATE" />
<uses-permission android:name="android.permission.MODIFY_PHONE_STATE" />
<uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS" />
<uses-permission android:name="android.permission.CALL_PHONE" />
<uses-permission android:name="android.permission.WRITE_CONTACTS" />
<uses-permission android:name="android.permission.READ_CALENDAR" />
<uses-permission android:name="android.permission.DISABLE_KEYGUARD" />
<uses-permission android:name="android.permission.READ_SMS" />
<uses-permission android:name="android.permission.WRITE_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.RECEIVE_MMS" />
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.PROCESS_OUTGOING_CALLS" />
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.KILL_BACKGROUND_PROCESSES" />
<uses-permission android:name="android.permission.RECEIVE_WAP_PUSH" />
<uses-permission android:name="android.permission.RESTART_PACKAGES" />
<uses-permission android:name="android.permission.READ_CALL_LOG" />
<uses-permission android:name="android.permission.WRITE_CALL_LOG" />
<uses-permission android:name="android.permission.WRITE_SETTINGS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />

<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="9">
</uses-sdk>

最佳答案

Allows an application to read the user's call log.

Note: If your app uses the READ_CONTACTS permission and both your minSdkVersion and targetSdkVersion values are set to 15 or lower, the system implicitly grants your app this permission. If you don't need this permission, be sure your targetSdkVersion is 16 or higher.

常量值:“android.permission.READ_CALL_LOG”

根据您的 list :
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="9"></uses-sdk>

也许你应该尝试删除 READ_CONTACTS许可,或设置 targetSdkVersion="9"

来源:Manifest.permissions #READ_CALL_LOG

关于android - 权限拒绝 : reading com. android.providers.contacts.CallLogProvider,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14709362/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com