summaryrefslogtreecommitdiffstats
path: root/libs/ui
Commit message (Collapse)AuthorAgeFilesLines
* fix [4093196] Device lock up - log spam with SharedBufferStack: ↵Mathias Agopian2011-03-171-1/+11
| | | | | | | | | | | | | | | 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
* ANativeWindow: add query for the concrete type.Jamie Gennis2011-03-141-0/+3
| | | | | | | | This change adds a query to the ANativeWindow interface for getting the concrete type of the ANativeWindow. Bug: 4086509 Change-Id: I64aa86d72fbca3b52a98e1fc35608737781a3178
* Input improvements and bug fixes.Jeff Brown2011-03-091-8/+15
| | | | | | | | | | | | | | | | | | | | | Associate each motion axis with the source from which it comes. It is possible for multiple sources of the same device to define the same axis. This fixes new API that was introduced in MR1. (Bug: 4066146) Fixed a bug that might cause a segfault when using a trackball. Only fade out the mouse pointer when touching the touch screen, ignore other touch pads. Changed the plural "sources" to "source" in several places in the InputReader where we intend to refer to a particular source rather than to a combination of sources. Improved the batching code to support batching events from different sources of the same device in parallel. (Bug: 3391564) Change-Id: I0189e18e464338f126f7bf94370b928e1b1695f2
* Joystick tweaks. (DO NOT MERGE)Jeff Brown2011-03-041-12/+85
| | | | | | | | | | | | | | | | | | Ensure that the joystick can always reach -1.0, 0.0 and 1.0 positions even when noise filtering is applied. (Bug: 3514510) Add support for a few more standard axes. Add additional mapping modes for axes. Some axes are inverted from standard interpretation or are actually intended to be split into two distict axes such as left/right trigger controls or accelerator/brake. Add key layout file for a G25 racing wheel and XBox 360 controller to tweak behavior. They work fine without them but the axis mappings are not ideal. Change-Id: I0fddd90309af4dc14d35f34fe99ed6e521c0b7c7
* Wake screen from external HID peripherals.Jeff Brown2011-03-021-0/+17
| | | | | | | | | | | | | | | | | | Added some plumbing to enable the policy to intercept motion events when the screen is off to handle wakeup if needed. Added a basic concept of an external device to limit the scope of the wakeup policy to external devices only. The wakeup policy for internal devices should be based on explicit rules such as policy flags in key layout files. Moved isTouchEvent to native. Ensure the dispatcher sends the right event type to userActivity for non-touch pointer events like HOVER_MOVE and SCROLL. Bug: 3193114 Change-Id: I15dbd48a16810dfaf226ff7ad117d46908ca4f86
* Fade out the mouse pointer after inactivity or other events.Jeff Brown2011-03-021-0/+21
| | | | | | | | | | | | | | 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
* Add new hover move action and scroll wheel plumbing.Jeff Brown2011-02-191-1/+2
| | | | | | | | | | | | Added support for tracking the mouse position even when the mouse button is not pressed. To avoid confusing existing applications, mouse movements are reported using the new ACTION_HOVER_MOVE action when the mouse button is not pressed. Added some more plumbing for the scroll wheel axes. The values are reported to Views but they are not yet handled by the framework. Change-Id: I1706be850d25cf34e5adf880bbed5cc3265cf4b1
* Add new axes for joysticks and mouse wheels.Jeff Brown2011-02-194-145/+430
| | | | | | | | | | | | | | | | | | Added API on InputDevice to query the set of axes available. Added API on KeyEvent and MotionEvent to convert keycodes and axes to symbolic name strings for diagnostic purposes. Added API on KeyEvent to query if a given key code is a gamepad button. Added a new "axis" element to key layout files to specify the mapping between raw absolute axis values and motion axis ids. Expanded the axis bitfield to 64bits to allow for future growth. Modified the Makefile for keyboard prebuilts to run the keymap validation tool during the build. Added layouts for two game controllers. Added default actions for game pad button keys. Added more tests. Fixed a bunch of bugs. Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
* Fix a regression with MotionEvent parceling.Jeff Brown2011-02-175-54/+498
| | | | | | Also added some more unit tests. Change-Id: I413654294d1a998eec056884e6df5eaa50f3daf4
* Add support for arbitrary axes in MotionEvents.Jeff Brown2011-02-153-39/+343
| | | | | | | | | | | This change makes it possible to extend the set of axes that are reported in MotionEvents by defining new axis constants. The MotionEvent object is now backed by its C++ counterpart to avoid having to maintain multiple representations of the same data. Change-Id: Ibe93c90d4b390d43c176cce48d558d20869ee608
* Use EGL_NATIVE_VISUAL_ID to select EGLConfigMathias Agopian2011-01-191-19/+4
| | | | | | | | EGLUtils::selectConfigForPixelFormat() now uses EGL_NATIVE_VISUAL_ID to select a config with the proper format. this is more robust and future proof. Change-Id: I7245d904adab1e339f062b9b498ddd9324cfe7a4
* improve SurfaceFlinger 'dumpsys' logMathias Agopian2011-01-191-1/+1
| | | | | | | list the purgatory, which shows windows that have been closed, but for which the client still has references. Change-Id: I5168bb88cb328d5d77d71d0871deb9190f493126
* Make getFallbackAction return false when there is none.Jeff Brown2011-01-141-3/+5
| | | | Change-Id: Id17c0f7269e4a228f4e5f11c54614fec508222a2
* 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