mirror of
https://github.com/revanced/Apktool.git
synced 2025-05-03 15:24:26 +02:00
Merge branch 'whydoubt-strings_in_styles'
This commit is contained in:
commit
49afdd273d
1
CHANGES
1
CHANGES
@ -46,6 +46,7 @@ v2.0.0 (TBA)
|
|||||||
-Fixed (issue #684) - Fixed issue with multiple ResPackages in ARSC file.
|
-Fixed (issue #684) - Fixed issue with multiple ResPackages in ARSC file.
|
||||||
-Fixed (issue #682) - Fixed handling renamed manifests with ("yi")
|
-Fixed (issue #682) - Fixed handling renamed manifests with ("yi")
|
||||||
-Fixed (issue #664) - Fixed issue with apks with large StringPools failing to decode.
|
-Fixed (issue #664) - Fixed issue with apks with large StringPools failing to decode.
|
||||||
|
-Fixed (issue #447) - Fixed bad cast of ResStringValue to ResAtr by handling ResStringValue correctly (Thanks whydoubt)
|
||||||
-Fixed issue with APKs with multiple dex files.
|
-Fixed issue with APKs with multiple dex files.
|
||||||
-Fixed issue with using Apktool without smali/baksmali for ApktoolProperties (Thanks teprrr)
|
-Fixed issue with using Apktool without smali/baksmali for ApktoolProperties (Thanks teprrr)
|
||||||
-Fixed issue with non-URI standard characters in apk name (Thanks rover12421)
|
-Fixed issue with non-URI standard characters in apk name (Thanks rover12421)
|
||||||
|
@ -52,14 +52,20 @@ public class ResStyleValue extends ResBagValue implements
|
|||||||
}
|
}
|
||||||
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();
|
||||||
|
String name = null;
|
||||||
|
String value = null;
|
||||||
|
|
||||||
|
String resource = spec.getDefaultResource().getValue().toString();
|
||||||
// hacky-fix remove bad ReferenceVars
|
// hacky-fix remove bad ReferenceVars
|
||||||
if (spec.getDefaultResource().getValue().toString()
|
if (resource.contains("ResReferenceValue@")) {
|
||||||
.contains("ResReferenceValue@")) {
|
|
||||||
continue;
|
continue;
|
||||||
|
} else if (resource.contains("ResStringValue@")) {
|
||||||
|
name = "@" + spec.getFullName(res.getResSpec().getPackage(), false);
|
||||||
|
} else {
|
||||||
|
ResAttr attr = (ResAttr) spec.getDefaultResource().getValue();
|
||||||
|
value = attr.convertToResXmlFormat(mItems[i].m2);
|
||||||
|
name = spec.getFullName(res.getResSpec().getPackage(), true);
|
||||||
}
|
}
|
||||||
ResAttr attr = (ResAttr) spec.getDefaultResource().getValue();
|
|
||||||
String value = attr.convertToResXmlFormat(mItems[i].m2);
|
|
||||||
|
|
||||||
if (value == null) {
|
if (value == null) {
|
||||||
value = mItems[i].m2.encodeAsResXmlValue();
|
value = mItems[i].m2.encodeAsResXmlValue();
|
||||||
@ -70,8 +76,7 @@ public class ResStyleValue extends ResBagValue implements
|
|||||||
}
|
}
|
||||||
|
|
||||||
serializer.startTag(null, "item");
|
serializer.startTag(null, "item");
|
||||||
serializer.attribute(null, "name",
|
serializer.attribute(null, "name", name);
|
||||||
spec.getFullName(res.getResSpec().getPackage(), true));
|
|
||||||
serializer.text(value);
|
serializer.text(value);
|
||||||
serializer.endTag(null, "item");
|
serializer.endTag(null, "item");
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
</style>
|
</style>
|
||||||
<style name="TextAppearance.EditEvent_Button" parent="@style/TextAppearance.EditEvent_Label">
|
<style name="TextAppearance.EditEvent_Button" parent="@style/TextAppearance.EditEvent_Label">
|
||||||
<item name="android:textColor">#ff777777</item>
|
<item name="android:textColor">#ff777777</item>
|
||||||
|
<item name="@string/issue_477">?android:dividerVertical</item>
|
||||||
</style>
|
</style>
|
||||||
<style name="Foo.Bar" parent=""/>
|
<style name="Foo.Bar" parent=""/>
|
||||||
</resources>
|
</resources>
|
@ -2,4 +2,5 @@
|
|||||||
<resources>
|
<resources>
|
||||||
<string name="test1" />
|
<string name="test1" />
|
||||||
<string name="hello_world">Hello World</string>
|
<string name="hello_world">Hello World</string>
|
||||||
|
<string name="issue_477">divider</string>
|
||||||
</resources>
|
</resources>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user