mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-20 16:57:34 +01:00
+ResPackage.getOrCreateConfig().
This commit is contained in:
parent
430fc72388
commit
6a75830a4f
@ -84,6 +84,16 @@ public class ResPackage {
|
||||
return config;
|
||||
}
|
||||
|
||||
public ResConfig getOrCreateConfig(ResConfigFlags flags)
|
||||
throws AndrolibException {
|
||||
ResConfig config = mConfigs.get(flags);
|
||||
if (config == null) {
|
||||
config = new ResConfig(flags);
|
||||
mConfigs.put(flags, config);
|
||||
}
|
||||
return config;
|
||||
}
|
||||
|
||||
public List<ResType> listTypes() {
|
||||
return new ArrayList<ResType>(mTypes.values());
|
||||
}
|
||||
|
@ -155,16 +155,8 @@ public class ARSCDecoder {
|
||||
}
|
||||
}
|
||||
|
||||
ResConfig config;
|
||||
if (flags.isInvalid && ! mKeepBroken) {
|
||||
config = null;
|
||||
} else if (mPkg.hasConfig(flags)) {
|
||||
config = mPkg.getConfig(flags);
|
||||
} else {
|
||||
config = new ResConfig(flags);
|
||||
mPkg.addConfig(config);
|
||||
}
|
||||
mConfig = config;
|
||||
mConfig = flags.isInvalid && ! mKeepBroken ?
|
||||
null : mPkg.getOrCreateConfig(flags);
|
||||
|
||||
for (int i = 0; i < entryOffsets.length; i++) {
|
||||
if (entryOffsets[i] != -1) {
|
||||
@ -174,7 +166,7 @@ public class ARSCDecoder {
|
||||
}
|
||||
}
|
||||
|
||||
return config;
|
||||
return mConfig;
|
||||
}
|
||||
|
||||
private void readEntry() throws IOException, AndrolibException {
|
||||
|
Loading…
x
Reference in New Issue
Block a user