Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Res9patchStreamDecoder.java decodes incorrectly on non-RGBA 9patch PNGs #1180
PNGs may encoded in multiple different formats (ex: Color table, RGB, RGBA, Gray, GrayAlpha etc.). Previous versions of aapt would always use an RGBA encoding on 9patch PNGs.
The upcoming version of aapt will encode 9patch PNGs in any format. This triggers a bug in Res9patchStreamDecoder.java, where some types of PNGs are handled incorrectly.
I'm currently working on a fix for this. Would you be receptive to taking this fix? Please let me know if you have any thoughts or input!
By upcoming aapt do you mean aapt2? Or a patch aapt release?
I'm aware of plenty of bugs with our 9patch decoder. I've been meaning to update it in spec with the new format listed here - https://github.com/iBotPeaches/platform_frameworks_base/blob/apktool-mm/include/androidfw/ResourceTypes.h#L50 , but life and other bugs have gotten the best of me.
Any fix towards 9 patch will be appreciated.