2013-02-05 149 views
3

我在特定的手機和運營商上收到了這個異常:Verizon上的三星Galaxy S3。我已經在Evo中用Sprint和Galaxy Nexus進行了測試,其中AT & T並沒有給我這個錯誤。我想知道電話公司是否對操作系統做了任何修改,現在需要額外的特殊權限。權限拒絕:閱讀com.android.providers.contacts.CallLogProvider

堆棧跟蹤:

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) 

清單:我從客戶誰擁有的Galaxy S3遠程記錄以下堆棧跟蹤

<?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> 

回答

2

允許應用程序讀取用戶的通話記錄。

注意:如果您的應用程序使用READ_CONTACTS權限,並且minSdkVersion和targetSdkVersion值均設置爲15或更低,則系統會隱式授予您應用程序的此權限。如果您不需要此權限,請確保您的targetSdkVersion爲16或更高。

常數值: 「android.permission.READ_CALL_LOG」

根據您的清單:
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="9"></uses-sdk>

也許你應該嘗試刪除READ_CONTACTS權限,或設置targetSdkVersion="9"

來源:Manifest.permissions #READ_CALL_LOG

+0

沒有什麼像android.permission.READ_CALL_LOG – Prasad