cordova-plugin-file
cordova-plugin-file copied to clipboard
Android: restore getWritePermission, but check can have permission
trafficstars
Platforms affected
Android
Motivation and Context
Follow-up to #608 and my comment with question and analysis on it.
Description
Revert getWritePermission to have consistent code for it.
And make it never been called, not through a wrong return value of true inside hasWritePermission, but with a dedicated canHaveWritePermission function. This one is the place to compare current version with API 33.
Testing
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)
- [x] I've updated the documentation if necessary