mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-01 14:44:26 +02:00
Revert to c836995ead80bc13e10627e1939f153b2faefc6e
This commit is contained in:
parent
f2b1d377d5
commit
0dd2f3f6ba
@ -50,25 +50,12 @@ public class ResStyleValue extends ResBagValue implements ResValuesXmlSerializab
|
|||||||
for (int i = 0; i < mItems.length; i++) {
|
for (int i = 0; i < mItems.length; i++) {
|
||||||
ResResSpec spec = mItems[i].m1.getReferent();
|
ResResSpec spec = mItems[i].m1.getReferent();
|
||||||
|
|
||||||
// fix for ClassCastException by Alsan Wong <alsan.wong@gmail.com> at 2013/01/18 15:08
|
|
||||||
ResAttr attr = null;
|
|
||||||
String value = null;
|
|
||||||
|
|
||||||
try {
|
|
||||||
// hacky-fix remove bad ReferenceVars
|
// hacky-fix remove bad ReferenceVars
|
||||||
ResValue attrValue = spec.getDefaultResource().getValue();
|
if (spec.getDefaultResource().getValue().toString().contains("ResReferenceValue@")) {
|
||||||
value = attrValue.toString(); // I know, this is not good, but I don't want another variable just for exception handling
|
|
||||||
|
|
||||||
if(true == value.contains("ResReferenceValue@")) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
ResAttr attr = (ResAttr) spec.getDefaultResource().getValue();
|
||||||
attr = (ResAttr)attrValue;
|
String value = attr.convertToResXmlFormat(mItems[i].m2);
|
||||||
value = attr.convertToResXmlFormat(mItems[i].m2);
|
|
||||||
} catch(ClassCastException e) {
|
|
||||||
System.out.println("ClassCastException: " + e.getMessage());
|
|
||||||
System.out.println(value);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
value = mItems[i].m2.encodeAsResXmlValue();
|
value = mItems[i].m2.encodeAsResXmlValue();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user