Exclude XML Resources from being processed by RibbonizerTask #19
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Right now, RibbonizerTask fails with an NPE when trying to apply filters to a non-image resource, such as Android O's
<adaptive-icon>
resources:Stack Trace
Typically, this kind of "new launcher icon" is implemented inside of resource directories specific to
-v26
, but keeping the same name as pre-O resources. Therefore, when the launcher icon is normally namedmipmap-<dpi>/ic_launcher.png
, and then overridden on Android O with the adaptive icon atmipmap-anydpi-v26/ic_launcher.xml
,ImageIO
can't extract aBufferedImage
out of that file and fails later on.I've put a lot of thought into how Ribbonizer would be able to add ribbons to XML resources automatically, but to no avail. Ideally, that solution would also include
<vector>
/SVG resources.For now, we should simply exclude XML altogether, though, in order to prevent people from using Ribbonizer after upgrading their app to Android O.