History log of /frameworks/base/libs/androidfw/Asset.cpp
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
d1ecd7af687bcad0f87c37fe33515ff6c5ea0f1d 23-Jan-2017 Adam Lesinski <adamlesinski@google.com> AssetManager2: Various fixes

- Use FileMaps to open Assets (prevents closing of ApkAssets underlying
zip)
- Implement OpenDir and List methods
- Fix issue where DynamicRefTable wasn't properly constructed

Test: make libandroidfw_tests
Change-Id: Ib21a84e1114d028120744aa3bc1c6eb9d9399fa8
/frameworks/base/libs/androidfw/Asset.cpp
0358efe4f76f42d9eea91600202a5ab0831d9cef 17-Oct-2016 Adam Lesinski <adamlesinski@google.com> Fix race with Asset destruction and printing allocation stats

A race could occur when printing the list of Asset allocations for
debugging purposes.

Each Asset object would insert themselves into a global linked list
on construction and remove themselves on destruction. Iterating the list
and the insertion/remove operations all acquire a global lock.

The race occurs after the Asset subclass destructor runs but before the Asset
base class destructor runs, which performs the actual removal from the list.

The vtable of the object being destroyed ends up pointing at the base Asset class'
vtable, and during the iteration of the global list, a pure virtual method is called
leading to an abort, since the wrong vtable is dereferenced.

This change moves the insertion/removal of the Asset object into the global list
to the concrete class, which adds some maintenance overhead but solves the problem.

Bug:31113965
Test: make libandroidfw_tests
Change-Id: I1a620897e5e04a8519ee247883bba0719b1fa6f3
/frameworks/base/libs/androidfw/Asset.cpp
a346f5458a4d9e9ea8159a38ae5f696f19cf125b 02-Mar-2016 George Burgess IV <gbiv@google.com> Cleanup uses of sprintf so we can deprecate it.

Change-Id: Ic66abfb547cd5551c47e03d604e65f83c84c597f
/frameworks/base/libs/androidfw/Asset.cpp
4600dd053dbdbd4b95f3b11057a1cc55b99f9c77 16-Jun-2015 Narayan Kamath <narayan@google.com> 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
/frameworks/base/libs/androidfw/Asset.cpp
688ff4cf0f93d1a886437884f23874e5595d59a3 23-Feb-2015 Narayan Kamath <narayan@google.com> Track removal of refcounts from FileMap.

Use delete instead of release.

Change-Id: I25c841b368aa9d51e9259399b94cafa2bbb7a076
/frameworks/base/libs/androidfw/Asset.cpp
2204f0bf56af53b588a01701b8cf9cd05b1b3ff9 22-Oct-2014 Andreas Gampe <agampe@google.com> Frameworks/base: Wall Werror in libs/androidfw

Turn on -Wall -Werror in libs/androidfw. Fix warnings. Refactor
some code.

Change-Id: I66fe54ace433c15dee5de328b149ca142f74b2dd
/frameworks/base/libs/androidfw/Asset.cpp
00adb8685ee996f9d2650d617c8c0e98f13ef406 19-Mar-2014 Mark Salyzyn <salyzyn@google.com> androidfw: resolve 64-bit build issues

- uid_t/gid_t cast to unsigned long
- unused argument warnings
- tab and space requirements

Change-Id: Ib446d8165b9082be02edb55e6b71fd1a03ea3431
/frameworks/base/libs/androidfw/Asset.cpp
afd31e08299008fdc5c2813f21b2573f29dc53df 03-Dec-2013 Narayan Kamath <narayan@google.com> Reimplement ZipFileRO in terms of libziparchive.

This lets us share zip archive processing code with both
the runtime (Art, dalvik) and critical java code
(StrictJarFile).

This change also moves several utility methods to ZipUtils
and dedups code across several zip inflation methods.

One of the side effects of this change is that several
processing loops are now O(n) instead of O(n^2).

bug: 10193060

Change-Id: I3c7188496837a47246c4f342e45485a70fef3169
/frameworks/base/libs/androidfw/Asset.cpp
1f5762e646bed2290934280464832782766ee68e 07-May-2013 Mathias Agopian <mathias@google.com> libutils clean-up

Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
/frameworks/base/libs/androidfw/Asset.cpp
a982dc05d7ca919c07f50e446549ef9dceadf6bd 23-Mar-2012 Colin Cross <ccross@android.com> frameworks/base: move Zip* from libandroidfw to libutils

ZipUtils is needed by build/tools, move it from libandroidfw
(frameworks/base) to libutils (frameworks/native).

Change-Id: I2b4b7adcdf68eb25ee7cba5dd3b69eadf0523af3
/frameworks/base/libs/androidfw/Asset.cpp
83c64e6b624a876436d2ef5d2f173b10407e27b4 21-Feb-2012 Mathias Agopian <mathias@google.com> frameworks/base refactoring

create the new libandroidfw from parts of libui and libutils

Change-Id: I1584995616fff5d527a2aba63921b682a6194d58
/frameworks/base/libs/androidfw/Asset.cpp