summaryrefslogtreecommitdiffstats
path: root/libs/utils
Commit message (Collapse)AuthorAgeFilesLines
* 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
* | | | | | | Minor code cleanups in vector.Jeff Brown2011-07-141-26/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a potential bug where calling replaceAt with a reference to an existing element in the vector at the same index would cause the element to be destroyed while being copied to itself. Refactored the conditions in _grow and _shrink for clarity. The computations are exactly the same but I think it reads better this way. In particular, the ssize_t variable 's' is gone: it didn't need to be signed anyways because its value could never be negative. Change-Id: If087841c15e6a87160eee874720c4a77eb0e99a6
* | | | | | | Replace Vector _grow/_shrink checks with assert.Jeff Brown2011-07-141-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On review of the code, _grow and _shrink are checking for conditions that cannot happen and that don't even really make sense. For example, if _shrink is called with where + amount > mCount then this is really bad, however the check only considered the case when where >= mCount and then it would arbitrarily choose a new value for where. Huh? As it happens, the callers are correctly validating the arguments before passing them down to these methods so we can get rid of this code. Change-Id: I921852dba8997065bb0e9cac733e82028d14afcd
* | | | | | | Compress the backup output streamChristopher Tate2011-07-131-4/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Zlib compression, with a full flush between each application's data. Encryption will be performed on the already-compressed data once that's implemented. On restore, the streamed data is similarly uncompressed on the fly. Change-Id: I19b65c88e759a66527d10913d18fffa9df0bc011
* | | | | | | Merge "Remove the simulator target from all makefiles. Bug: 5010576"Jeff Brown2011-07-122-8/+0
|\ \ \ \ \ \ \
| * | | | | | | Remove the simulator target from all makefiles.Jeff Brown2011-07-112-8/+0
| | |_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 5010576 Change-Id: I04d722f258951a3078fe07899f5bbe8aac02a8e8
* | | | | | | Fix typo in an assert's logMathias Agopian2011-07-111-2/+2
|/ / / / / / | | | | | | | | | | | | | | | | | | Change-Id: I94883a23a0a92eaf3e4976f942f747a2137499ac
* | | | | | Merge "Add Thread::join"Glenn Kasten2011-07-061-0/+19
|\ \ \ \ \ \
| * | | | | | Add Thread::joinGlenn Kasten2011-06-231-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This new API will be used by applications that previously used the lower-level pthread APIs (including pthread_join). Centralizing on the Thread class instead of pthread will permit additional functionality to be added later in only one location. Change-Id: I8460169ac9c61ac9f85752405ed54c94651058d7
* | | | | | | Merge "Thread ID zero for androidSetThreadSchedulingGroup"Glenn Kasten2011-07-051-0/+4
|\ \ \ \ \ \ \
| * | | | | | | Thread ID zero for androidSetThreadSchedulingGroupGlenn Kasten2011-06-221-0/+4
| |/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Already implemented by androidSetThreadPriority but not documented Change-Id: I85302b17092952065f3f3a4214d8d8abdd465dbd
* | | | | | | Add a linear transform library to libutilsJason Simmons2011-06-282-0/+263
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change-Id: Icdec5a6bebd9d8f24b3f335f8ec8b09a5810a774
* | | | | | | Fix settings restoreChristopher Tate2011-06-241-1/+2
|/ / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also correct the debug-mode logging of error locations in backup data. Bug 4914182 Change-Id: Ie7dda0192afa819e42490b7ffd2d3db6f11968f6
* | | | | | Use rand() for MinGWKenny Root2011-06-151-1/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The version of MinGW we use doesn't have nrand48() which is really lame, but we need to use libutils in the Windows SDK. Change-Id: If854c03dbf02bc29e79f49e4539f08c2bf057517
* | | | | | Merge "Bug 4608375"Glenn Kasten2011-06-141-2/+9
|\ \ \ \ \ \
| * | | | | | Bug 4608375Glenn Kasten2011-06-141-2/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Update priority and policy together for audio threads Change-Id: Ib3b07b32586c222c4aacbf23414ae8b05db502be
* | | | | | | fix RefBase so it retains binary-compatibility with gingerbreadMathias Agopian2011-06-131-9/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug: 4595257 Change-Id: I0d5e10f497e3f39868bff58f6ded510c38b44b12
* | | | | | | Merge "libutils: add a binary blob cache implementation."Jamie Gennis2011-06-134-0/+491
|\ \ \ \ \ \ \
| * | | | | | | libutils: add a binary blob cache implementation.Jamie Gennis2011-05-174-0/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds an implementation of a cache that stores key/value pairs of unstructured binary blobs. Change-Id: Idd01fdabedfa3aed6d359a6efb0592967af52651
* | | | | | | | Merge "Remove redundant memory barrier"Glenn Kasten2011-06-131-8/+5
|\ \ \ \ \ \ \ \ | |_|/ / / / / / |/| | | | | | |
| * | | | | | | Remove redundant memory barrierGlenn Kasten2011-06-101-8/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pthread_create already includes the necessary memory barriers: - parent at pthread_create : pthread_mutex_unlock(start_mutex) - child at __thread_entry : pthread_mutex_lock(start_mutex) Add lock around uses of mThread. Added comments: - uses of mThread require lock - androidCreateRawThreadEtc returned ID is not safe for direct use from non-parent threads. Change-Id: I18cb296b41ddaf64cf127b57aab31154319b5970
* | | | | | | | resolved conflicts for merge of f51ded0f to masterDianne Hackborn2011-06-101-2/+30
|\ \ \ \ \ \ \ \ | |/ / / / / / / |/| | / / / / / | | |/ / / / / | |/| | | | | Change-Id: Ida356524a68aeb2b9b0013dfbb6ab4bd11e616e2
| * | | | | | am a8d7ea06: am 220cd77d: Merge "Enforce public resource restriction on bag ↵Dianne Hackborn2011-06-091-2/+30
| |\ \ \ \ \ \ | | | |/ / / / | | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | parents." into honeycomb-mr2 * commit 'a8d7ea067cf22baeee2ff0a33e5a8c5a35936942': Enforce public resource restriction on bag parents.