}
// remove fields if it is synthetic and type is a outer class
for (FieldNode field : cls.getFields()) {
if (field.getAccessFlags().isSynthetic() && field.getType().isObject()) {
ClassNode fieldsCls = cls.dex().resolveClass(ClassInfo.fromType(field.getType()));
ClassInfo parentClass = cls.getClassInfo().getParentClass();
if (fieldsCls != null
&& parentClass.equals(fieldsCls.getClassInfo())) {
int found = 0;
for (MethodNode mth : cls.getMethods()) {
if (removeFieldUsageFromConstructor(mth, field, fieldsCls)) {
found++;
}
}
if (found != 0) {
FieldInfo replace = new FieldInfo(parentClass, "this", parentClass.getType());
field.addAttr(new FieldReplaceAttr(replace, true));
field.add(AFlag.DONT_GENERATE);
}
}
}