summaryrefslogtreecommitdiffstats
path: root/libs/utils
Commit message (Collapse)AuthorAgeFilesLines
...
* | | | | am fbb0e9f9: am bb93dad9: am bb10986c: am 13ce221e: Merge "libutils: Fix an ↵Kenny Root2011-04-261-1/+1
|\ \ \ \ \ | |/ / / / | | | | | | | | | | | | | | | | | | | | | | | | | improper const-cast in RefBase" * commit 'fbb0e9f9846e185ba8ded63d754c4e61b1499b90': libutils: Fix an improper const-cast in RefBase
| * | | | am bb93dad9: am bb10986c: am 13ce221e: Merge "libutils: Fix an improper ↵Kenny Root2011-04-261-1/+1
| |\ \ \ \ | | |/ / / | | | | | | | | | | | | | | | | | | | | | | | | | const-cast in RefBase" * commit 'bb93dad9250c0ee8330ab37bbdcd2eb8bfc0f930': libutils: Fix an improper const-cast in RefBase
| | * | | libutils: Fix an improper const-cast in RefBaseJosh Stone2011-04-221-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Under Fedora 15 Beta, gcc 4.6.0 warns: frameworks/base/libs/utils/RefBase.cpp: In member function ‘void android::RefBase::weakref_type::trackMe(bool, bool)’: frameworks/base/libs/utils/RefBase.cpp:483:67: error: passing ‘const android::RefBase::weakref_impl’ as ‘this’ argument of ‘void android::RefBase::weakref_impl::trackMe(bool, bool)’ discards qualifiers [-fpermissive] trackMe is not a const function, so don't use const in the static_cast to a weakref_impl pointer. Change-Id: I3c9ba73eb127985f5f54197ffecf2939c50f632c
* | | | | Initial checkin of spot presentation for touchpad gestures.Jeff Brown2011-04-191-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added a new PointerIcon API (hidden for now) for loading pointer icons. Fixed a starvation problem in the native Looper's sendMessage implementation which caused new messages to be posted ahead of old messages sent with sendMessageDelayed. Redesigned the touch pad gestures to be defined in terms of more fluid finger / spot movements. The objective is to reinforce the natural mapping between fingers and spots which means there must not be any discontinuities in spot motion relative to the fingers. Removed the SpotController stub and folded its responsibilities into PointerController. Change-Id: I5126b1e69d95252fda7f2a684c9287e239a57163
* | | | | resolved conflicts for merge of 18490fb9 to masterKenny Root2011-04-123-56/+860
|\ \ \ \ \ | |/ / / / | | | | | | | | | | Change-Id: I6c68e6fb0f9c1182a955689bbffc161a8f30bd37
| * | | | resolved conflicts for merge of 87b3c0dc to honeycomb-plus-aospKenny Root2011-04-123-56/+860
| |\ \ \ \ | | |/ / / | | | / / | | |/ / | |/| | Change-Id: Ia1a0024aabf531438203eb9fea3a10dd15eabe53
| | * | Runtime resource overlay, iteration 1.Mårten Kongstad2011-04-013-56/+860
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Runtime resource overlay allows unmodified applications to appear as if they had been compiled with additional resources defined. See libs/utils/README for more information. This commit is the first iteration of runtime resource overlay. It provides the actual overlay modifications and loading of trusted overlay packages (ie residing in /vendor) targeting framework-res.apk. This commit loads exactly one overlay package. The overlay, if present, must target framework-res.apk and be located at /vendor/overlay/framework/framework-res.apk. Change-Id: If26ee7754813004a96c043dba37fbe99fa3919db
* | | | Add new resource configurations for screen width/height in "dp".Dianne Hackborn2011-04-061-7/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | You can now specify resource configuration variants "wNNNdp" and "hNNNdp". These are the minimum screen width/height in "dp" units. This allows you to do things like have your app adjust its layout based only on the about of horizontal space available. This introduces a new configuration change flag for screen size. Note that this configuration change happens each time the orientation changes. Applications often say they handle the orientation change to avoid being restarted at a screen rotation, and this will now cause them to be restarted. To address this, we assume the app can handle this new config change if its target SDK version is < ICS. Change-Id: I22f8afa136b4f274423978c570fa7c9855040496
* | | | Include strings.h for the strcasecmp prototype.Carl Shapiro2011-03-211-1/+1
| | | | | | | | | | | | | | | | Change-Id: I0659ce2186547274e58f8b2027e16d3e45189353
* | | | Refactor how timeouts are calculated.Jeff Brown2011-03-172-12/+25
|/ / / | | | | | | | | | | | | | | | | | | | | | Added a timeout mechanism to EventHub and InputReader so that InputMappers can request timeouts to perform delayed processing of input when needed. Change-Id: Iec2045baaf4e67690b15eef3c09a58d5cac76897
* | | Fade out the mouse pointer after inactivity or other events.Jeff Brown2011-03-022-30/+450
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fades out the mouse pointer: - after 15 seconds of inactivity normally - after 3 seconds of inactivity in lights out mode - after a non-modifier key down - after a touch down Extended the native Looper to support enqueuing time delayed messages. This is used by the PointerController to control pointer fade timing. Change-Id: I87792fea7dbe2d9376c78cf354fe3189a484d9da
* | | Fix sp<> conversion operator / constructorMathias Agopian2011-02-251-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | some of the conversion operators were not using the proper pointer type when calling incStrong/decStrong, usually it has no bad consequences, but for some implementation of the ref-counted object it could lead to recording the wrong owner id. Change-Id: If574b9069b8a4cf6e0911a992c8f095aba799995
* | | Merge "Fix some issues with RefBase debugging."Mathias Agopian2011-02-241-70/+101
|\ \ \
| * | | Fix some issues with RefBase debugging.Mathias Agopian2011-02-231-70/+101
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | First slipt sp<> out of RefBase into StrongPointer.h so it can be reused more easily and to make it clear that it doesn't require RefBase. Note: the rest of the change only affects the system when DEBUG_REFS is enabled. The main problem we fix here is that the owner id associated with each reference could get out of date when a sp<> or wp<> was moved, for instance when they're used in a Vector< >. We fix this issue by calling into RefBase::moveReferences from a template specialization for sp<TYPE> and wp<TYPE> of the type helpers. RefBase::moveReferences() has then a chance to update the owner ids. There is a little bit of trickery to implement this generically in RefBase, where we need to use a templatized functor that can turn a sp<TYPE>* casted to a void* into a RefBase*. Introduced a new debug option DEBUG_REFS_FATAL_SANITY_CHECKS currently set to 0 by default as there seem to be an issue with sp<ANativeWindow> which trips the sanity checks. Change-Id: I4825b21c8ec47d4a0ef35d760760ae0c9cdfbd7f
* | | | Merge "Bug 3362814 Fix SMP race in access to mRequestExit"Glenn Kasten2011-02-241-4/+23
|\ \ \ \ | |/ / / |/| | |
| * | | Bug 3362814 Fix SMP race in access to mRequestExitGlenn Kasten2011-02-231-4/+23
| | | | | | | | | | | | | | | | | | | | | | | | Also fix an unlikely SMP race in access to mHoldSelf on entry to _threadLoop. Change-Id: I6cbc0b94739c7dd5e77e8a5ba0da22cdc0b1a4db
* | | | Remove RefBase.h dependency on TextOutput.hMathias Agopian2011-02-221-1/+17
|/ / / | | | | | | | | | Change-Id: I72cd6b98ef82b4868fe1c8ec87862cf43fb4ee73
* | | Clean up use of HAVE_ANDROID_OSKenny Root2011-02-162-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | HAVE_ANDROID_OS was defined as "1" for targets, but never defined as "0" for non-targets. Changing them to #ifdef should be safe and matches all the other uses of HAVE_ANDROID_OS throughout the system. Change-Id: I82257325a8ae5e4e4371ddfc4dbf51cea8ea0abb
* | | am 1314bdb2: am e88fa50b: Merge from open-source gingerbreadJean-Baptiste Queru2011-01-301-0/+1
|\ \ \ | |/ / | | | | | | | | | * commit '1314bdb2b22ae3613c3e08ae278dbc70f90b965c': fix failing thread object run
| * | am e88fa50b: Merge from open-source gingerbreadJean-Baptiste Queru2011-01-301-0/+1
| |\ \ | | |/ | | | | | | | | | * commit 'e88fa50be8d6709ef58b7aeb01c5efa059bcac2e': fix failing thread object run
| | * Merge from open-source gingerbreadJean-Baptiste Queru2011-01-301-0/+1
| | |\ | | | | | | | | | | | | Change-Id: I56f2ed37187796807fbf0de15274a85164f9432c
| | | * fix failing thread object runRitu Srivastava2011-01-251-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A previously exited Thread object refuses to run again, if the thread-id of the caller, conincides with the thread-id it previously used in the worker thread. Hence reset the previously used worker thread-id to -1 when it exits. Signed-off-by: Ritu Srivastava <rsrivast@sta.samsung.com> Change-Id: I873925c312a43ec8a16392b98cc959042ff6bfd2 Signed-off-by: Madan Ankapura <mankapur@sta.samsung.com>
* | | | am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"Dianne Hackborn2011-01-291-2/+34
|\ \ \ \ | |/ / / | | | | | | | | | | | | * commit 'a1f5e82f37c77af7b1d630b5bca715d1742f1234': Normalize output from aapt d
| * | | am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"Dianne Hackborn2011-01-291-2/+34
| |\ \ \ | | |/ / | |/| | | | | | | | | | * commit 'a30063d80c08434ac3c7316f338c6d54110449ab': Normalize output from aapt d
| | * | Normalize output from aapt dShachar Shemesh2011-01-041-2/+34
| | |/ | | | | | | | | | | | | | | | | | | Make the output from aapt dump --values resources and aapt dump xmltree normalized, so that it is unambigously displayed regardless of the content of the strings. Change-Id: Ia3bff36c4ee1e9a44f474534e154830948beabdf
| * | Fix issue 3302649.Eric Laurent2011-01-041-0/+3
| |/ | | | | | | | | | | | | | | | | | | The cause of the problem is that AudioTrack::start() can fail if it is called from a newly created thread that has the same ID as the AudioTrack callback thread that has just been stopped and not yet exited. This is possible as the thread ID used by the Thread class is not the TID. The fix consists in clearing the thread ID before exiting the thread loop. Change-Id: I66e679665c384403cb3ba2c31746f5de72d5836d
* | Fix issue #3392073: At times soft keyboard comes up in...Dianne Hackborn2011-01-271-2/+2
| | | | | | | | | | | | | | | | ...gallery while attaching picture to gmail message In various places we could block switching the IME target incorrectly. Change-Id: I7e647fb35f4ea6f2e39eb7efd911420ea9ee64fa
* | Fix issue 3302649.Eric Laurent2011-01-121-0/+3
| | | | | | | | | | | | | | | | | | | | The cause of the problem is that AudioTrack::start() can fail if it is called from a newly created thread that has the same ID as the AudioTrack callback thread that has just been stopped and not yet exited. This is possible as the thread ID used by the Thread class is not the TID. The fix consists in clearing the thread ID before exiting the thread loop. Change-Id: I8b5f6a63feeaeb9a01267380e85f6f1456e7aa01
* | Add initial support for cursor-based pointing devices.Jeff Brown2010-12-291-0/+6
| | | | | | | | | | | | | | Some parts stubbed out but you can plug in a mouse and move a green cursor around to interact with the UI. Change-Id: I80d597a7f11d3bd92041890f74b3c77326975e6e
* | Change assets to use 64-bit APIKenny Root2010-12-087-77/+81
| | | | | | | | | | | | | | | | | | | | | | | | | | The asset system and supporting libraries were using off_t instead of off64_t to access files larger than 2GB (32-bit signed). This change replaces all off_t with off64_t and lseek64. There is a new utils/Compat.h added for Mac OS compatibility. Also fixed some size-related compiler warnings. Bug: 3205336 Change-Id: I9097b3cb7a602e811fe52f245939d8975da55e9e
* | Improve support for external keyboards.Jeff Brown2010-12-023-20/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use Vendor ID, Product ID and optionally the Version to locate keymaps and configuration files for external devices. Moved virtual key definition parsing to native code so that EventHub can identify touch screens with virtual keys and load the appropriate key layout file. Cleaned up a lot of old code in EventHub. Fixed a regression in ViewRoot's fallback event handling. Fixed a minor bug in FileMap that caused it to try to munmap or close invalid handled when released if the attempt to map the file failed. Added a couple of new String8 conveniences for formatting strings. Modified Tokenizer to fall back to open+read when mmap fails since we can't mmap sysfs files as needed to open the virtual key definition files in /sys/board_properties/. Change-Id: I6ca5e5f9547619fd082ddac47e87ce185da69ee6
* | Support non-orientation aware keyboards and other devices.Jeff Brown2010-11-302-0/+213
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixed a bug with dpad keys on external keyboards being rotated according to the display orientation by adding a new input device configuration property called "keyboard.orientationAware". Added a mechanism for overriding the key layout and key character map in the input device configuration file using the new "keyboard.layout" and "keyboard.characterMap" properties. Also added "trackball.orientationAware", "touch.orientationAware" and "touch.deviceType" configuration properties. Rewrote the configuration property reading code in native code so that it can be used by EventHub and other components. Added basic support for installable idc, kl, and kcm files in /data/system/devices. However, there is no provision for copying files there yet. Disabled long-press character pickers on full keyboards so that key repeating works as expected. Change-Id: I1bd9f0c3d344421db444e7d271eb09bc8bab4791
* | Fix SDK build on Windows due to use of mmap.Jeff Brown2010-11-191-15/+17
| | | | | | | | Change-Id: Id4bd9a6f932285c93c5853e540efc20b99876564
* | Added support for full PC-style keyboards.Jeff Brown2010-11-183-6/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | BREAKING CHANGE: Redesigned the key character map format to accomodate full keyboards with more comprehensive suite of modifiers. Old key character maps will not work anymore and must be updated. The new format is plain text only and it not compiled to a binary file (so the "kcm" tool will be removed in a subsequent check-in). Added FULL keyboard type to support full PC-style keyboards. Added SPECIAL_FUNCTION keyboard type to support special function keypads that do not have any printable keys suitable for typing and only have keys like HOME and POWER Added a special VIRTUAL_KEYBOARD device id convention that maps to a virtual keyboard with a fixed known layout. This is designed to work around issues injecting input events on devices whose built-in keyboard does not have a useful key character map (ie. when the built-in keyboard is a special function keyboard only.) Modified several places where events were being synthesized to use the virtual keyboard. Removed support for the "qwerty" default layout. The new default layout is "Generic". For the most part "qwerty" was being used as a backstop in case the built-in keyboard did not have a key character map (probably because it was a special function keypad) and the framework needed to be able to inject key events anyways. The latter issue is resolved by using the special VIRTUAL_KEYBOARD device instead of BUILT_IN_KEYBOARD. Added the concept of a key modifier behavior so that MetaKeyKeyListener can distinguish between keyboards that use chorded vs. toggled modifiers. Wrote more robust key layout and key character map parsers to enable support for new keyboard features and user installable key maps. Fixed a bug in InputReader generating key ups when keys are released out of sequence. Updated tons of documentation. Currently QwertyKeyListener is being used for full keyboards with autotext and capitalization disabled. This mostly works but causes some problems with character pickers, etc. These issues will be resolved in subsequent changes. Change-Id: Ica48f6097a551141c215bc0d2c6f7b3fb634d354
* | Split UTF functions from String8/16Kenny Root2010-11-127-623/+814
| | | | | | | | | | | | | | Split out all the UTF-8/16/32 handling code from String8/16 to its own file to allow better reuse of code. Change-Id: If9ce63920edc75472c38da4adce0d13cda9ad2f7
* | Fix default return code for getResourceKenny Root2010-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | Reorganization of getResource to allow for other densities accidentally overrode the default return code for getResource from BAD_VALUE to BAD_INDEX. This corrects the default return to BAD_VALUE which restores other things to working. Bug: 3155824 Change-Id: I13dafff85bc6978c5f5435fc09ab0474c7885c4d
* | Add path to get different DPI drawablesKenny Root2010-10-291-10/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | Allow a caller to request a different density than their current display allows. This can mean a device displaying mdpi can get a resource that's in hdpi and have it pretend to be in mdpi resolution. If a drawable that's returned is not in the requested density, it will set it at the appropriate density to be scaled up later on. The API for this is hidden currently. Bug: 3134688 Change-Id: I6c3908cbdef4907b8d3f1576df9e3b0e7af1755a
* | am 7ba8c44e: am 8ad30b5b: Merge "Initialized check in ↵Kenny Root2010-10-221-1/+9
|\ \ | |/ | | | | | | | | | | | | | | ZipFileRO::findEntryByName" into gingerbread Merge commit '7ba8c44ef7ba22d83a670e50314d69d0ddce1b9c' * commit '7ba8c44ef7ba22d83a670e50314d69d0ddce1b9c': Initialized check in ZipFileRO::findEntryByName
| * Initialized check in ZipFileRO::findEntryByNameKenny Root2010-10-211-1/+9
| | | | | | | | | | | | | | | | If a ZipFileRO object is uninitialized, the hash table will not have been initialized. This condition wasn't checked in findEntryByName. Bug: 3121109 Change-Id: Ib696e0e7e0cb4dd0fb2e456d6a847e5e8f4fe14e
* | resolved conflicts for merge of 368fdba4 to masterBrad Fitzpatrick2010-10-211-1/+2
|\ \ | |/ | | | | Change-Id: I42b7b433c86a71a5da5db67109f056a280077c9d
| * Reduce logging.Joe Onorato2010-10-191-1/+2
| | | | | | | | | | | | | | | | | | | | Remember, the system and main logs are - Shared resources - Primarily for recording problems - To be used only for large grained events during normal operation Bug: 3104855 Change-Id: I136fbd101917dcbc8ebc3f96f276426b48bde7b7
* | Add keycodes and meta-key modifiers to support external keyboards.Jeff Brown2010-10-151-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Added new key maps for external keyboards. These maps are intended to be shared across devices by inheriting the "keyboards.mk" product makefile as part of the device's product definition. One of the trickier changes here was to unwind some code in MetaKeyKeyListener that assumed that only the low 8 bits of the meta key state were actually used. The new code abandons bitshifts in favor of simple conditionals that are probably easier to read anyways. The special meta key state constants used by MetaKeyKeyListener are now (@hide) defined in KeyEvent now so as to make it clearer that they share the same code space even if those codes are not valid for KeyEvents. The EventHub now takes care of detecting the appropriate key layout map and key character map when the device is added and sets system properties accordingly. This avoids having duplicate code in KeyCharacterMap to probe for the appropriate key character map although the current probing mechanism has been preserved for legacy reasons just in case. Added support for tracking caps lock, num lock and scroll lock and turning their corresponding LEDs on and off as needed. The key character map format will need to be updated to correctly support PC style external keyboard semantics related to modifier keys. That will come in a later change so caps lock doesn't actually do anything right now except turn the shiny LEDs on and off... Added a list of symbolic key names to KeyEvent and improved the toString() output for debug diagnosis. Having this list in a central place in the framework also allows us to remove it from Monkey so there is one less thing to maintain when we add new keycodes. Bug: 2912307 Change-Id: If8c25e8d50a7c29bbf5d663c94284f5f86de5da4
* | am 729503c2: am 848a2bc4: Merge "MinGW/Cygwin requires open() in O_BINARY ↵Raphael Moll2010-10-151-20/+37
|\ \ | |/ | | | | | | | | | | | | | | mode." into gingerbread Merge commit '729503c280e0d5b2621a8b7a6c93dd20fe1f5d0f' * commit '729503c280e0d5b2621a8b7a6c93dd20fe1f5d0f': MinGW/Cygwin requires open() in O_BINARY mode.
| * MinGW/Cygwin requires open() in O_BINARY mode.Raphael Moll2010-10-131-20/+37
| | | | | | | | | | | | Alsso printf %zd is not supported on MinGW/Cygwin. Change-Id: I03811dabb46e2b05dd1d8abcc0ff97b125c77d54
* | am 8fda1636: am bdf8034c: Merge "OBB: use PBKDF2 for key generation." into ↵Kenny Root2010-10-152-17/+45
|\ \ | |/ | | | | | | | | | | | | | | gingerbread Merge commit '8fda1636e3e35f060b9046294efd3c062a1fdb84' * commit '8fda1636e3e35f060b9046294efd3c062a1fdb84': OBB: use PBKDF2 for key generation.
| * OBB: use PBKDF2 for key generation.Kenny Root2010-10-132-17/+45
| | | | | | | | | | | | | | | | | | Switch to using PBKDF2 for the key generation for OBBs. Any previously generated OBBs will stop being read correctly. A small pbkdf2gen program is available to allow generation of appropriate keys with the salts. Bug: 3059950 Change-Id: If4305c989fd692fd1150eb270dbf751e09c37295
* | am 22cb4ef8: am d577cfd7: Merge "Switch Looper back to using poll() instead ↵Jeff Brown2010-10-102-45/+254
|\ \ | |/ | | | | | | | | | | | | | | of epoll()." into gingerbread Merge commit '22cb4ef8ce9c4d5536ac5cee5c40b82bfa56ccc5' * commit '22cb4ef8ce9c4d5536ac5cee5c40b82bfa56ccc5': Switch Looper back to using poll() instead of epoll().
| * Switch Looper back to using poll() instead of epoll().Jeff Brown2010-10-072-45/+254
| | | | | | | | | | | | | | | | | | | | | | | | Added a couple of micro-optimizations to avoid calling wake() unnecessarily and reduce JNI overhead slightly. Fixed a minor issue where we were not clearing the "next" field of Messages returned by the MessageQueue so the Message would hold on to its successor and potentially prevent the GC from collecting it if the message were leaked somehow. Change-Id: I488d29417ce0cdd7d0e447cda76ec978ef7f811c
* | am bfa33b94: am f84a5918: Merge "Use pread() in ZipFileRO for Linux" into ↵Kenny Root2010-10-051-1/+32
|\ \ | |/ | | | | | | | | | | | | | | gingerbread Merge commit 'bfa33b9484e2c0a019ab81f30261b9696df23a9b' * commit 'bfa33b9484e2c0a019ab81f30261b9696df23a9b': Use pread() in ZipFileRO for Linux
| * Use pread() in ZipFileRO for LinuxKenny Root2010-10-041-1/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | AssetManager instances are created by zygote and passed to all its children so that they don't have to individually open frameworks-res.apk. This creates a problem for determining the current file offset when using lseek() on those files, because you can't guarantee the cross-process locking of a mutex. Luckily, Linux implements pread() to get around this suckiness. The problem is that only Linux implements this, so we have to keep the old locking for use on host builds with aapt and friends. aapt doesn't have this same problem of sharing file descriptors across forked processes, so we can keep the local AutoMutex to protect accesses of those files. Change-Id: Ibe9f11499a53fe345f50fbaea438815ec0fd363e