summaryrefslogtreecommitdiffstats
path: root/libs
Commit message (Collapse)AuthorAgeFilesLines
* Drop all dispatcher state when dispatcher is disabled.Jeff Brown2010-10-271-1/+23
| | | | | | | | | | | This patch makes the dispatcher drop all of its state when it is disabled (when the screen turns off). This ensures that the dispatcher does not get stuck thinking a pointer is still down if the screen turned off while the user was touching the display (such as a fat touch while hitting the power button). Bug: 3098344 Change-Id: If50ef5804870aa1acd3179fd4b40e3cda58dd39d
* Updade Surface (ANativeWindow) format based on its buffers formatMathias Agopian2010-10-251-0/+11
| | | | | | | | this is to allow applications to change the format of a surface's buffer, and have it reflected in EGL; which is needed for EGLConfig validation. Change-Id: Iee074c30ad765881e2409c1d37450b05e561c44d
* Add unit tests for native input and fix bugs identified.Jeff Brown2010-10-236-21/+3647
| | | | | | | | | | | | | | | | | | | | | | Fixed a bug where we would lose the first touch point when swiping out of the virtual key area. Fixed a bug where we would not send an ACTION_MOVE event in cases where individual pointers went down/up and the remaining pointers actually moved. This is important since many applications do not handle pointer movements during ACTION_POINTER_DOWN or ACTION_POINTER_UP. In the case of ACTION_POINTER_UP the movement was completely lost since all pointers were dispatched using their old location rather than the new location. Improved motion event validation to check for duplicate pointer ids. Added an input source constant that was missing from the NDK api but defined in the framework api. Added a timestamp when reporting added/removed devices in EventHub. Bug: 3070082 Change-Id: I3206a030f43b7616e2f48006e5a9d522c4d92e56
* Merge "Initialized check in ZipFileRO::findEntryByName" into gingerbreadKenny Root2010-10-221-1/+9
|\
| * 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
* | Use correct size of GAMEPAD_KEYCODESKenny Root2010-10-211-1/+1
|/ | | | | | | | Compute the actual number of indices in the GAMEPAD_KEYCODES instead of the pure size in bytes. Bug: 3121536 Change-Id: I71edbd8bf6eff2c8cc0ea5c6845362b3d1e06466
* Merge "propagate RS context priority to EGLContext when possible. DO NOT ↵Mathias Agopian2010-10-202-1/+16
|\ | | | | | | MERGE." into gingerbread
| * propagate RS context priority to EGLContext when possible. DO NOT MERGE.Mathias Agopian2010-10-112-1/+16
| | | | | | | | Change-Id: Ic9fa5c71324c629ba4cbb41ee4a9e4549810d05e
* | 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
* | Fix bug where home presses were not poking user activity.Jeff Brown2010-10-181-40/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We now poke user activity twice: once upon dequeueing an event for dispatch and then again just before we dispatch it. The second poke is to compensate for the fact that it can take a few seconds to identify the dispatch target (if the application is responding slowly) but we want to keep the display from going to sleep for X amount of time after the app gets a chance to actually receive the event. This mirrors pre-Gingerbread behavior. Removed some unnecessary code that filters user activity pokes when sending events to KeyGuard. We don't need this because KeyGuard already tells the power manager to disable user activity. Bug: 3101397 Change-Id: I8c3a77601fdef8f584e84cfdd11aa79da0ff51db
* | Fix a native crash in input dispatcher when windows are removed.Jeff Brown2010-10-151-1/+1
| | | | | | | | | | Bug: 3101826 Change-Id: I040838600a6105c8d9f3235025dc0a7b5b27da2e
* | Add support for secure system overlays. (DO NOT MERGE)Jeff Brown2010-10-151-2/+3
| | | | | | | | | | | | | | | | | | | | This change adds a new window type for secure system overlays created by the system itself from non-secure system overlays that might be created by applications that have the system alert permission. Secure views ignore the presence of secure system overlays. Bug: 3098519 Change-Id: I8f8398f4fdeb0469e5d71124c21bedf121bd8c07
* | Merge "Improve input device calibration format." into gingerbreadJeff Brown2010-10-151-111/+176
|\ \
| * | Improve input device calibration format.Jeff Brown2010-10-141-111/+176
| | | | | | | | | | | | | | | | | | | | | | | | | | | Added support for calibrating touch size for devices that report size as an area measurement rather than as a width. Fixed some bugs. Bug: 3096045 Change-Id: I30a12e73752883516ed054f8af407204bca45814
* | | Merge "MinGW/Cygwin requires open() in O_BINARY mode." into gingerbreadRaphael Moll2010-10-141-20/+37
|\ \ \ | |/ / |/| |
| * | 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
* | | Merge "Make sure EventHub reports added/removed devices immediately." into ↵Jeff Brown2010-10-141-3/+8
|\ \ \ | |/ / |/| | | | | gingerbread
| * | Make sure EventHub reports added/removed devices immediately.Jeff Brown2010-10-141-3/+8
| | | | | | | | | | | | | | | | | | | | | | | | Fixed a bug where EventHub would not report changes in devices until the next event. Bug: 3096147 Change-Id: Ie4c3e1d14d0ad806cfaa212611ce06034d1b94d4
* | | Merge "OBB: use PBKDF2 for key generation." into gingerbreadKenny Root2010-10-132-17/+45
|\ \ \
| * | | 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
* | | | implement part of [3094280] New animation for screen on and screen offMathias Agopian2010-10-131-0/+15
|/ / / | | | | | | | | | | | | | | | add support for screen on animation Change-Id: If50cf52ae04b95b42da7d74cf7fa96d5cb54d238
* | | turn off the electron beamMathias Agopian2010-10-121-0/+15
|/ / | | | | | | Change-Id: I335fb6719f1d5a3f1c6f37a046fd1c2c4ed2bbc6
* | Improve the input policy handling a bit.Jeff Brown2010-10-121-8/+6
| | | | | | | | | | | | | | Fixed some issues with Monkeys turning off their own screens. Ook ook! Added some more comments to explain what's going on. Change-Id: Id2bc0466161a642a73ef7ef97725d1c81e984b12
* | Fix a bug synthesizing cancelation events for motions.Jeff Brown2010-10-111-1/+1
|/ | | | Change-Id: I881c0fa16c1d22c4b1b6cca24deb0105405ff5b0
* Merge "Change to new binder implementation for OBB" into gingerbreadKenny Root2010-10-111-1/+4
|\
| * Change to new binder implementation for OBBKenny Root2010-10-111-1/+4
| | | | | | | | Change-Id: I3282df361a11fc37e94bc5ba4bd5860ae62a10e4
* | Merge "OBB: rearrange to be entirely asynchronous" into gingerbreadKenny Root2010-10-112-5/+7
|\ \ | |/
| * OBB: rearrange to be entirely asynchronousKenny Root2010-10-112-5/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | Rearrange structure of MountService handling of OBBs to be entirely asynchronous so we don't rely on locking as much. We still need the locking to support dumpsys which has been improved to output all the data structures for OBBs. Added more tests to cover more of the error return codes. Oh and fix a logic inversion bug. Change-Id: I34f541192dbbb1903b24825889b8fa8f43e6e2a9
* | Fix an event injection bug when the policy is bypassed.Jeff Brown2010-10-111-33/+30
|/ | | | | | | | | | Added the concept of a "trusted" event to distinguish between events from attached input devices or trusted injectors vs. other applications. This change enables us to move certain policy decisions out of the dispatcher and into the policy itself where they can be handled more systematically. Change-Id: I4d56fdcdd31aaa675d452088af39a70c4e039970
* Added more robust tracking and cancelation of events.Jeff Brown2010-10-102-314/+389
| | | | | | | | | | | | | | | | | | | | | | This change fixes several issues where events would be dropped in the input dispatch pipeline in such a way that the dispatcher could not accurately track the state of the input device. Given more robust tracking, we can now also provide robust cancelation of input events in cases where an application might otherwise become out of sync with the event stream due to ANR, app switch, policy decisions, or forced focus transitions. Pruned some of the input dispatcher log output. Moved the responsibility for calling intercept*BeforeQueueing into the input dispatcher instead of the input reader and added support for early interception of injected events for events coming from trusted sources. This enables behaviors like injection of media keys while the screen is off, haptic feedback of injected virtual keys, so injected events become more "first class" in a way. Change-Id: Iec6ff1dd21e5f3c7feb80ea4feb5382bd090dbd9
* Minor fix for InputReader support for non-touchscreen devices.Jeff Brown2010-10-071-1/+1
| | | | Change-Id: I2256e37dd1c6f3836f82786aae14ee5d0c98f4c6
* 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
* Make secure views tolerate IME overlays.Jeff Brown2010-10-051-27/+30
| | | | Change-Id: I3cf09b9d91045f4d9c558b4aace482a7b0bbd3d8
* fix [2835280] Add support for cancelling buffers to ANativeWindowMathias Agopian2010-10-042-11/+53
| | | | | | | | | | There is a new ANativeWindow::cancelBuffer() API that can be used to cancel any dequeued buffer, BEFORE it's been enqueued. The buffer is returned to the list of availlable buffers. dequeue and cancel are not mutually thread safe, they must be called from the same thread or external synchronization must be used. Change-Id: I86cc7985bace8b6a93ad2c75d2bef5c3c2cb4d61
* Merge "refactored screenshot code" into gingerbreadMathias Agopian2010-10-042-2/+58
|\
| * refactored screenshot codeMathias Agopian2010-10-042-2/+58
| | | | | | | | | | | | | | | | | | | | | | the core screenshot function now can capture the screen at any lower resolution performing bilinear filtering. we also now have some client code to interface with the screenshot service. it's now possible to request a screenshot at a lower resolution. Change-Id: I33689bba98507ab928d0898b21596d0d2fe4b953
* | 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
* Merge "ZipFileRO: moar logging and wrap close" into gingerbreadKenny Root2010-10-041-7/+19
|\
| * ZipFileRO: moar logging and wrap closeKenny Root2010-10-011-7/+19
| | | | | | | | | | | | | | | | | | | | | | | | There is apparently still a race upon reading the entry Local File Header that can't be tracked down, so move the LFH check inside the mutex-protected block so we can call lseek again to see where we are when we log an error. Also, close() can fail so use TEMP_FAILURE_RETRY on it so we don't unwittingly leak file descriptors when Mean Mr. EINTR comes a-knocking. Change-Id: I753abad0bd882fe28f7281c406fa76f64393ef4c
* | Wait for initial device scan to finish before updating config.Jeff Brown2010-10-012-26/+32
| | | | | | | | | | | | | | This change narrows the opportunity for a race condition setting the resource Configuration while devices are being updated. Change-Id: I58efa563f4129ab0fce7108511d16a99dff7e451
* | Minor logging changes to input dispatcher to help with debugging.Jeff Brown2010-10-013-70/+138
|/ | | | | | | | Added dumpsys reporting to EventHub. Made the formatting a bit clearer. Added 'Locked' suffix to some internal methods of EventHub. Change-Id: Ic449560bcce378f6361895d27c66854e9724abb0
* Support haptic feedback for virtual keys defined in key layout.Jeff Brown2010-10-011-5/+5
| | | | Change-Id: I83e4108a87332692e03791dc066206becbc7941f
* Move verbose logging of device capabilities to dumpsys.Jeff Brown2010-09-301-138/+161
| | | | Change-Id: I5d55eaebfdf049bd1ac1e7bab2758886cfefc9d7
* Update OBB API to include callbacksKenny Root2010-09-281-3/+3
| | | | | | | | | | | | Add a callback for users of the StorageManager API to be able to receive notifications when the requested operation completes for mountObb and unmountObb. Add NDK API to get to ObbInfo like the Java API has. Also update the docs for the API and remove the "STOPSHIP" comments. Change-Id: I23a4409c7f8b74d3169614beba920b4d667990a4
* Fix bug in split touches.Jeff Brown2010-09-281-1/+2
| | | | Change-Id: I808c2201a06938f82817058059f4ddcc9b1a9ae2
* Fix pointer index when splitting secondary pointers.Jeff Brown2010-09-271-0/+8
| | | | Change-Id: Ib01e810ea5b64501b1303000bbef0f0a1db2114e
* Merge "Add suuport for splitting touch events across windows." into gingerbreadJeff Brown2010-09-272-321/+563
|\
| * Add suuport for splitting touch events across windows.Jeff Brown2010-09-262-321/+563
| | | | | | | | | | | | | | | | | | | | This feature is currently used to enable dragging the start and end selection handles of a TextView at the same time. Could be used for other things later. Deleted some dead code in ArrowKeyMovementMethod and CursorControllers. Change-Id: I930accd97ca1ca1917aab8a807db2c950fc7b409
* | Merge changes I1f7c4535,I741c68a2 into gingerbreadMathias Agopian2010-09-241-0/+28
|\ \ | | | | | | | | | | | | | | | * changes: simple test app for screen capture API add support for [1974164] Be able to take a screen shot on the device
| * | add support for [1974164] Be able to take a screen shot on the deviceMathias Agopian2010-09-241-0/+28
| |/ | | | | | | | | | | | | | | | | | | | | screenshots are taken using ISurfaceComposer::captureScreen() which returns the size of the screenshot and an IMemoryHeap containing the data. screenshots have limitations: - they will always fail if a secure window is up on screen - require GL_OES_framebuffer_object extension - in some situation, video planes won't been captured Change-Id: I741c68a2d2984fb139039301c3349e6780e2cd58