9 Commits

Author SHA1 Message Date
Dan Albert
0881a7445f Use std::unique_ptr instead of UniquePtr.
We're deprecating UniquePtr, so we need to move to the real thing.

Bug: http://b/22403888
Change-Id: I5b7fdf4924dd8c12a8c7dba89278714ca6fdc60a
(cherry picked from commit b0624da1181276ff4caa5e57a7a4abf766902e3e)
2015-11-05 13:03:26 -08:00
Elliott Hughes
70bef1c4bd Fix lseek argument order.
Change-Id: Ibc2f98e4c26d0ac6ac7b4a73775c5213c4df4518
2015-10-20 13:23:18 -07:00
Mårten Kongstad
df1a5b22cd RRO: idmap: allow flock(2) to block
During creation of an idmap an advisory lock is applied on the
output file using flock(2). This commit removes the LOCK_NB flag
from the call to flock(2).

The reason for this is that if the function were to return
EWOULDBLOCK, the entire idmap operation would be aborted leading
to the device booting without the correct overlay packages applied.

Change-Id: Iad319779976e950d4354e4f60b30439f6f208b77
2015-10-07 19:02:09 +02:00
Narayan Kamath
4600dd053d 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
2015-06-17 08:40:25 +00:00
Elliott Hughes
b9de25f7db Add missing <sys/file.h> include for flock.
Change-Id: I0c66c03aeb4df614f7880a830b95c40f43f804db
2015-02-16 10:43:19 -08:00
Andreas Gampe
ebee1379ea Frameworks/base: Fix two warnings in cmds
Change-Id: Ifb9c7fb7a2d28c13010ddc186bea5f5f0daefb4a
2014-11-08 01:04:45 +00:00
Andreas Gampe
cfedceb8c1 Frameworks/base: Turn on -Wall -Werror in cmds
Fix small warnings, turn on -Wall -Werror.

Change-Id: Iab1f01a7c7ebd6ba832b75067c5e395f380a1b8b
2014-11-07 14:33:51 -08:00
Adam Lesinski
f90f2f8dc3 Support multiple resource tables with same package
In order to support APK split features, the resource
table needs to support loading multiple resource
tables with the same package but potentially new set
of type IDs.

This adds some complexity as the type ID space changes
from dense and ordered to potentially sparse.

A ByteBucketArray is used to store the type IDs in
a memory efficient way that allows for fast retrieval.

In addition, the IDMAP format has changed. We no longer
need random access to the type data, since we store the
types differently. However, random access to entries of
a given type is still required.

Change-Id: If6f5be680b405b368941d9c1f2b5d2ddca964160
2014-06-18 19:20:08 +00:00
Colin Cross
13221c9cff frameworks/base: move idmap from frameworks/native
idmap depends on libandroidfw, so it should go in frameworks/base.

Change-Id: I3c1db3baa355f53d6b523d60f4377e63eff00c30
2014-02-11 18:11:36 -08:00