mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-01 06:34:25 +02:00
fix: "qpm" can exist without 9patch, and use new "copyToDir"
This commit is contained in:
parent
d068c3e481
commit
adbde1745f
@ -79,7 +79,7 @@ public class ResFileDecoder {
|
|||||||
// check for raw 9patch images
|
// check for raw 9patch images
|
||||||
for (String extension : RAW_9PATCH_IMAGE_EXTENSIONS) {
|
for (String extension : RAW_9PATCH_IMAGE_EXTENSIONS) {
|
||||||
if (inFileName.toLowerCase().endsWith("." + extension)) {
|
if (inFileName.toLowerCase().endsWith("." + extension)) {
|
||||||
copyRaw(inDir, outDir, outFileName);
|
copyRaw(inDir, outDir, inFileName, outFileName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -107,7 +107,7 @@ public class ResFileDecoder {
|
|||||||
// check for raw image
|
// check for raw image
|
||||||
for (String extension : RAW_IMAGE_EXTENSIONS) {
|
for (String extension : RAW_IMAGE_EXTENSIONS) {
|
||||||
if (inFileName.toLowerCase().endsWith("." + extension)) {
|
if (inFileName.toLowerCase().endsWith("." + extension)) {
|
||||||
copyRaw(inDir, outDir, outFileName);
|
copyRaw(inDir, outDir, inFileName, outFileName);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -144,9 +144,10 @@ public class ResFileDecoder {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public void copyRaw(Directory inDir, Directory outDir, String filename) throws AndrolibException {
|
public void copyRaw(Directory inDir, Directory outDir, String inFilename,
|
||||||
|
String outFilename) throws AndrolibException {
|
||||||
try {
|
try {
|
||||||
DirUtil.copyToDir(inDir, outDir, filename);
|
DirUtil.copyToDir(inDir, outDir, inFilename, outFilename);
|
||||||
} catch (DirectoryException ex) {
|
} catch (DirectoryException ex) {
|
||||||
throw new AndrolibException(ex);
|
throw new AndrolibException(ex);
|
||||||
}
|
}
|
||||||
@ -168,6 +169,7 @@ public class ResFileDecoder {
|
|||||||
|
|
||||||
private final static String[] RAW_IMAGE_EXTENSIONS = new String[] {
|
private final static String[] RAW_IMAGE_EXTENSIONS = new String[] {
|
||||||
"m4a", // apple
|
"m4a", // apple
|
||||||
|
"qmg", // samsung
|
||||||
};
|
};
|
||||||
|
|
||||||
private final static String[] RAW_9PATCH_IMAGE_EXTENSIONS = new String[] {
|
private final static String[] RAW_9PATCH_IMAGE_EXTENSIONS = new String[] {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user