Removes hardcoded extension of PNG to allow OEM versions (qmg)

- adds unit-tests via two qmg files (one 9 patch, one regular)
This commit is contained in:
Connor Tumbleson 2014-10-22 16:32:05 -05:00
parent 49afdd273d
commit 986b585f26
4 changed files with 3 additions and 2 deletions

View File

@ -47,6 +47,7 @@ v2.0.0 (TBA)
-Fixed (issue #682) - Fixed handling renamed manifests with ("yi")
-Fixed (issue #664) - Fixed issue with apks with large StringPools failing to decode.
-Fixed (issue #447) - Fixed bad cast of ResStringValue to ResAtr by handling ResStringValue correctly (Thanks whydoubt)
-Fixed (issue #689) - Fixed issue with hard coding extension as PNG.
-Fixed issue with APKs with multiple dex files.
-Fixed issue with using Apktool without smali/baksmali for ApktoolProperties (Thanks teprrr)
-Fixed issue with non-URI standard characters in apk name (Thanks rover12421)

View File

@ -61,11 +61,11 @@ public class ResFileDecoder {
return;
}
if (typeName.equals("drawable") || typeName.equals("mipmap")) {
if (inFileName.toLowerCase().endsWith(".9.png")) {
if (inFileName.toLowerCase().endsWith(".9." + ext)) {
outFileName = outResName + ".9" + ext;
// check for htc .r.9.png
if (inFileName.toLowerCase().endsWith(".r.9.png")) {
if (inFileName.toLowerCase().endsWith(".r.9" + ext)) {
outFileName = outResName + ".r.9" + ext;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB