From f2969405020a72e282c348a6ea201d56e9f8d4ba Mon Sep 17 00:00:00 2001 From: Alan Viverette Date: Wed, 29 Oct 2014 17:09:36 -0700 Subject: Distinguish unspecified and explicit null values in resources BUG: 17919345 Change-Id: Ic4f04f7dd0f986f58a749b5950d80c1cfdb074ea --- include/androidfw/ResourceTypes.h | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/androidfw/ResourceTypes.h b/include/androidfw/ResourceTypes.h index ac5eca08..85e442d 100644 --- a/include/androidfw/ResourceTypes.h +++ b/include/androidfw/ResourceTypes.h @@ -253,7 +253,8 @@ struct Res_value // Type of the data value. enum { - // Contains no data. + // The 'data' is either 0 or 1, specifying this resource is either + // undefined or empty, respectively. TYPE_NULL = 0x00, // The 'data' holds a ResTable_ref, a reference to another resource // table entry. @@ -351,6 +352,14 @@ struct Res_value COMPLEX_MANTISSA_MASK = 0xffffff }; + // Possible data values for TYPE_NULL. + enum { + // The value is not defined. + DATA_NULL_UNDEFINED = 0, + // The value is explicitly defined as empty. + DATA_NULL_EMPTY = 1 + }; + // The data for this item, as interpreted according to dataType. uint32_t data; -- cgit v1.1