is there any work around to test this?? I am not able to push my apk to /system/app. it says out of memory. Any other way??
On Thu, Jan 21, 2010 at 2:54 PM, Manjunatha M <man...@gmail.com> wrote: > Hi, > > I want to access Downloads databases in my Activity. But I am seeing a > SecurityException. Even though I added the permission in my Manifest file, I > still see the same crash happening. > > Here is the Java Code.. > > mDownloadCursor = managedQuery(Downloads.CONTENT_URI, > new String [] {"_id", Downloads.COLUMN_TITLE, > Downloads.COLUMN_STATUS, > Downloads.COLUMN_TOTAL_BYTES, > Downloads.COLUMN_CURRENT_BYTES, > Downloads._DATA, Downloads.COLUMN_DESCRIPTION, > Downloads.COLUMN_MIME_TYPE, > Downloads.COLUMN_LAST_MODIFICATION, > Downloads.COLUMN_VISIBILITY}, > null, null, null); > > > I see the following exception. > > 01-21 14:39:48.817: ERROR/DatabaseUtils(140): Writing exception to parcel > 01-21 14:39:48.817: ERROR/DatabaseUtils(140): java.lang.SecurityException: > Permission Denial: reading com.android.providers.downloads.DownloadProvider > uri content://downloads/download from pid=902, uid=10024 requires > android.permission.ACCESS_DOWNLOAD_MANAGER > 01-21 14:39:48.817: ERROR/DatabaseUtils(140): at > android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:240) > 01-21 14:39:48.817: ERROR/DatabaseUtils(140): at > android.content.ContentProvider$Transport.bulkQuery(ContentProvider.java:116) > 01-21 14:39:48.817: ERROR/DatabaseUtils(140): at > android.content.ContentProviderNative.onTransact(ContentProviderNative.java:98) > 01-21 14:39:48.817: ERROR/DatabaseUtils(140): at > android.os.Binder.execTransact(Binder.java:287) > 01-21 14:39:48.817: ERROR/DatabaseUtils(140): at > dalvik.system.NativeStart.run(Native Method) > 01-21 14:39:48.848: DEBUG/AndroidRuntime(902): Shutting down VM > 01-21 14:39:48.857: WARN/dalvikvm(902): threadid=3: thread exiting with > uncaught exception (group=0x4001b188) > 01-21 14:39:48.857: ERROR/AndroidRuntime(902): Uncaught handler: thread > main exiting due to uncaught exception > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): java.lang.RuntimeException: > Unable to start activity > ComponentInfo{com.my.prefactivity/com.android.browser.BrowserDownloadPage}: > java.lang.SecurityException: Permission Denial: reading > com.android.providers.downloads.DownloadProvider uri > content://downloads/download from pid=902, uid=10024 requires > android.permission.ACCESS_DOWNLOAD_MANAGER > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2496) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2512) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.app.ActivityThread.access$2200(ActivityThread.java:119) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.app.ActivityThread$H.handleMessage(ActivityThread.java:1863) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.os.Handler.dispatchMessage(Handler.java:99) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.os.Looper.loop(Looper.java:123) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.app.ActivityThread.main(ActivityThread.java:4363) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > java.lang.reflect.Method.invokeNative(Native Method) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > java.lang.reflect.Method.invoke(Method.java:521) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:860) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > com.android.internal.os.ZygoteInit.main(ZygoteInit.java:618) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > dalvik.system.NativeStart.main(Native Method) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): Caused by: > java.lang.SecurityException: Permission Denial: reading > com.android.providers.downloads.DownloadProvider uri > content://downloads/download from pid=902, uid=10024 requires > android.permission.ACCESS_DOWNLOAD_MANAGER > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.os.Parcel.readException(Parcel.java:1218) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:160) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:114) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.content.ContentProviderProxy.bulkQuery(ContentProviderNative.java:326) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.content.ContentProviderProxy.query(ContentProviderNative.java:345) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.content.ContentResolver.query(ContentResolver.java:202) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.app.Activity.managedQuery(Activity.java:1495) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > com.android.browser.BrowserDownloadPage.onCreate(BrowserDownloadPage.java:74) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1047) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): at > android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2459) > 01-21 14:39:48.907: ERROR/AndroidRuntime(902): ... 11 more > > > Can anyone help me to solve the problem??? > > -- > Regards, > Manjunatha > -- Regards, Manjunatha
-- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en