Change ResourceType cookies to int32_t.

Also change the order of parameters in ResTable constructors
to avoid ambiguity.

(cherry picked from commit 00b314436f)

Change-Id: I874c5d03c134dc3c331fba423b5280366296287c
This commit is contained in:
Narayan Kamath
2014-01-27 17:32:37 +00:00
parent e05b7b50e2
commit 7c4887f66b
5 changed files with 25 additions and 27 deletions

View File

@@ -1279,14 +1279,13 @@ class ResTable
{
public:
ResTable();
ResTable(const void* data, size_t size, void* cookie,
ResTable(const void* data, size_t size, const int32_t cookie,
bool copyData=false);
~ResTable();
status_t add(const void* data, size_t size, void* cookie,
bool copyData=false, const void* idmap = NULL);
status_t add(Asset* asset, void* cookie,
bool copyData=false, const void* idmap = NULL);
status_t add(Asset* asset, const int32_t cookie, bool copyData,
const void* idmap);
status_t add(const void *data, size_t size);
status_t add(ResTable* src);
status_t getError() const;
@@ -1534,7 +1533,7 @@ public:
// but not the names their entries or types.
const ResStringPool* getTableStringBlock(size_t index) const;
// Return unique cookie identifier for the given resource table.
void* getTableCookie(size_t index) const;
int32_t getTableCookie(size_t index) const;
// Return the configurations (ResTable_config) that we know about
void getConfigurations(Vector<ResTable_config>* configs) const;
@@ -1569,7 +1568,7 @@ private:
struct PackageGroup;
struct bag_set;
status_t add(const void* data, size_t size, void* cookie,
status_t addInternal(const void* data, size_t size, const int32_t cookie,
Asset* asset, bool copyData, const Asset* idmap);
ssize_t getResourcePackageIndex(uint32_t resID) const;