adding support for htc .r.9.png

This commit is contained in:
Connor Tumbleson 2013-01-21 08:25:57 -06:00
parent 40360ed873
commit 7fe733bf43
3 changed files with 10 additions and 2 deletions

View File

@ -8,6 +8,7 @@ v1.5.2 (TBA)
-Added Proguard to drop final jar size from 6.2mb to 2.6mb.
-Fixed (issue #395) - Added check for "aapt" in unit-tests.
-Added ability to use "--frame-path" on [if|install-framework]
-Fixed renaming of ".r.9.png" images -> ".9.png".
v1.5.1 PR3 (Released December 23 - 2012) Codename: Pre Release 3
-Reverted "Prevents removal of <uses-sdk> on decompile, but then throws warning on rebuild (issue #366)"

View File

@ -84,7 +84,7 @@ final public class AndrolibResources {
LOGGER.warning("Skipping \"android\" package group");
pkg = pkgs[1];
} else if (pkgs[0].getName().equals("com.htc")) {
LOGGER.warning("Skipping \"htc\" stupid package group");
LOGGER.warning("Skipping \"htc\" package group");
pkg = pkgs[1];
}
break;
@ -157,7 +157,9 @@ final public class AndrolibResources {
// check if packages different, and that package is not equal to "android"
Map<String, String> packageInfo = resTable.getPackageInfo();
if ((packageInfo.get("cur_package").equalsIgnoreCase(packageInfo.get("orig_package"))
|| ("android".equalsIgnoreCase(packageInfo.get("cur_package"))))) {
|| ("android".equalsIgnoreCase(packageInfo.get("cur_package"))
|| ("com.htc".equalsIgnoreCase(packageInfo.get("cur_package")))))) {
LOGGER.info("Regular manifest package...");
} else {
try {

View File

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