You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by GitBox <gi...@apache.org> on 2019/11/02 12:00:58 UTC

[GitHub] [cordova-plugin-file] Lindsay-Needs-Sleep opened a new pull request #356: (android) Issue #329 - Allow plugins to "exec" when on a cdvfile:// url

Lindsay-Needs-Sleep opened a new pull request #356: (android) Issue #329 - Allow plugins to "exec" when on a cdvfile:// url
URL: https://github.com/apache/cordova-plugin-file/pull/356
 
 
   Allow plugins to exec when on a cdvfile:// url in Android 4.4 (Already works properly in at least Android 6.0+)
   
   ### Platforms affected
   Android
   (Specifically for Android OS 4.4, maybe Android OS 5.0)
   
   
   ### Motivation and Context
   This fixes #329  
   (Also accidentally caused my previous pull request (PR #332) to accidentally close.)
   
   
   ### Description
   Due to different/incorrect native code in Android 4.4, the received origin onJsPrompt is "" when on a "cdvfile://" url.  
   So in the case that cordova-plugin-file is asked if a url should(be)Allow(ed)BridgeAccess, it will manually retrieve the url from the webView in the case that it has received the broken "" and check if it is a "cdvfile://" url.
   
   
   
   ### Testing
   Added the plugin as a local file to my project.
   Debugged the new Android code.  Walked through it.
   Observed that desired result of cordova-plugin-file being able to "exec".  (Other plugins were also then able to do their exec commands and fire their ready channels as well.)
   And deviceready was finally fired.
   
   Ran the manual tests, they all passed.
   The automatic tests had the same failures before and after my change.
   
   Added a new manual test which basically redirects to the same page but is a cdvfile url.  
   This allows you to run tests from the cdvfile url.  When you open this page with an Android OS 4.4 device (before my changes), it is completely blank.  After the changes, all the tests run again successfully on the cdvfile url (except those that were broken before changes).
   
   Passed `npm run eslint`
   
   
   
   ### Checklist
   
   - [x] I've run the tests to see all new and existing tests pass
   - [x] I added automated test coverage as appropriate for this change
   - [x] Commit is prefixed with `(platform)` if this change only applies to one platform (e.g. `(android)`)
   - [x] If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct [keyword to close issues using keywords](https://help.github.com/articles/closing-issues-using-keywords/))
   - [x] I've updated the documentation if necessary
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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