cordova-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From riknoll <...@git.apache.org>
Subject [GitHub] cordova-plugin-camera pull request: Fix missing CAMERA permission ...
Date Thu, 03 Dec 2015 19:15:22 GMT
Github user riknoll commented on a diff in the pull request:

    https://github.com/apache/cordova-plugin-camera/pull/142#discussion_r46596545
  
    --- Diff: src/android/CameraLauncher.java ---
    @@ -178,7 +181,7 @@ else if ((this.srcType == PHOTOLIBRARY) || (this.srcType == SAVEDPHOTOALBUM))
{
                         // preserve the original exif data and filename in the modified file
that is
                         // created
                         if(this.mediaType == PICTURE && (this.destType == FILE_URI
|| this.destType == NATIVE_URI)
    -                            && fileWillBeModified() && !cordova.hasPermission(permissions[0]))
{
    +                            && fileWillBeModified() && !cordova.hasPermission(permissions[SAVE_TO_ALBUM_SEC]))
{
    --- End diff --
    
    I don't think we should be using SAVE_TO_ALBUM_SEC and TAKE_PICTURE_SEC for the indices
in the permissions array since those values mean something different. The action after the
permissions is not determined by the permissions requested (both the camera and the photolibrary
sources require READ permission, for example). Could you define some different constants at
the top of the file; maybe CAMERA_PERMISSION_INDEX and READ_PERMISSION_INDEX?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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


Mime
View raw message