summaryrefslogtreecommitdiffstats
path: root/libs/utils
Commit message (Collapse)AuthorAgeFilesLines
* frameworks/base refactoringMathias Agopian2012-02-2015-12610/+0
| | | | | | create the new libandroidfw from parts of libui and libutils Change-Id: I1584995616fff5d527a2aba63921b682a6194d58
* frameworks/base refactoring.Mathias Agopian2012-02-1713-32/+32
| | | | | | step 2: move libutils headers to their new home: androidfw Change-Id: I14624ba23db92a81f2cb929f104386e1fab293ef
* libs/utils: replace malloc() + memset() to zero with calloc()Iliyan Malchev2012-02-172-10/+4
| | | | | Change-Id: I8bdf4360147e51e35c162856c9a859aed6acac34 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Merge "Thread::getTid returns pid_t gettid() after run"Glenn Kasten2012-02-022-5/+41
|\
| * Thread::getTid returns pid_t gettid() after runGlenn Kasten2012-01-172-5/+41
| | | | | | | | | | | | | | This is needed when the parent or any other thread besides the child needs access to the child's kernel tid. Change-Id: Ib148505913eb78314cfd76657c30d7b20663dffd
* | aapt now sorts the strings in the resource string pool.Dianne Hackborn2012-01-311-242/+903
|/ | | | | | | | | | | In our current environment with very many translations, this can save a lot of RAM -- for example over 200K in Gmail just by sorting the strings in the Gmail .apk (not the framework). Also add a new aapt command to print the contents of the resource table string pool. Change-Id: I1da037b3e2c377b890833ff57ab158965314ac48
* Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGESteve Block2012-01-094-20/+20
| | | | | | | See https://android-git.corp.google.com/g/157519 Bug: 5449033 Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
* Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGESteve Block2012-01-0814-65/+65
| | | | | | | See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
* Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGESteve Block2012-01-0613-191/+191
| | | | | | | See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
* Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGESteve Block2012-01-048-34/+34
| | | | | | | See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
* Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGESteve Block2012-01-0316-69/+69
| | | | | | | See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
* Add a basic hashtable data structure, with tests!Jeff Brown2011-11-225-1/+965
| | | | | | | | | | | | | | | | | | The basic hashtable is intended to be used to support a variety of different datastructures such as map, set, multimap, multiset, linkedmap, generationcache, etc. Consequently its interface is fairly primitive. The basic hashtable supports copy-on-write style functionality using SharedBuffer. The change introduces a simple generic function in TypeHelpers for specifying hash functions. The idea is to add template specializations of hash_type<T> next to the relevant data structures such as String8, String16, sp<T>, etc. Change-Id: I2c479229e9d4527b4fbfe3b8b04776a2fd32c973
* Use libcorkscrew to format the stack trace.Jeff Brown2011-11-211-22/+10
| | | | Change-Id: I3a5439ada76bc77c2dd491eaed2272e16a811cc7
* Merge "Slight change to the unwinder API."Jeff Brown2011-11-041-2/+2
|\
| * Slight change to the unwinder API.Jeff Brown2011-11-031-2/+2
| | | | | | | | Change-Id: I5424de76a21b74842e004e0281936b3f492d3c7a
* | am 236aea35: Merge changes Ibc99cb1c,Ie1f4f6f8 into ics-mr1Jamie Gennis2011-11-032-4/+302
|\ \ | |/ |/| | | | | | | * commit '236aea3579787961fdd41d87574760b63323c0c1': BlobCache: implement cache serialization BlobCache: remove the mutex locking
| * BlobCache: implement cache serializationJamie Gennis2011-10-312-2/+302
| | | | | | | | | | | | | | This change adds serialization and deserialization functionality to BlobCache, conforming to the Flattenable interface. Change-Id: Ibc99cb1c3d015f363d57d0713eabccec07ff975e
| * BlobCache: remove the mutex lockingJamie Gennis2011-10-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | This change removes the mutex from the BlobCache class. The caller must be responsible for thread synchronization in order to properly implement the Flattenable interface, which is coming soon. Otherwise would be the potential for the cache contents to change between the call to the getFlattenedSize and flatten methods. Because the caller must do this synchronization anyway there's no reason to also some synchronization inside BlobCache. Change-Id: Ie1f4f6f82b78744f46a41ce863cac0cad276a20e
* | Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGESteve Block2011-10-2610-69/+69
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
* | Rename (IF_)LOG() to (IF_)ALOG() DO NOT MERGESteve Block2011-10-252-5/+5
| | | | | | | | | | | | | | See https://android-git.corp.google.com/g/#/c/141576 Bug: 5449033 Change-Id: I42575e7c29cf1c0f465c357a5c97ab118df6f473
* | Use libcorkscrew for stack unwinding.Jeff Brown2011-10-222-267/+60
|/ | | | Change-Id: Iee1ee5a2018ab8cfc1ce12ec2a124809245eaa02
* add -ldl to host executablesIliyan Malchev2011-10-201-0/+4
| | | | | | | | This fixes the build on Linux when RefBase is compiled with reference tracking enabled. Change-Id: I3e931e0b463ce836f6fdb30c37068d77144631a3 Signed-off-by: Iliyan Malchev <malchev@google.com>
* Fix regression in CursorWindow.copyStingToBuffer.Jeff Brown2011-10-071-6/+7
| | | | | | Bug: 5332296 Change-Id: Iff9eed786f0a8293b6156f883a66a322ddad5e99
* may fix the buildMathias Agopian2011-09-281-6/+2
| | | | Change-Id: I065b1e6652f0e800ba5674a6d9aa954c3ac6c790
* Fix androidGetThreadPriority for non-pthread configurations.Andreas Huber2011-09-161-0/+4
| | | | | | related-to-build Change-Id: Ic865af0865906f96fd615a56a030c8e3adaf13c4
* A new API "androidGetThreadPriority"Andreas Huber2011-09-161-0/+4
| | | | Change-Id: I6baeead8c70460863343fd557250635fb1e6a170
* Resurrect verbose binder loggingAndy McFadden2011-09-071-1/+3
| | | | | | | | | | | | | | | | | Updated the command name lists, and masked off the additional bits in the command word when doing the name lookup. Made descriptor values easier to grep for and consistent with kernel output (i.e. decimal rather than hex). Attempt to show transaction descriptors as such (they're in a union with a pointer). Also, the writeLines() function in Static was using a no-op logging call to write an iovec. It looks like all callers are using N=1, so I just added a log for the first string. Bug 5155269 Change-Id: I417b8d77da3eb6ee1d2069ba94047210f75738bc
* Merge "Add C++ thread API androidGetThreadSchedulingGroup"Glenn Kasten2011-08-291-0/+35
|\
| * Add C++ thread API androidGetThreadSchedulingGroupGlenn Kasten2011-07-081-0/+35
| | | | | | | | | | | | | | This API is intended for applications that need to read a thread's scheduling group, while using the higher-level (C++) family of thread APIs. Change-Id: I5e58017f74c3989b20b5b1cc2bc4483c95720520
* | fix a memory leak and memory corruption in RefBaseMathias Agopian2011-08-111-44/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | we would leak a weakref_impl if a RefBase was never incWeak()'ed. there was also a dangling pointer that would cause memory corruption and double-delete when a custom destroyer was used to delay the execution of ~RefBase. it turns out that the custom destroyer feature caused most of the problems, so it's now gone. The only client was SurfaceFlinger who now handles things on its own. RefBase is essentially back its "gingerbread" state, but the code was slightly cleaned-up. Bug: 5151207, 5084978 Change-Id: Id6ef1d707f96d96366f75068f77b30e0ce2722a5
* | Merge "Move extract native libraries to JNI code"Kenny Root2011-07-272-1/+66
|\ \
| * | Move extract native libraries to JNI codeKenny Root2011-07-262-1/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The built-in ZipFile class was quite a long time to find an unpack libraries. Move everything to using the libutils ZipFileRO class that goes quite a bit faster. Initial measurements are 6 times faster than the Java code. Also, read files off the disk and compare their CRC against the APK's CRC to see if we need to write the new file to disk. This also cuts down the bootup time by up to a second per APK that has native files. Change-Id: Ic464a7969a17368fb6a6b81d026888c4136c7603
* | | am 64ed1059: am e612c881: am 4f3a8db6: am 3cf03987: Merge "Continue idmap ↵Kenny Root2011-07-251-1/+2
|\ \ \ | |/ / |/| | | | | | | | | | | | | | generation even if name lookup fails." * commit '64ed105957098a900d58e7c2598e060cb37755ce': Continue idmap generation even if name lookup fails.
| * | am e612c881: am 4f3a8db6: am 3cf03987: Merge "Continue idmap generation even ↵Kenny Root2011-07-251-1/+2
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | if name lookup fails." * commit 'e612c881ecf74770098aa9c07d4f0611ac982038': Continue idmap generation even if name lookup fails.
| | * \ am 3cf03987: Merge "Continue idmap generation even if name lookup fails."Kenny Root2011-07-211-1/+2
| | |\ \ | | | | | | | | | | | | | | | | | | | | * commit '3cf039876177b5b314b635bb12a1dae1b42f4605': Continue idmap generation even if name lookup fails.
| | | * | Continue idmap generation even if name lookup fails.Mårten Kongstad2011-05-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In resources.arsc files, a resource is represented by a specification block and one or more value blocks. In rare cases, a resource name is also given a new resource ID, a specification block and no values blocks. This commit ensures idmap generation does not fail if such an entry is encountered. Change-Id: I32302a0b07a7a320b7eeb31886931be3bb7b7e9a
| | * | | am afffa8fa: fix RefBase so it retains binary-compatibility with gingerbread ↵Mathias Agopian2011-06-151-9/+25
| | |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (DO NOT MERGE) * commit 'afffa8fa9f82a7343e1158bf921931fd3e3df615': fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
| | | * | | fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)Mathias Agopian2011-06-131-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 4595257 Change-Id: I4773cf4fe59b2509db0ed733739eb6961d473b25
| | * | | | am 19974ecc: Fix a leak in RefBase (DO NOT MERGE)Mathias Agopian2011-06-081-9/+11
| | |\ \ \ \ | | | |/ / / | | | | | | | | | | | | | | | | | | * commit '19974eccdbd3e4dbd7e3b2cc401db7806d4a17bc': Fix a leak in RefBase (DO NOT MERGE)
| | | * | | Fix a leak in RefBase (DO NOT MERGE)Mathias Agopian2011-06-081-9/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this bug was introduced recently. it caused RefBase's weakref_impl structure to be leaked for every RefBase object (about 20 bytes). Change-Id: Ia9b155fbfa643ef72cfb8129e96260a3b806a78c
| * | | | | am 0887b8c2: am 8e18668d: revert surfaceflinger leak fix as it uncovered a ↵Mathias Agopian2011-06-151-35/+9
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | crasher on xoom (DO NOT MERGE) * commit '0887b8c2e583e682cd2c1bc909cb3fdbec704004': revert surfaceflinger leak fix as it uncovered a crasher on xoom (DO NOT MERGE)
| | * | | | | revert surfaceflinger leak fix as it uncovered a crasher on xoom (DO NOT MERGE)Mathias Agopian2011-06-151-35/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 52a43990880b27808bcf562afcc4209d34728e6e. Change-Id: I1856a48f863b051395b8091ddfd1e01292fa1b1e
| * | | | | | am d5244e0a: am 52a43990: Revert "revert surfaceflinger leak fix as it ↵Mathias Agopian2011-06-151-9/+35
| |\ \ \ \ \ \ | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uncovered a crasher on xoom" * commit 'd5244e0a88ed2f843651aa5ffdc71a45c968e0f3': Revert "revert surfaceflinger leak fix as it uncovered a crasher on xoom"
| | * | | | | Revert "revert surfaceflinger leak fix as it uncovered a crasher on xoom"Mathias Agopian2011-06-151-9/+35
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit af6edba59e250adbdfa5b3c3be134f70d8c38a16. Change-Id: I7793d3ca8a4d20a2b188364f47854328ab5f586d
| * | | | | | am 7ecdeb6e: am d20d72d1: Merge "revert surfaceflinger leak fix as it ↵Mathias Agopian2011-06-151-35/+9
| |\ \ \ \ \ \ | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | uncovered a crasher on xoom" into honeycomb-mr2 * commit '7ecdeb6e548ff71d4f70b343e30136e89eaa3e33': revert surfaceflinger leak fix as it uncovered a crasher on xoom
| | * | | | | revert surfaceflinger leak fix as it uncovered a crasher on xoomMathias Agopian2011-06-151-35/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 4600244 Change-Id: Ia68ebf0f243a051ff6a21b3863e3e5d259bbf7ac
| * | | | | | am 77079399: am a9c9a4ba: fix RefBase so it retains binary-compatibility ↵Mathias Agopian2011-06-131-9/+25
| |\ \ \ \ \ \ | | |/ / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | with gingerbread (DO NOT MERGE) * commit '77079399fca3e9c71e2ac06f3da26934e1c278b9': fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)
| | * | | | | fix RefBase so it retains binary-compatibility with gingerbread (DO NOT MERGE)Mathias Agopian2011-06-131-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 4595257 Change-Id: I1db83149107d7dab1f0b7e73c684e0ff82e17e62
* | | | | | | Remove unimplemented memory pool.Jeff Brown2011-07-202-38/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | dlmalloc does such a great job that we don't need a pool anyways. Change-Id: I105b28c4a5c491543959190c7c0a9de75a5b8052
* | | | | | | Add a call to pthread_attr_destroy to avoid potential memory leaks.Le-Chun Wu2011-07-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Ib57efc3530e9793298190cc9cab19c9af54e11a7