GitHub user Gorcyn opened a pull request:

    https://github.com/apache/cordova-plugin-camera/pull/220

    Fix Android bug in permission requests

    <!--
    Please make sure the checklist boxes are all checked before submitting the 
PR. The checklist
    is intended as a quick reference, for complete details please see our 
Contributor Guidelines:
    
    http://cordova.apache.org/contribute/contribute_guidelines.html
    
    Thanks!
    -->
    
    ### Platforms affected
    Android
    
    ### What does this PR do?
    Fix a known bug: FIXME: Stop always requesting the permission
    
    ### What testing has been done on this change?
    Logic
    
    ### Checklist
    - [ ] [ICLA](http://www.apache.org/licenses/icla.txt) has been signed and 
submitted to secret...@apache.org.
    - [ ] [Reported an issue](http://cordova.apache.org/contribute/issues.html) 
in the JIRA database
    - [ ] Commit message follows the format: "CB-3232: (android) Fix bug with 
resolving file paths", where CB-xxxx is the JIRA ID & "android" is the platform 
affected.
    - [ ] Added automated test coverage as appropriate for this change.
    
    While trying to pick a picture form the library, the application ask for 
READ_EXTERNAL_STORAGE at each time.
    This bug is due to the fact that if permissions[0] (CAMERA) is not granted, 
the code asks for READ_EXTERNAL_STORAGE.
    
    Now, READ_EXTERNAL_STORAGE permission (persmissions[1]) is checked and 
asked if not granted, once.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Gorcyn/cordova-plugin-camera master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/cordova-plugin-camera/pull/220.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #220
    
----
commit 0ddc927890e8a353e5bed4581b644182ef8d19a3
Author: Ludovic Garcia <l.gar...@eutech-ssii.com>
Date:   2016-06-24T08:08:25Z

    Fix Android bug in permission requests
    
    While trying to pick a picture form the library, the application ask for 
READ_EXTERNAL_STORAGE at each time.
    This bug is due to the fact that if permissions[0] (CAMERA) is not granted, 
the code asks for READ_EXTERNAL_STORAGE.
    
    Now, READ_EXTERNAL_STORAGE permission (persmissions[1]) is checked and 
asked if not granted, once.

----


---
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 infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

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

Reply via email to