mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-12 05:47:46 +01:00
Fixes improper decoding of @empty value
- fixes #1270 - references #1116
This commit is contained in:
parent
606e47bf55
commit
a684bae43a
@ -17,14 +17,10 @@
|
|||||||
package brut.androlib.res.data.value;
|
package brut.androlib.res.data.value;
|
||||||
|
|
||||||
import brut.androlib.AndrolibException;
|
import brut.androlib.AndrolibException;
|
||||||
import brut.androlib.res.data.ResResource;
|
|
||||||
import brut.androlib.res.xml.ResValuesXmlSerializable;
|
|
||||||
import java.io.IOException;
|
|
||||||
import org.xmlpull.v1.XmlSerializer;
|
|
||||||
|
|
||||||
public class ResEmptyValue extends ResScalarValue {
|
public class ResEmptyValue extends ResScalarValue {
|
||||||
protected final int mValue;
|
protected final int mValue;
|
||||||
private int type;
|
protected int type;
|
||||||
|
|
||||||
public ResEmptyValue(int value, String rawValue, int type) {
|
public ResEmptyValue(int value, String rawValue, int type) {
|
||||||
this(value, rawValue, "integer");
|
this(value, rawValue, "integer");
|
||||||
@ -33,8 +29,8 @@ public class ResEmptyValue extends ResScalarValue {
|
|||||||
|
|
||||||
public ResEmptyValue(int value, String rawValue, String type) {
|
public ResEmptyValue(int value, String rawValue, String type) {
|
||||||
super(type, value, rawValue);
|
super(type, value, rawValue);
|
||||||
if(value != 1)
|
if (value != 1)
|
||||||
throw new UnsupportedOperationException();
|
throw new UnsupportedOperationException();
|
||||||
this.mValue = value;
|
this.mValue = value;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -37,8 +37,8 @@ public class ResValueFactory {
|
|||||||
if (value == TypedValue.DATA_NULL_UNDEFINED) { // Special case $empty as explicitly defined empty value
|
if (value == TypedValue.DATA_NULL_UNDEFINED) { // Special case $empty as explicitly defined empty value
|
||||||
return new ResStringValue(null, value);
|
return new ResStringValue(null, value);
|
||||||
} else if (value == TypedValue.DATA_NULL_EMPTY) {
|
} else if (value == TypedValue.DATA_NULL_EMPTY) {
|
||||||
return new ResEmptyValue(value, rawValue, type);
|
return new ResEmptyValue(value, rawValue, type);
|
||||||
}
|
}
|
||||||
return new ResReferenceValue(mPackage, 0, null);
|
return new ResReferenceValue(mPackage, 0, null);
|
||||||
case TypedValue.TYPE_REFERENCE:
|
case TypedValue.TYPE_REFERENCE:
|
||||||
return newReference(value, rawValue);
|
return newReference(value, rawValue);
|
||||||
|
@ -3,6 +3,7 @@
|
|||||||
<style name="TextAppearance" parent="@android:style/TextAppearance" />
|
<style name="TextAppearance" parent="@android:style/TextAppearance" />
|
||||||
<style name="TextAppearance.EditEvent_Label" parent="@style/TextAppearance">
|
<style name="TextAppearance.EditEvent_Label" parent="@style/TextAppearance">
|
||||||
<item name="android:gravity">center_vertical</item>
|
<item name="android:gravity">center_vertical</item>
|
||||||
|
<item name="android:popupAnimationStyle">@empty</item>
|
||||||
</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>
|
||||||
|
Loading…
Reference in New Issue
Block a user