summaryrefslogtreecommitdiffstats
path: root/libs/ui
Commit message (Collapse)AuthorAgeFilesLines
* Mouse pointer integration.Jeff Brown2011-01-048-12365/+0
| | | | | | | | | | Added support for loading the pointer icon from a resource. Moved the system server related bits of the input manager out of libui and into libinput since they do not need to be linked into applications. Change-Id: Iec11e0725b3add2b905c51f8ea2c3b4b0d1a2d67
* Add initial support for cursor-based pointing devices.Jeff Brown2010-12-294-112/+311
| | | | | | | 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
* Fix race condition in fallback key processing.Jeff Brown2010-12-091-4/+12
| | | | | | | Need to ensure that the channel is still valid before proceeding. Bug: 3271482 Change-Id: Ia6863cbedd9b53cbc5c9c8815e9ea90bef3d2218
* fix [3259708] Graphic Buffer Mapper does not support YV12Mathias Agopian2010-12-082-161/+17
| | | | | | remove a bunch of a code that was there only to support broken gralloc implementations Change-Id: I3c1a9172224cbcc283601abfbbd695a20815451f
* remove support for PUSH_BUFFER surfaces and overlaysMathias Agopian2010-12-083-284/+0
| | | | | | | the same functionality is now supported through the h/w composer HAL, and YUV support in the GPU. Change-Id: I8146605449954b8e8fd7f78810b7d873c2d8f5bf
* surfaceflinger: add support for gralloc dump hooksErik Gilling2010-12-082-1/+15
| | | | Change-Id: Ib6f539ed0132b70d040d653c03d52cc04249ac3c
* Add support for fallback keycodes.Jeff Brown2010-12-077-62/+163
| | | | | | | | | | | | | | | | | | | | | | | | | | This change enables the framework to synthesize key events to implement default behavior when an application does not handle a key. For example, this change enables numeric keypad keys to perform their associated special function when numlock is off. The application is informed that it is processing a fallback keypress so it can choose to ignore it. Added a new keycode for switching applications. Added ALT key deadkeys. New default key mappings: - ESC -> BACK - Meta+ESC -> HOME - Alt+ESC -> MENU - Meta+Space -> SEARCH - Meta+Tab -> APP_SWITCH Fixed some comments. Fixed some tests. Change-Id: Id7f3b6645f3a350275e624547822f72652f3defe
* am 48f42f8c: am 4153bf3a: Merge "[3171580] don\'t automatically log ↵Mathias Agopian2010-12-072-4/+12
|\ | | | | | | | | | | | | GraphicBuffer allocation failures" into gingerbread * commit '48f42f8c3fbd33b2f46c6290ff5963dd58938cf9': [3171580] don't automatically log GraphicBuffer allocation failures
| * am 4153bf3a: Merge "[3171580] don\'t automatically log GraphicBuffer ↵Mathias Agopian2010-12-072-4/+12
| |\ | | | | | | | | | | | | | | | | | | allocation failures" into gingerbread * commit '4153bf3a259624a2f2dc497b77b225a1fb517abc': [3171580] don't automatically log GraphicBuffer allocation failures
| | * [3171580] don't automatically log GraphicBuffer allocation failuresMathias Agopian2010-12-032-4/+12
| | | | | | | | | | | | | | | | | | | | | some of these failures are not fatal and even expected in some cases so they should not emit a dump in the log in those cases. Change-Id: Idcfa252e3bfa9d74e27fe4ad8f8623aa01aa9c5e
* | | Improve support for external keyboards.Jeff Brown2010-12-028-393/+652
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Ensure the ShortcutManager uses the correct key character map.Jeff Brown2010-11-304-20/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ShortcutManager used to only receive the key code of the key event that triggered the shortcut. This change now provides the shortcut manager with the whole key event so it can look up the associated character using the correct key character map. To make this more efficient, added a mechanism for recycling key events. At the moment it is only used by key events owned by the system process, since clients of the existing API (such as Views) might continue to hold on to key events after dispatch has finished so they would break if the key event were recycled by the framework. Deprecated KeyCharacterMap.BUILT_IN_KEYBOARD. Change-Id: I4313725dd63f2be01c350c005a41c7fde9bc67e8
* | | Support non-orientation aware keyboards and other devices.Jeff Brown2010-11-305-275/+430
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | Merge "Port Emulator keymaps."Jeff Brown2010-11-232-4/+40
|\ \ \
| * | | Port Emulator keymaps.Jeff Brown2010-11-232-4/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Also added a validation tool for keymaps (not currently integrated into the build system but getting there). This change brings back Android.mk with the intent that it will be used to validate keymaps in a later change. Added some missing keys that are present on phones. Bug: 3215210 Bug: 3225421 Change-Id: Id817c6e2215164616942c51a42752915d9ceacd3
* | | | am 9df7f313: am f0f6c54b: Merge "frameworks/base: Destroy the overlay even ↵Jean-Baptiste Queru2010-11-231-2/+7
|\ \ \ \ | |/ / / |/| / / | |/ / | | | | | | | | | if there is an error" * commit '9df7f31359866a77a47c9fab3171c71715fd0056': frameworks/base: Destroy the overlay even if there is an error
| * | am f0f6c54b: Merge "frameworks/base: Destroy the overlay even if there is an ↵Jean-Baptiste Queru2010-11-231-2/+7
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | error" * commit 'f0f6c54b13831b11bd7a3bd7a01dc49b7505e56e': frameworks/base: Destroy the overlay even if there is an error
| | * | frameworks/base: Destroy the overlay even if there is an errorNaomi Luis2010-11-221-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Allow the overlay object to be destroyed whenever the destroy is invoked. Currently the destroy call returns if there is an error encountered, which results in open data and control channels. Change-Id: I1f2ef4ebb5fb1dcabf05ab50b5bbf6e5e240a63a
| * | | am b27b8c0c: Fix a key repeating bug. (DO NOT MERGE)Jeff Brown2010-11-181-40/+40
| |\ \ \ | | | |/ | | |/| | | | | | | | | * commit 'b27b8c0caf8ff23d10eea655085769f314050427': Fix a key repeating bug. (DO NOT MERGE)
| | * | Fix a key repeating bug. (DO NOT MERGE)Jeff Brown2010-11-171-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a bug in the dispatcher where the window manager policy would incorrectly receive a key repeat count of 0 in the case where the key repeat was generated by the hardware or driver. Long-press on HOME was broken as a result. Repeating keys could also get stuck down. Bug: 3159581 Bug: 3208156 Change-Id: I1145487cfcc41a7850dba4cafc63c4a5951ace5b
| * | | am bfc1cc2d: Fix stuck keys when released out of order. (DO NOT MERGE)Jeff Brown2010-11-181-2/+2
| |\ \ \ | | |/ / | | | | | | | | | | | | * commit 'bfc1cc2d1ea85cc754e63b422eb8cef8ae6a3667': Fix stuck keys when released out of order. (DO NOT MERGE)
| | * | Fix stuck keys when released out of order. (DO NOT MERGE)Jeff Brown2010-11-171-2/+2
| | | | | | | | | | | | | | | | | | | | Bug: 3208156 Change-Id: I14e4d54f4912de5e2fabcd8638120623aa2d16e0
* | | | Added support for full PC-style keyboards.Jeff Brown2010-11-187-623/+1200
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* | | | am 5e069074: am a15e4886: Merge "Framebuffer: Support variable number of ↵Jean-Baptiste Queru2010-11-171-19/+26
|\ \ \ \ | |/ / / | | | | | | | | | | | | | | | | | | | | framebuffers in the UI" * commit '5e0690745a45f99d12d940dd4aaae814b00a429e': Framebuffer: Support variable number of framebuffers in the UI
| * | | am a15e4886: Merge "Framebuffer: Support variable number of framebuffers in ↵Jean-Baptiste Queru2010-11-171-19/+26
| |\ \ \ | | |/ / | |/| / | | |/ | | | | | | | | | the UI" * commit 'a15e4886de8f75f3cb137f51743d330414c910e8': Framebuffer: Support variable number of framebuffers in the UI
| | * Framebuffer: Support variable number of framebuffers in the UIRodrigo Obregon2010-11-031-19/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change defines a macro NUM_FRAME_BUFFERS to set the desired number of framebuffers to be used by the UI, instead of hard-coding 2 framebuffers. Aditional logic has been added to handle the initialization and destruction of NUM_FRAME_BUFFERS buffers. Change-Id: I3a4bfec3e0f453432f2ffebf084c00f574d3be46 Signed-off-by: Rodrigo Obregon <robregon@ti.com>
| | * Only monitor recognized uevent devices.Sean McNeil2010-08-231-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | system_server can potentially monitor uevent devices that are of no use to it. For instance, an accelerometer implementation as uevents. This would cause the process to be busy when unnecessary. If a device cannot be classified, don't monitor it. Change-Id: I489cc453bdce7cb376102cba67a9ea470e13292d
| | * Keep track of remaining fd when devices are removedJens Gulin2010-06-281-10/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes the wrong fd was accessed when the device was addressed by device id. The earlier implementation assumed that two arrays were in sync but one of them was compacted when devices were removed. Instead of that dependency the device now keeps track of it's file descriptor. Change-Id: I2b8a793d76b89ab464ae830482b309fe86031671
| * | Merge "fix [3148312] Region can access data out of bounds" into gingerbreadMathias Agopian2010-11-081-1/+1
| |\ \
| | * | fix [3148312] Region can access data out of boundsMathias Agopian2010-10-291-1/+1
| | | | | | | | | | | | | | | | Change-Id: Ic46f31d40943f405e37da21a50b55edd5a2c4124
* | | | Enable touch splitting for all windows by default.Jeff Brown2010-11-121-9/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New default only applies to applications with targetSdkVersion >= HONEYCOMB. Old applications default to no touch splitting for their windows. In addition, enabled split touch for various system windows. Bug: 3049580 Change-Id: Idc8da9baa2cd8e1e4e76af8967d7b6a5ccb94427
* | | | The CHEEK_TOUCH stuff never worked. Remove it.Joe Onorato2010-11-081-18/+1
| | | | | | | | | | | | | | | | | | | | Bug: 3104906 Change-Id: Ia37236ba1775fc3ec8c111e2e0b85b105e0dea6a
* | | | Tell system server whether the app handled input events.Jeff Brown2010-11-084-25/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Refactored ViewRoot, NativeActivity and related classes to tell the dispatcher whether an input event was actually handled by the application. This will be used to move more of the global default key processing into the system server instead of the application. Change-Id: If06b98b6f45c543e5ac5b1eae2b3baf9371fba28
* | | | Rename the locked meta key constants for clarity.Jeff Brown2010-11-052-10/+108
| | | | | | | | | | | | | | | | | | | | | | | | Also added some tests for LED setting. Change-Id: I3fd86322afd07ae8de52d1ccbc2fae2c6d586641
* | | | Fix a key repeating bug.Jeff Brown2010-11-021-40/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change fixes a bug in the dispatcher where the window manager policy would incorrectly receive a key repeat count of 0 in the case where the key repeat was generated by the hardware or driver. Long-press on HOME was broken as a result. Bug: 3159581 Change-Id: If0f02662313f5b879a4e566fbb461389e274a550
* | | | Merge "Add plumbing for volume mute key."Jeff Brown2010-11-021-0/+8
|\ \ \ \
| * | | | Add plumbing for volume mute key.Jeff Brown2010-11-021-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Full support for the volume mute key will be implemented in a later change. Bug: 2912307 Change-Id: I98c27d6360f159c8b7447e04b45f442eff87b38a
* | | | | Merge "Optimize FBO drawing with regions. This optimization is currently ↵Romain Guy2010-11-021-1/+1
|\ \ \ \ \ | |/ / / / |/| | | | | | | | | disabled until Launcher is modified to take advantage of it. The optimization can be enabled by turning on RENDER_LAYERS_AS_REGIONS in the OpenGLRenderer.h file."
| * | | | Optimize FBO drawing with regions.Romain Guy2010-11-021-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This optimization is currently disabled until Launcher is modified to take advantage of it. The optimization can be enabled by turning on RENDER_LAYERS_AS_REGIONS in the OpenGLRenderer.h file. Change-Id: I2fdf59d0f4dc690a3d7f712173ab8db3848b27b1
* | | | | am 7ab5d2d9: am a87ea46c: Fix bugs related to cheek event suppression.Jeff Brown2010-11-021-3/+3
|\ \ \ \ \ | |/ / / / |/| / / / | |/ / / | | | | * commit '7ab5d2d951792c9b1a1e7cfb279280c2d076506f': Fix bugs related to cheek event suppression.
| * | | Fix bugs related to cheek event suppression.Jeff Brown2010-11-011-3/+3
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Two issues: 1. First, due to an inverted conditional in the input dispatcher, we were reporting touches as long touches and vice-versa to the power manager. 2. Power manager user activity cheek event suppression also suppresses touch events (but not long touch or up events). As a result, if cheek event suppression was enabled, touches would not poke the user activity timer. However due to the above logic inversion, this actually affected long touches. Net result, if cheek suppression was enabled in the power manager and you held your thumb on the screen long enough, the phone would go to sleep! Cheek event suppression is commonly turned on when making a phone call. Interestingly, it does not seem to get turned off afterward... This change fixes the logic inversion and exempts touches from the cheek suppression. The reason we do the latter is because the old behavior was actually harmful in other ways too: a touch down would be suppressed but not a long touch or the touch up. This would cause bizarre behavior if you touched the screen while it was dimmed. Instead of brightening immediately, it would brighten either when you lifted your finger or 300ms later, whichever came first. Bug: 3154895 Change-Id: Ied9ccec6718fbe86506322ff47a4e3eb58f81834
* | | Fix policy issues when screen is off.Jeff Brown2010-11-011-1/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rewrote interceptKeyBeforeQueueing to make the handling more systematic. Behavior should be identical except: - We never pass keys to applications when the screen is off and the keyguard is not showing (the proximity sensor turned off the screen). Previously we passed all non-wake keys through in this case which caused a bug on Crespo where the screen would come back on if a soft key was held at the time of power off because the resulting key up event would sneak in just before the keyguard was shown. It would then be passed through to the dispatcher which would poke user activity and wake up the screen. - We propagate the key flags when broadcasting media keys which ensures that recipients can tell when the key is canceled. - We ignore endcall or power if canceled (shouldn't happen anyways). Changed the input dispatcher to not poke user activity for canceled events since they are synthetic and should not wake the device. Changed the lock screen so that it does not poke the wake lock when the grab handle is released. This fixes a bug where the screen would come back on immediately if the power went off while the user was holding one of the grab handles because the sliding tab would receive an up event after screen turned off and release the grab handles. Fixed a couple of issues where media keys were being handled inconsistently or not at all, particularly in the case of the new PAUSE, PLAY and RECORD keys. Bug: 3144874 Change-Id: Ie630f5fb6f128cfdf94845f9428067045f42892c
* | | resolved conflicts for merge of df3cccf3 to masterJeff Brown2010-10-271-1/+23
|\ \ \ | |/ / | | | | | | Change-Id: I425496a9fc4e9cbc50ad6938e9dccb14827d9558
| * | 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
* | | Tweak log messages a bit.Jeff Brown2010-10-251-2/+5
| | | | | | | | | | | | Change-Id: Ifadf78c1ab8db49106216c70086f98860795c65f
* | | Add test stubs for newly added methods.Jeff Brown2010-10-241-0/+13
| | | | | | | | | | | | Change-Id: I44139adebbbed1358f613fbcbfcddac6617ef5bd
* | | am 2ef36763: am 860c2df4: Merge "Add unit tests for native input and fix ↵Jeff Brown2010-10-246-21/+3647
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | bugs identified." into gingerbread Merge commit '2ef36763700eff5679d6012e7f078c57f1a4c465' * commit '2ef36763700eff5679d6012e7f078c57f1a4c465': Add unit tests for native input and fix bugs identified.
| * | 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
* | | am d7cd560a: am 1d79a9d9: Use correct size of GAMEPAD_KEYCODESKenny Root2010-10-211-1/+1
|\ \ \ | |/ / | | | | | | | | | | | | | | | Merge commit 'd7cd560af506f75d07034c136bea09b409b4d408' * commit 'd7cd560af506f75d07034c136bea09b409b4d408': Use correct size of GAMEPAD_KEYCODES
| * | 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