我已经从 4.0.3 中分离了联系人,并且编译成功。当我尝试安装它时,它会引发以下错误:
01-27 05:31:21.865: E/DatabaseUtils(601): Writing exception to parcel
01-27 05:31:21.865: E/DatabaseUtils(601): java.lang.SecurityException: The caller must have permissions com.android.voicemail.permission.ADD_VOICEMAIL AND com.android.voicemail.permission.READ_WRITE_ALL_VOICEMAIL
01-27 05:31:21.865: E/DatabaseUtils(601): at com.android.providers.contacts.VoicemailPermissions.checkCallerHasFullAccess(VoicemailPermissions.java:64)
01-27 05:31:21.865: E/DatabaseUtils(601): at com.android.providers.contacts.CallLogProvider.checkVoicemailPermissionAndAddRestriction(CallLogProvider.java:289)
01-27 05:31:21.865: E/DatabaseUtils(601): at com.android.providers.contacts.CallLogProvider.query(CallLogProvider.java:132)
01-27 05:31:21.865: E/DatabaseUtils(601): at android.content.ContentProvider$Transport.query(ContentProvider.java:178)
01-27 05:31:21.865: E/DatabaseUtils(601): at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
01-27 05:31:21.865: E/DatabaseUtils(601): at android.os.Binder.execTransact(Binder.java:338)
01-27 05:31:21.865: E/DatabaseUtils(601): at dalvik.system.NativeStart.run(Native Method)
01-27 05:31:21.996: E/DatabaseUtils(601): Writing exception to parcel
01-27 05:31:21.996: E/DatabaseUtils(601): java.lang.SecurityException: The caller must have permissions com.android.voicemail.permission.ADD_VOICEMAIL AND com.android.voicemail.permission.READ_WRITE_ALL_VOICEMAIL
虽然以下几行在联系人清单文件中:
<uses-permission android:name="com.android.voicemail.permission.ADD_VOICEMAIL" />
<uses-permission android:name="com.android.voicemail.permission.READ_WRITE_ALL_VOICEMAIL" />