Fix null mConfig in addMissingResSpecs()

This commit is contained in:
Rodrigo Chiossi 2013-02-27 12:09:06 -03:00
parent dccbe33877
commit bad8392487

View File

@ -319,9 +319,13 @@ public class ARSCDecoder {
mPkg.addResSpec(spec);
mType.addResSpec(spec);
if (mConfig == null) {
mConfig = mPkg.getOrCreateConfig(new ResConfigFlags());
}
ResValue value = new ResBoolValue(false, null);
ResResource res = new ResResource(
mPkg.getOrCreateConfig(new ResConfigFlags()), spec, value);
ResResource res = new ResResource(mConfig, spec, value);
mPkg.addResource(res);
mConfig.addResource(res);
spec.addResource(res);