mirror of
https://github.com/revanced/Apktool.git
synced 2024-09-10 08:16:55 +02:00
Adds support for DATA_NULL_EMPTY
This commit is contained in:
parent
6c4167fba4
commit
be4bdf1d75
@ -180,6 +180,17 @@ public class TypedValue {
|
|||||||
|
|
||||||
/* ------------------------------------------------------------ */
|
/* ------------------------------------------------------------ */
|
||||||
|
|
||||||
|
/**
|
||||||
|
* {@link #TYPE_NULL} data indicating the value was not specified.
|
||||||
|
*/
|
||||||
|
public static final int DATA_NULL_UNDEFINED = 0;
|
||||||
|
/**
|
||||||
|
* {@link #TYPE_NULL} data indicating the value was explicitly set to null.
|
||||||
|
*/
|
||||||
|
public static final int DATA_NULL_EMPTY = 1;
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------ */
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* If {@link #density} is equal to this value, then the density should be
|
* If {@link #density} is equal to this value, then the density should be
|
||||||
* treated as the system's default density value:
|
* treated as the system's default density value:
|
||||||
|
@ -35,6 +35,9 @@ public class ResValueFactory {
|
|||||||
throws AndrolibException {
|
throws AndrolibException {
|
||||||
switch (type) {
|
switch (type) {
|
||||||
case TypedValue.TYPE_NULL:
|
case TypedValue.TYPE_NULL:
|
||||||
|
if (value == TypedValue.DATA_NULL_EMPTY) { // Special case $empty as explicitly defined empty value
|
||||||
|
return new ResStringValue(null, value);
|
||||||
|
}
|
||||||
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);
|
||||||
|
Loading…
Reference in New Issue
Block a user