mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-11 21:37:47 +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;
|
||||
|
||||
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 {
|
||||
protected final int mValue;
|
||||
private int type;
|
||||
protected int type;
|
||||
|
||||
public ResEmptyValue(int value, String rawValue, int type) {
|
||||
this(value, rawValue, "integer");
|
||||
@ -33,8 +29,8 @@ public class ResEmptyValue extends ResScalarValue {
|
||||
|
||||
public ResEmptyValue(int value, String rawValue, String type) {
|
||||
super(type, value, rawValue);
|
||||
if(value != 1)
|
||||
throw new UnsupportedOperationException();
|
||||
if (value != 1)
|
||||
throw new UnsupportedOperationException();
|
||||
this.mValue = value;
|
||||
}
|
||||
|
||||
@ -46,4 +42,4 @@ public class ResEmptyValue extends ResScalarValue {
|
||||
protected String encodeAsResXml() throws AndrolibException {
|
||||
return "@empty";
|
||||
}
|
||||
}
|
||||
}
|
@ -37,8 +37,8 @@ public class ResValueFactory {
|
||||
if (value == TypedValue.DATA_NULL_UNDEFINED) { // Special case $empty as explicitly defined empty value
|
||||
return new ResStringValue(null, value);
|
||||
} 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);
|
||||
case TypedValue.TYPE_REFERENCE:
|
||||
return newReference(value, rawValue);
|
||||
|
@ -3,6 +3,7 @@
|
||||
<style name="TextAppearance" parent="@android:style/TextAppearance" />
|
||||
<style name="TextAppearance.EditEvent_Label" parent="@style/TextAppearance">
|
||||
<item name="android:gravity">center_vertical</item>
|
||||
<item name="android:popupAnimationStyle">@empty</item>
|
||||
</style>
|
||||
<style name="TextAppearance.EditEvent_Button" parent="@style/TextAppearance.EditEvent_Label">
|
||||
<item name="android:textColor">#ff777777</item>
|
||||
|
Loading…
Reference in New Issue
Block a user