mirror of
https://github.com/revanced/Apktool.git
synced 2025-01-05 17:45:52 +01:00
removes hacky @*android fix
Updates unit-tests to actually use AOSP drawables/layouts/anims, instead of using 3rd party ones.
This commit is contained in:
parent
a4a22a2961
commit
9f03d7d35c
@ -49,11 +49,9 @@ public class ResArrayValue extends ResBagValue implements
|
||||
ResResource res) throws IOException, AndrolibException {
|
||||
String type = getType();
|
||||
type = (type == null ? "" : type + "-") + "array";
|
||||
// reference array (04 10 2012, BurgerZ)
|
||||
if ("reference-array".equals(type)) {
|
||||
type = "string-array";
|
||||
}
|
||||
// reference array (04 10 2012, BurgerZ)
|
||||
serializer.startTag(null, type);
|
||||
serializer.attribute(null, "name", res.getResSpec().getName());
|
||||
for (int i = 0; i < mItems.length; i++) {
|
||||
|
@ -50,7 +50,6 @@ public class ResReferenceValue extends ResIntValue {
|
||||
|
||||
// generate the beginning to fix @android
|
||||
String mStart = (mTheme ? '?' : '@') + (newId ? "+" : "");
|
||||
// mStart = mStart.replace("@android", "@*android");
|
||||
|
||||
return mStart
|
||||
+ spec.getFullName(mPackage, mTheme
|
||||
|
@ -42,11 +42,11 @@ public abstract class ResScalarValue extends ResValue implements
|
||||
if (mRawValue != null) {
|
||||
return mRawValue;
|
||||
}
|
||||
return encodeAsResXml().replace("@android:", "@*android:");
|
||||
return encodeAsResXml();
|
||||
}
|
||||
|
||||
public String encodeAsResXmlItemValue() throws AndrolibException {
|
||||
return encodeAsResXmlValue().replace("@android:", "@*android:");
|
||||
return encodeAsResXmlValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -54,11 +54,11 @@ public abstract class ResScalarValue extends ResValue implements
|
||||
if (mRawValue != null) {
|
||||
return mRawValue;
|
||||
}
|
||||
return encodeAsResXml().replace("@android:", "@*android:");
|
||||
return encodeAsResXml();
|
||||
}
|
||||
|
||||
public String encodeAsResXmlNonEscapedItemValue() throws AndrolibException {
|
||||
return encodeAsResXmlValue().replace("@android:", "@*android:").replace("&", "&").replace("<","<");
|
||||
return encodeAsResXmlValue().replace("&", "&").replace("<","<");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -1,12 +1,12 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<item name="test_anims1" type="anim">@*android:anim/grow_fade_in_from_bottom</item>
|
||||
<item name="test_anims2" type="anim">@*android:anim/push_down_in</item>
|
||||
<item name="test_anims3" type="anim">@*android:anim/push_down_out</item>
|
||||
<item name="test_anims4" type="anim">@*android:anim/push_up_in</item>
|
||||
<item name="test_anims5" type="anim">@*android:anim/push_up_out</item>
|
||||
<item name="test_anims6" type="anim">@*android:anim/shrink_fade_out_from_bottom</item>
|
||||
<item name="test_anims7" type="anim">@*android:anim/slide_out_down</item>
|
||||
<item name="test_anims8" type="anim">@*android:anim/wallpaper_open_exit</item>
|
||||
<item name="test_anims9" type="anim">@*android:anim/wallpaper_open_exit</item>
|
||||
<item name="test_anims1" type="anim">@android:anim/bounce_interpolator</item>
|
||||
<item name="test_anims2" type="anim">@android:anim/cycle_interpolator</item>
|
||||
<item name="test_anims3" type="anim">@android:anim/decelerate_interpolator</item>
|
||||
<item name="test_anims4" type="anim">@android:anim/fade_in</item>
|
||||
<item name="test_anims5" type="anim">@android:anim/fade_out</item>
|
||||
<item name="test_anims6" type="anim">@android:anim/linear_interpolator</item>
|
||||
<item name="test_anims7" type="anim">@android:anim/overshoot_interpolator</item>
|
||||
<item name="test_anims8" type="anim">@android:anim/slide_in_left</item>
|
||||
<item name="test_anims9" type="anim">@android:anim/slide_out_right</item>
|
||||
</resources>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<color name="test_color1">#ff123456</color>
|
||||
<color name="test_color2">@*android:color/white</color>
|
||||
<color name="test_color2">@android:color/white</color>
|
||||
<color name="test_color3">#00000000</color>
|
||||
</resources>
|
||||
|
@ -1,8 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<item name="test_drawable1" type="drawable">@*android:drawable/ab_bottom_solid_light_holo</item>
|
||||
<item name="test_drawable2" type="drawable">@*android:drawable/btn_check_off_holo_light</item>
|
||||
<item name="test_drawable3" type="drawable">@*android:drawable/btn_check_on_holo_light</item>
|
||||
<item name="test_drawable4" type="drawable">@*android:drawable/btn_keyboard_key_fulltrans</item>
|
||||
<item name="test_drawable5" type="drawable">#00000000</item>
|
||||
<item name="test_drawable1" type="drawable">@android:drawable/btn_default</item>
|
||||
<item name="test_drawable2" type="drawable">#00000000</item>
|
||||
</resources>
|
||||
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<resources>
|
||||
<item name="test_layouts1" type="layout">@*android:layout/preference_header_item</item>
|
||||
<item name="test_layouts2" type="layout">@*android:layout/preference_list_fragment</item>
|
||||
<item name="test_layouts3" type="layout">@*android:layout/preference_widget_checkbox</item>
|
||||
<item name="test_layouts4" type="layout">@*android:layout/preference_widget_switch</item>
|
||||
<item name="test_layouts1" type="layout">@android:layout/activity_list_item</item>
|
||||
<item name="test_layouts2" type="layout">@android:layout/browser_link_context_header</item>
|
||||
<item name="test_layouts3" type="layout">@android:layout/simple_list_item_1</item>
|
||||
<item name="test_layouts4" type="layout">@android:layout/simple_spinner_item</item>
|
||||
</resources>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<style name="TextAppearance" parent="@*android:style/TextAppearance" />
|
||||
<style name="TextAppearance" parent="@android:style/TextAppearance" />
|
||||
<style name="TextAppearance.EditEvent_Label" parent="@style/TextAppearance">
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
</style>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<resources>
|
||||
<string name="test_reference1">@string/test1</string>
|
||||
<string name="test_reference2">@*android:string/ok</string>
|
||||
<string name="test_reference2">@android:string/ok</string>
|
||||
<string name="test_reference3">?android:textStyle</string>
|
||||
</resources>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<View xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
test1="@string/test1"
|
||||
test2="@*android:string/ok"
|
||||
test2="@android:string/ok"
|
||||
test3="?android:textStyle"
|
||||
/>
|
||||
|
Loading…
Reference in New Issue
Block a user