com.android.broswer网站.权限。写入\历史\书签
“但在舱单上。。。
<application></application>
<uses-permission android:name="com.android.browser.permission.READ_HISTORY_BOOKMARKS"></uses-permission>
<uses-permission android:name="com.android.broswer.permission.WRITE_HISTORY_BOOKMARKS"></uses-permission>
方法如下:
public void deleteBookmark(Cursor cur, long id) {
getContentResolver().delete(BOOKMARKS_URI, "_id = " + id, null);
}
E/AndroidRuntime(26750): FATAL EXCEPTION: main
E/AndroidRuntime(26750): java.lang.SecurityException: Permission Denial: writing
com.android.browser.BrowserProvider uri content://browser/bookmarks from pid=26
750, uid=10001 requires com.android.browser.permission.WRITE_HISTORY_BOOKMARKS
E/AndroidRuntime(26750): at android.os.Parcel.readException(Parcel.java:1
260)
E/AndroidRuntime(26750): at android.database.DatabaseUtils.readExceptionF
romParcel(DatabaseUtils.java:160)
E/AndroidRuntime(26750): at android.database.DatabaseUtils.readExceptionF
romParcel(DatabaseUtils.java:114)
E/AndroidRuntime(26750): at android.content.ContentProviderProxy.delete(C
ontentProviderNative.java:472)
E/AndroidRuntime(26750): at android.content.ContentResolver.delete(Conten
tResolver.java:675)
E/AndroidRuntime(26750): at com.deleteBookmark(.java:167)
E/AndroidRuntime(26750): at com.onContextItemSe
lected(.java:138)
E/AndroidRuntime(26750): at android.app.Activity.onMenuItemSelected(Activ
ity.java:2199)
E/AndroidRuntime(26750): at com.android.internal.policy.impl.PhoneWindow$
ContextMenuCallback.onMenuItemSelected(PhoneWindow.java:2744)
E/AndroidRuntime(26750): at com.android.internal.view.menu.MenuItemImpl.i
nvoke(MenuItemImpl.java:143)
E/AndroidRuntime(26750): at com.android.internal.view.menu.MenuBuilder.pe
rformItemAction(MenuBuilder.java:855)
E/AndroidRuntime(26750): at com.android.internal.view.menu.MenuDialogHelp
er.onClick(MenuDialogHelper.java:137)
E/AndroidRuntime(26750): at com.android.internal.app.AlertController$Aler
tParams$3.onItemClick(AlertController.java:875)
E/AndroidRuntime(26750): at android.widget.AdapterView.performItemClick(A
dapterView.java:284)
E/AndroidRuntime(26750): at android.widget.ListView.performItemClick(List
View.java:3382)
E/AndroidRuntime(26750): at android.widget.AbsListView$PerformClick.run(A
bsListView.java:1696)
E/AndroidRuntime(26750): at android.os.Handler.handleCallback(Handler.jav
a:587)
E/AndroidRuntime(26750): at android.os.Handler.dispatchMessage(Handler.ja
va:92)
E/AndroidRuntime(26750): at android.os.Looper.loop(Looper.java:123)
E/AndroidRuntime(26750): at android.app.ActivityThread.main(ActivityThrea
d.java:4627)
E/AndroidRuntime(26750): at java.lang.reflect.Method.invokeNative(Native
Method)
E/AndroidRuntime(26750): at java.lang.reflect.Method.invoke(Method.java:5
21)
E/AndroidRuntime(26750): at com.android.internal.os.ZygoteInit$MethodAndA
rgsCaller.run(ZygoteInit.java:868)
E/AndroidRuntime(26750): at com.android.internal.os.ZygoteInit.main(Zygot
eInit.java:626)
E/AndroidRuntime(26750): at dalvik.system.NativeStart.main(Native Method)
你知道为什么在舱单上写着拒绝许可吗?也许是我的代码出了问题?