-
Notifications
You must be signed in to change notification settings - Fork 762
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(android): Content FS support in PathHandler #629
Conversation
…port chore(android): add missing CordovaResourceApi import
Is there still something preventing the merge, apart from failing tests? |
Last call for review. iOS test is failing but it has been failing for some time now, including on our 8.1.0 release therefore I have reasonable belief this PR will not make that situation worse. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
At a quick glance, this looks okay to me. Not going to "approve" it since I don't have all the background info and didn't look at it in detail, but no concerns as far as the code I see in the PR.
I have been doing some manual tests on these changes. If an application is built with the Is there a way to have this working with |
I don't think so. With
I could add a note somewhere in the documentation for this caveat though. |
This is a cherry-pick of a non-final implementation of PR apache#629 WR-Issue: #17891
This is a cherry-pick and back-port of a non-final implementation of PR apache#629 WR-Issue: #17891
Platforms affected
Android
Motivation and Context
Improves support for the webview asset loader Path handling for easier DOM access,
especially for
content://
urls.Description
There are 3 main changes:
targetFileSystem == "assets";
does not do what might have been expected, the condition will always yield false.
This is because in Java, comparing an object to a string literal using a
==
operator is a reference equality check. That is it's not testing if the values are equal, it's testing if they are the same object. Because a string literal is always making a new object to evaluate this line, it will always be false.This was corrected to use
.equals
which does a value equality check.content
filesystem.The existing path handler supported many different filesystems, but
content
was missing. Adding support for the content filesystem required a few other changes.Including:
Testing
Ran
npm test
.Paramedic tests isn't running locally and I'm not sure why, so we'll see if it runs on the CI.I also have a test project that I used to test this change specifically:
cameraTest.zip
Note: The camera plugin was tested with apache/cordova-plugin-camera#889 PR.
Note: The failing iOS change is not a regression of this PR, as can be observed it was failing on the 8.1 release. Not sure when that test started failing.
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)