summaryrefslogtreecommitdiffstats
path: root/include/androidfw/Asset.h
diff options
context:
space:
mode:
authorNarayan Kamath <narayan@google.com>2015-06-16 12:02:57 +0100
committerNarayan Kamath <narayan@google.com>2015-06-17 08:40:25 +0000
commit4600dd053dbdbd4b95f3b11057a1cc55b99f9c77 (patch)
treec4bb116de6b55b054a73083165c9512fbf21c164 /include/androidfw/Asset.h
parent5e063b1da52cca1b93b19bdf7be694aabf95d336 (diff)
downloadframeworks_base-4600dd053dbdbd4b95f3b11057a1cc55b99f9c77.zip
frameworks_base-4600dd053dbdbd4b95f3b11057a1cc55b99f9c77.tar.gz
frameworks_base-4600dd053dbdbd4b95f3b11057a1cc55b99f9c77.tar.bz2
ZipFileRO: Use precise widths for zip file types.
getEntryInfo crashes on 64-bit devices because "long" types were being passed int pointers (that pointed to a stack frame) that were reinterpret_cast'ed to long* (sigh.). To fix this issue once and for all, use types with explicitly defined widths. This change also removes some dead invariant checking from Asset.cpp instead of cleaning it up. Note that we've introduced a wart in NativeLibraryHelper, where we need to deal with zlib's uLong type, which is "at least 32 bits wide". bug: 21622286 Change-Id: Iae675a9601db7aae03a8b80b40321d2cc1d97f50
Diffstat (limited to 'include/androidfw/Asset.h')
-rw-r--r--include/androidfw/Asset.h7
1 files changed, 3 insertions, 4 deletions
diff --git a/include/androidfw/Asset.h b/include/androidfw/Asset.h
index 1fe0e06..ee77e97 100644
--- a/include/androidfw/Asset.h
+++ b/include/androidfw/Asset.h
@@ -182,11 +182,11 @@ private:
/*
* Create the asset from a memory-mapped file segment with compressed
- * data. "method" is a Zip archive compression method constant.
+ * data.
*
* The asset takes ownership of the FileMap.
*/
- static Asset* createFromCompressedMap(FileMap* dataMap, int method,
+ static Asset* createFromCompressedMap(FileMap* dataMap,
size_t uncompressedLen, AccessMode mode);
@@ -286,8 +286,7 @@ public:
*
* On success, the object takes ownership of "fd".
*/
- status_t openChunk(FileMap* dataMap, int compressionMethod,
- size_t uncompressedLen);
+ status_t openChunk(FileMap* dataMap, size_t uncompressedLen);
/*
* Standard Asset interfaces.