summaryrefslogtreecommitdiff
path: root/services/java/com/android/server/wm/InputManager.java
AgeCommit message (Collapse)Author
2012-04-05Refactor input system into its own service.Jeff Brown
Extracted the input system from the window manager service into a new input manager service. This will make it easier to offer new input-related features to applications. Cleaned up the input manager service JNI layer somewhat to get rid of all of the unnecessary checks for whether the input manager had been initialized. Simplified the callback layer as well. Change-Id: I3175d01307aed1420780d3c093d2694b41edf66e
2012-02-07Remove the input dispatcher throttle.Jeff Brown
This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: Iab33594bc5df8aa05232ef64c64e98fc61c5bf52
2011-11-10increase the rate at which we dispatch events.Chet Haase
Previously, the input dispatch rate was capped by default to 55. This worked fine for systems with a refresh rate of 55 or lower. But on devices with a higher frame rate (such as stingray at 60 fps), we do not receive events as fast as the rendering system wants to redraw the frames, so we would occasionally miss events between frames, resulting in a visual stutter during drag operations where the dragged object would essentially stay still for a frame. This fix increases the default rate to 90, or 1.5 times the highest typical refresh rate of our devices. Change-Id: Id8622185b3da93f9f6505157d2e6f3f33e36bd04
2011-10-12Improve screenshot chord debouncing.Jeff Brown
Bug: 5011907 Introduce a 150ms delay in handling volume down keys while waiting to see if a power key will follow. Don't trigger the screenshot chord if both volume up and volume down are pressed together. Don't trigger the long-press power menu if volume keys are also pressed. Require the user to press both keys in the chord within the debounce time and continue long-pressing them in order to trigger the screenshot action. Change-Id: I248968d37b73c09d6d08e7f62667c443eba32da0
2011-08-26Add a "show touches" option for demos and presentations.Jeff Brown
Bug: 4569045 Change-Id: I8726ea292dd7def790a5e40d7d7e58968974f896
2011-08-10Add input system to Watchdog.Jeff Brown
Bug: 5094994 Change-Id: I153866958efc64ac19bda8b997c1c9f6ad425ec4
2011-07-25Report the external display size to the input reader.Jeff Brown
The input reader needs this information so that it knows how to interpolate touches on an external touch screen. Changed Display so that it asks the WindowManager what the real display size is (as opposed to the raw display size). This means it now takes into the forced display size set by adb shell am display-size. Replaced all calls to getRealWidth() / getRealHeight() / getRealMetrics() in the WindowManager and replaced them with direct usages of the mCurDisplayWidth / mCurDisplayHeight so that the WM doesn't end up making a reentrant Binder call into itself. Fixed the table status bar HeightReceiver so that it updates the height on all configuration changes since it is possible that the display size changed independently of an external HDMI display being plugged / unplugged. Improved the Display class documentation to make the distinctions betweeen the various sizes clearer. Change-Id: I3f75de559d3ebffed532ab46c4ae52c5e7f1da2b
2011-07-14Refactor input dispatcher use of window/app handles.Jeff Brown
This change moves the cached window and application input state into the handle objects themselves. It simplifies the dispatcher somewhat because it no longer needs to fix up references to transient InputWindow objects each time the window list is updated. This change will also make it easier to optimize setInputWindows to avoid doing a lot of redundant data copying. In principle, only the modified fields need to be updated. However, for now we continue to update all fields in unison as before. It turns out that the input dispatcher was inappropriately retaining pointers to InputWindow objects within the mWindows InputWindow vector. This vector is copy-on-write so it is possible and the item pointers to change if an editing operation is performed on the vector when it does not exclusively own the underlying SharedBuffer. This bug was uncovered by a previous change that replaced calls to clear() and appendVector() with a simple use of operator= which caused the buffer to be shared. Consequently after editItemAt was called (which it shouldn't have, actually) the buffer was copied and the cached InputWindow pointers became invalid. Oops. This change fixes the problem. Change-Id: I0a259339a6015fcf9113dc4081a6875e047fd425
2011-07-01Drop obsolete touch screen hacks.Jeff Brown
Change-Id: I47354c37ee2cc2b36340eb709bb5043b3ba78ed9
2011-06-07resolved conflicts for merge of 8b2c0014 to masterJeff Brown
Change-Id: I33a5a2949dc6c2d09e8196ba8c7128caa7ac2361
2011-06-06Touch pad improvements.Jeff Brown
Bug: 4124987 Only show one spot per touch point instead of one spot per finger for multitouch gestures. Tweaked the pointer acceleration curves. Dissociated the hover/tap timeouts from the "tap" timeout since they mean very different things. Change-Id: I7c2cbd30feeb65ebc12f6c7e33a67dc9a9f59d4c
2011-06-03resolved conflicts for merge of ca2b552d to masterJeff Brown
Change-Id: I2f3693a59042ac5aa2d7bcdc3a504c78dc99a18b
2011-06-03resolved conflicts for merge of 7e193916 to masterDianne Hackborn
Change-Id: If06892419319c3a2d4ab6b03dd3ceb99b83803b5
2011-06-02Add a preference panel for mouse speed.Jeff Brown
Bug: 4124987 Change-Id: I3ce175d268a1d043cf5878481261b1049a15a149
2011-05-31Use ViewConfiguration to seed input system configuration.Jeff Brown
Fix bug where the pointer presentation would be updated on any input reader timeout rather than only when a pointer gesture is in progress. Bug: 4124987 Change-Id: Ie9bba4a0b3228d55e45e65fa2ede5cd6ba887a08
2011-05-25Initial checkin of spot presentation for touchpad gestures. (DO NOT MERGE)Jeff Brown
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: Ib647dbd7a57a7f30dd9c6e2c260df51d7bbdd18e
2011-04-19Initial checkin of spot presentation for touchpad gestures.Jeff Brown
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
2011-03-30Add input filter mechanism for accessibility.Jeff Brown
This patch adds a mechanism for capturing, filtering, transforming and injecting input events at a very low level before the input dispatcher attempts to deliver them to applications. At this time, the mechanism is only intended to be used by the accessibility system to implement built-in system-level accessibility affordances. The accessibility input filter is currently just a stub. It logs the input events receives and reinjects them unchanged, except that it transforms KEYCODE_Q into KEYCODE_Z. Currently, the accessibility input filter is installed whenever accessibility is enabled. We'll probably want to change that so it only enables the input filter when a screen reader is installed and we want touch exploration. Change-Id: I35764fdf75522b69d09ebd78c9766eb7593c1afe
2011-03-03set max_events_per_sec to 55makarand.karvekar
reduce touch lag. no Dispatcher fix w/throttle at 60: 75.9ms (range is 71.4ms - 80.1ms) InputDispatcher fix w/throttle at 60: 49.0ms (range is 38.1ms - 66.7ms) InputDispatcher fix w/throttle at 55: 41.2ms (range is 28.6ms - 66.7ms) Change-Id: I76c0ba83abcd6a3d408a29ec76997a2e07e48a70 Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com>
2011-03-02Get key repeat timeout and delay from ViewConfiguration.Jeff Brown
Replaces previously hardcoded values. This ensures that key repeat takes the accessibility long press timeout setting into account. Unfortunately the system must be rebooted for the change to take effect. We will fix that later. Change-Id: I3ab70bb037331620b7e532170c1727287b5c6f91
2011-03-02Wake screen from external HID peripherals.Jeff Brown
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
2011-03-02Fade out the mouse pointer after inactivity or other events.Jeff Brown
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
2011-02-17Start window manager refactoring.Dianne Hackborn
Move all of the pieces into a new com.android.server.wm package. Change-Id: I942b7bcfb84ee0f843f47d58e55ffc5a93c0da94