cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Carlos Santana (JIRA)" <j...@apache.org>
Subject [jira] [Updated] (CB-10825) Permission not being requested for photolibrary source
Date Fri, 11 Mar 2016 16:47:39 GMT

     [ https://issues.apache.org/jira/browse/CB-10825?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Carlos Santana updated CB-10825:
--------------------------------
    Fix Version/s: Master

> Permission not being requested for photolibrary source
> ------------------------------------------------------
>
>                 Key: CB-10825
>                 URL: https://issues.apache.org/jira/browse/CB-10825
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: Plugin Camera
>            Reporter: Richard B Knoll
>            Assignee: Richard B Knoll
>            Priority: Critical
>              Labels: android, regression, reproduced, triaged
>             Fix For: Master, 2.1.1
>
>
> We get a SecurityException for certain cameraOptions in Marshmallow because we do not
request the READ_EXTERNAL_STORAGE permission. Here is a repro set:
> {code}
> {
>     saveToPhotoAlbum: false,
>     targetHeight: -1,
>     targetWidth: -1,
>     allowEdit: false,
>     correctOrientation: false,
>     destinationType: Camera.DestinationType.FILE_URI,
>     mediaType: Camera.MediaType.PICTURE,
>     encodingType: 1,
>     sourceType: Camera.PictureSourceType.SAVEDPHOTOALBUM
> }
> {code}
> Stack trace:
> {code}
> DatabaseUtils: Writing exception to parcel
> DatabaseUtils: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider
uri content://media/external/images/media requires android.permission.READ_EXTERNAL_STORAGE,
or grantUriPermission()
> DatabaseUtils:         at android.content.ContentProvider.enforceReadPermissionInner(ContentProvider.java:605)
> DatabaseUtils:         at android.content.ContentProvider$Transport.enforceReadPermission(ContentProvider.java:480)
> DatabaseUtils:         at android.content.ContentProvider$Transport.query(ContentProvider.java:211)
> DatabaseUtils:         at android.content.ContentProviderNative.onTransact(ContentProviderNative.java:112)
> DatabaseUtils:         at android.os.Binder.execTransact(Binder.java:453)
> AndroidRuntime: FATAL EXCEPTION: pool-1-thread-2
> AndroidRuntime: Process: io.cordova.hellocordova
> AndroidRuntime: java.lang.SecurityException: Permission Denial: reading com.android.providers.media.MediaProvider
uri content://media/external/images/media requires android.permission.READ_EXTERNAL_STORAGE,
or grantUriPermission()
> AndroidRuntime:        at android.os.Parcel.readException(Parcel.java:1620)
> AndroidRuntime:        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:183)
> AndroidRuntime:        at android.database.DatabaseUtils.readExceptionFromParcel(DatabaseUtils.java:135)
> AndroidRuntime:        at android.content.ContentProviderProxy.query(ContentProviderNative.java:421)
> AndroidRuntime:        at android.content.ContentResolver.query(ContentResolver.java:491)
> AndroidRuntime:        at android.content.ContentResolver.query(ContentResolver.java:434)
> AndroidRuntime:        at org.apache.cordova.camera.FileHelper.getDataColumn(FileHelper.java:292)
> AndroidRuntime:        at org.apache.cordova.camera.FileHelper.getRealPathFromURI_API19(FileHelper.java:128)
> AndroidRuntime:        at org.apache.cordova.camera.FileHelper.getRealPath(FileHelper.java:64)
> AndroidRuntime:        at org.apache.cordova.camera.CameraLauncher.processResultFromGallery(CameraLauncher.java:623)
> AndroidRuntime:        at org.apache.cordova.camera.CameraLauncher.access$000(CameraLauncher.java:66)
> AndroidRuntime:        at org.apache.cordova.camera.CameraLauncher$1.run(CameraLauncher.java:781)
> AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1113)
> AndroidRuntime:        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:588)
> AndroidRuntime:        at java.lang.Thread.run(Thread.java:818)
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org


Mime
View raw message