summaryrefslogtreecommitdiffstats
path: root/include/utils
Commit message (Collapse)AuthorAgeFilesLines
* fix typo in Vector<>:: push_back and push_frontMathias Agopian2011-04-251-2/+2
| | | | | | parameter were inverted. Change-Id: I867b01de5f58354bb9668fa662dd2a7d78dd3b37
* Add some basic STL compatibility to Vector<>Mathias Agopian2011-04-251-0/+20
| | | | Change-Id: Iaf72623170ee415372c7989d7ba9ff627167449e
* resolved conflicts for merge of 18490fb9 to masterKenny Root2011-04-122-4/+33
|\ | | | | | | Change-Id: I6c68e6fb0f9c1182a955689bbffc161a8f30bd37
| * resolved conflicts for merge of 87b3c0dc to honeycomb-plus-aospKenny Root2011-04-122-4/+33
| |\ | | | | | | | | | Change-Id: Ia1a0024aabf531438203eb9fea3a10dd15eabe53
| | * am 08d9d9a4: Merge "Runtime resource overlay, iteration 1."Kenny Root2011-04-112-4/+33
| | |\ | | | | | | | | | | | | | | | | * commit '08d9d9a46250c4fad66e9b637e8898a3524c4286': Runtime resource overlay, iteration 1.
| | | * Runtime resource overlay, iteration 1.Mårten Kongstad2011-04-012-4/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
| | * | am df6410dc: Merge "Fix [3513017] in lockscreen but showing empty launcher ↵Mathias Agopian2011-03-071-14/+48
| | |\ \ | | | |/ | | |/| | | | | | | | | | | | | | | | | (live wallpaper) only" into gingerbread * commit 'df6410dce3dae0bdb7e13118b3878079a1dcce03': Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) only
| | | * Fix [3513017] in lockscreen but showing empty launcher (live wallpaper) onlyMathias Agopian2011-03-071-14/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 37c2a37 fix [3408713] Dialog window invisible sometimes d35c666 fix [3385504] Surface flinger hang when adding dim surface 1723b04 fix [3389263] OMX.Nvidia.h264.decode fails to shutdown 1b0114f fix a surface leak in SurfaceFlinger Bug: 3513017 Change-Id: Ia13ed8c9cdcb1f484e177cdcaff687e7c88a10c3
| | * | Merge "stubs"Jean-Baptiste Queru2011-01-311-0/+27
| | |\ \
| | | * | stubsJean-Baptiste Queru2011-01-291-0/+27
| | | |/ | | | | | | | | | | | | Change-Id: I829039f3817a172e66eeb9df397e896a488a259d
* | | | Add new resource configurations for screen width/height in "dp".Dianne Hackborn2011-04-061-2/+65
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | Merge "Refactor how timeouts are calculated."Jeff Brown2011-03-171-0/+10
|\ \ \ \
| * | | | Refactor how timeouts are calculated.Jeff Brown2011-03-171-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | | am e22aa623: am 25594e19: am f40e638e: fix [4093196] Device lock up - log ↵Mathias Agopian2011-03-171-0/+3
|\ \ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | spam with SharedBufferStack: waitForCondition(LockCondition) timed out * commit 'e22aa62362a3007ee59ac62d4b5969e216987995': fix [4093196] Device lock up - log spam with SharedBufferStack: waitForCondition(LockCondition) timed out
| * | | | fix [4093196] Device lock up - log spam with SharedBufferStack: ↵Mathias Agopian2011-03-171-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | waitForCondition(LockCondition) timed out a memory corruption happned when the buffer pool was resized (like when playing a video or using camera) and there was no current active buffer. In this case, the faulty code would index into an array at position -1 which corrupted 24 bytes of data. also improved region validation code (ifdef'ed out by default) Bug: 4093196 Change-Id: I915c581d131148959d720e00e3892e9186ab733d
* | | | | am 72064c66: am b0204d0a: am c2b91a61: Merge "Modify the GL renderer\'s ↵Romain Guy2011-03-161-2/+1
|\ \ \ \ \ | |/ / / / | | / / / | |/ / / |/| | | | | | | | | | | functor to pass the clip to WebView" into honeycomb-mr1 * commit '72064c66e20b9cc86900a9d833c228c345a2b2a4': Modify the GL renderer's functor to pass the clip to WebView
| * | | Modify the GL renderer's functor to pass the clip to WebViewRomain Guy2011-03-161-2/+1
| | | | | | | | | | | | | | | | Change-Id: If5efe399ca58f3000b2883e24e9f3736a2025184
* | | | Merge "Improve VelocityTracker numerical stability."Jeff Brown2011-03-151-0/+4
|\ \ \ \
| * | | | Improve VelocityTracker numerical stability.Jeff Brown2011-03-151-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Replaced VelocityTracker with a faster and more accurate native implementation. This avoids the duplicate maintenance overhead of having two implementations. The new algorithm requires that the sample duration be at least 10ms in order to contribute to the velocity calculation. This ensures that the velocity is not severely overestimated when samples arrive in bursts. The new algorithm computes the exponentially weighted moving average using weights based on the relative duration of successive sample periods. The new algorithm is also more careful about how it handles individual pointers going down or up and their effects on the collected movement traces. The intent is to preserve the last known velocity of pointers as they go up while also ensuring that other motion samples do not count twice in that case. Bug: 4086785 Change-Id: I2632321232c64d6b8faacdb929e33f60e64dcdd3
* | | | | am 7d7dcb5e: am 4528a7db: Merge "Bug 4016329 do full string comparisons" ↵Glenn Kasten2011-03-151-2/+2
|\ \ \ \ \ | |/ / / / |/| / / / | |/ / / | | | | | | | | | | | | into honeycomb-mr1 * commit '7d7dcb5ea891ad4c3252ed832ebd06accc96153d': Bug 4016329 do full string comparisons
| * | | Bug 4016329 do full string comparisonsGlenn Kasten2011-03-141-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Use full string comparisons instead of partial for file extension and MIME type. Do case-insensitive comparison of MIME type and file extensions. Fix error in comment for String8::getPathExtension. Remove dead code -- StringTokenizer is unused. Change-Id: I322be6235abbdaab5f7eafa48926dbb2cf46dc29
* | | | Use touch pad gestures to manipulate the pointer.Jeff Brown2011-03-141-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Single finger tap performs a click. 2. Single finger movement moves the pointer (hovers). 3. Button press plus movement performs click or drag. While dragging, the pointer follows the finger that is moving fastest. This is important if there are additional fingers down on the touch pad for the purpose of applying force to an integrated button underneath. 4. Two fingers near each other moving in the same direction are coalesced as a swipe gesture under the pointer. 5. Two or more fingers moving in arbitrary directions are transformed into touches in the vicinity of the pointer. This makes scale/zoom and rotate gestures possible. Added a native VelocityTracker implementation to enable intelligent switching of the active pointer during drags. Change-Id: I5ada57e7f2bdb9b0a791843eb354a8c706b365dc
* | | | am d00353fe: am bc8a8e8c: Merge "Add support for partial invalidates in ↵Romain Guy2011-03-071-0/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | WebView Bug #3461349" into honeycomb-mr1 * commit 'd00353fe3191571a6773ef2d11921cfcff260bc4': Add support for partial invalidates in WebView Bug #3461349
| * | | Add support for partial invalidates in WebViewRomain Guy2011-03-071-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Bug #3461349 This change also fixes two bugs that prevented partial invalidates from working with other views. Both bugs were in our EGL implementation: they were preventing the caller from comparing the current context/surface with another context/surface. This was causing HardwareRenderer to always redraw the entire screen. Change-Id: I33e096b304d4a0b7e6c8f92930f71d2ece9bebf5
* | | | Merge "Add TextLayout Cache"Fabrice Di Meglio2011-03-031-0/+255
|\ \ \ \ | |/ / / |/| | |
| * | | Add TextLayout CacheFabrice Di Meglio2011-03-021-0/+255
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - use GenerationCache for caching - move GenerationCache.h from libs/hwui/utils to include/utils - add #define for cache activation / deactivation Change-Id: Ifaf519f0b5e33b087a453e4aa6430162d8438f20
* | | | Fade out the mouse pointer after inactivity or other events.Jeff Brown2011-03-021-0/+107
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 a wp<> bug where the owner ID would be wrong"Mathias Agopian2011-02-242-11/+10
|\ \ \ \
| * | | | Fix a wp<> bug where the owner ID would be wrongMathias Agopian2011-02-242-11/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | this was introduced recently. we make sure to use the correct owner id (the sp) instead of the wp. Change-Id: I78fdc6ec0c2d3e687278b70442d74d1924b512a2
* | | | | Merge "Fix some issues with RefBase debugging."Mathias Agopian2011-02-243-189/+325
|\ \ \ \ \ | |/ / / /
| * | | | Fix some issues with RefBase debugging.Mathias Agopian2011-02-233-189/+325
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+2
|\ \ \ \ \ | |/ / / / |/| | | |
| * | | | Bug 3362814 Fix SMP race in access to mRequestExitGlenn Kasten2011-02-231-1/+2
| |/ / / | | | | | | | | | | | | | | | | | | | | 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-5/+6
|/ / / | | | | | | | | | Change-Id: I72cd6b98ef82b4868fe1c8ec87862cf43fb4ee73
* | | am b66b7a2c: Merge "fix [3408713] Dialog window invisible sometimes" into ↵Mathias Agopian2011-02-101-14/+48
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | honeycomb * commit 'b66b7a2c183a1423ea629d4f73ed95f9b87d54b7': fix [3408713] Dialog window invisible sometimes
| * | | fix [3408713] Dialog window invisible sometimesMathias Agopian2011-02-091-14/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | weak pointer comparison operators were implemented wrong, they were using the internal "unsafe" pointer. We could end up with two "equal" weak pointer pointing to different objects. this caused KeyedVector keyed by weak pointer to work incorrectly, in turn causing a window that just got added to a list to be immediately removed. Change-Id: Ib191010c39aafa9229109e4211f6c3b2b2f9696d
* | | | am a1f5e82f: am a30063d8: am 25eb0464: Merge "Normalize output from aapt d"Dianne Hackborn2011-01-291-0/+1
|\ \ \ \ | |/ / / |/| / / | |/ / | | | * commit 'a1f5e82f37c77af7b1d630b5bca715d1742f1234': Normalize output from aapt d
| * | Normalize output from aapt dShachar Shemesh2011-01-041-0/+1
| |/ | | | | | | | | | | | | 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
* | Use optimized display lists for all hwaccelerated renderingChet Haase2011-01-241-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Previously, display lists were used only if hardware acceleration was enabled for an application (hardwareAccelerated=true) *and* if setDrawingCacheEnabled(true) was called. This change makes the framework use display lists for all views in an application if hardware acceleration is enabled. In addition, display list renderering has been optimized so that any view's recreation of its own display list (which is necessary whenever the visuals of that view change) will not cause any other display list in its parent hierarchy to change. Instead, when there are any visual changes in the hierarchy, only those views which need to have new display list content will recreate their display lists. This optimization works by caching display list references in each parent display list (so the container of some child will refer to its child's display list by a reference to the child's display list). Then when a view needs to recreate its display list, it will do so inside the same display list object. This will cause the content to get refreshed, but not the reference to that content. Then when the view hierarchy is redrawn, it will automatically pick up the new content from the old reference. This optimization will not necessarily improve performance when applications need to update the entire view hierarchy or redraw the entire screen, but it does show significant improvements when redrawing only a portion of the screen, especially when the regions that are not refreshed are complex and time- consuming to redraw. Change-Id: I68d21cac6a224a05703070ec85253220cb001eb4
* | 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
* | dump callstack on Surface use errorMathias Agopian2010-12-101-1/+1
| | | | | | | | Change-Id: I38e260dd47349b9af3a999dda683a083a94be16d
* | Change assets to use 64-bit APIKenny Root2010-12-086-40/+91
| | | | | | | | | | | | | | | | | | | | | | | | | | 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-022-3/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-301-0/+100
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-1/+3
| | | | | | | | Change-Id: Id4bd9a6f932285c93c5853e540efc20b99876564
* | Added support for full PC-style keyboards.Jeff Brown2010-11-182-0/+125
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-123-139/+167
| | | | | | | | | | | | | | 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
* | Add path to get different DPI drawablesKenny Root2010-10-291-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | Revert "Add length-equality test in String operator== checks."Brad Fitzpatrick2010-10-202-6/+2
| | | | | | | | This reverts commit e28210d401ae4ed1258b84c9b17a172a757190e8.