22aa51202652efbd55094217a046b8e5ecb7afe2 |
|
17-Jun-2012 |
Jeff Brown <jeffbrown@google.com> |
Capture input dispatcher's last ANR state in bug report. Some ANR bugs are very difficult to localize because by the time the bug report has been captured, the relevant information is gone. Work around this by capturing a log of the input dispatcher's state at the exact time of the ANR before anything has changed and include this information in the bug report. Also fixed a nit related to some format strings that had improper field widths specified. Bug: 6680398 Change-Id: I5323bf18ec5e47a767cd053209753cc46852bf4c
/frameworks/base/services/input/InputDispatcher.cpp
|
265f1ccc5128319d81eee70ee2d2ae81573efb11 |
|
12-Jun-2012 |
Jeff Brown <jeffbrown@google.com> |
Improve ANR diagnostics. When an ANR occurs, log the associated reason. When an event takes too long to process (currently more than 2 seconds) log basic information about the event including how long it actually took. Dump the contents of the inbound, outbound and wait queues as part of dumpsys input. Bug: 6574842 Change-Id: I9ab754c320f609cb86fe266c469a61e7032dfed6
/frameworks/base/services/input/InputDispatcher.cpp
|
8249fc61837db488191213ac85355287cf8b4fdd |
|
25-May-2012 |
Jeff Brown <jeffbrown@google.com> |
Don't ANR on hover, scroll or if a window goes away. Prevents ANR on hover or scroll events. Prevents ANR in the case where one finger touches a window which is subsequently removed then a second finger comes along and tries to touch something. Change-Id: I985ccb70cd86659992328f14f8a705f3f05ea2e5
/frameworks/base/services/input/InputDispatcher.cpp
|
fd23e3ed976b22b9a92ddb2cb3a46f9d2a0ce23f |
|
09-May-2012 |
Jeff Brown <jeffbrown@google.com> |
Fix bugs in fallback key handling. If a fallback key is generated using a key plus a modifier, then it's possible we might get a different fallback key generated if the modifier has changed. PhoneWindowManager needs to remember which fallback is last generated for a given key code so that it can apply the same fallback action. When generating cancellation events, it's important to have preserved the policyFlags of the original event. Otherwise we may not dispatch the cancellation properly. For example, some actions are not performed if the POLICY_FLAG_TRUSTED is not specified. Remember the metaState associated with a key event so we can include it when canceled. Tell the policy when a fallback is being cancelled so that it can clean up its state. After a SEARCH shortcut is invoked, clear the flag indicating that a shortcut is pending. This is to prevent SEARCH from getting stuck down in the case where we might forget to send the up. (Shouldn't happen anymore after the prior fixes.) Bug: 5616255 Change-Id: I68f0a9679c7af464eaf31c099f2aa50b53fecf1f
/frameworks/base/services/input/InputDispatcher.cpp
|
c042ee2acd8529b95c5dc99240d626e61d2500cd |
|
08-May-2012 |
Jeff Brown <jeffbrown@google.com> |
Disable input dispatch until boot finished. Bug: 6263070 Change-Id: I25e15e3d8af8eb3343c7b684fec345337d9f6aab
/frameworks/base/services/input/InputDispatcher.cpp
|
f44e39493c471b5e6a0807778c7a6439ea1b8adc |
|
20-Apr-2012 |
Jeff Brown <jeffbrown@google.com> |
When ANR happens, only remove ANR'd window. The system bar uses input event injection to inject BACK keys into the application. If the receiving application ANRs, we used to clear the touch state unconditionally. Doing so would prevent the system bar from receiving the ACTION_UP event so the back button would continue to appear pressed until pressed again. Now we are more careful to only remove the specific ANR'd window from the touch state. Other windows should continue to receive touch events as usual. Change-Id: If86bfc323e2c7aed82ca1334bc67da649953168f
/frameworks/base/services/input/InputDispatcher.cpp
|
481c1570dc5cdf58265b53f657801709dd05d1df |
|
09-Mar-2012 |
Jeff Brown <jeffbrown@google.com> |
Add Java wrappers for new atrace functionality. Instrument a few parts of the input dispatcher and the view hierarchy. Change-Id: I49285c9fb3502253baa1ffed60f521b8c24fccaf
/frameworks/base/services/input/InputDispatcher.cpp
|
b93a03f841d93498bfea6cc92a22faa34bce1337 |
|
18-Feb-2012 |
Mathias Agopian <mathias@google.com> |
frameworks/base refactoring. First step. Move libui includes to their new home: androidfw. Change-Id: Ic042b52fdba72f30edc3cc6339bf30b4c1b99662
/frameworks/base/services/input/InputDispatcher.cpp
|
91e328984c0d1e0f95b3d37f779d9d4fa9bfe8f8 |
|
15-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Clean up InputChannel file descriptor data type. File descriptors are ints. Change-Id: Ie36733bf36ddfeaa9a09ef6ebd7bd2f1788f5d27
/frameworks/base/services/input/InputDispatcher.cpp
|
0952c30ac279d5f4cdc032fcbafa372213aa6d86 |
|
13-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Don't serialize motion events. On reflection, only key events need to be serialized. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I028b4eac97497d012036cb60ffbac4cb22d3966c
/frameworks/base/services/input/InputDispatcher.cpp
|
072ec96a4900d4616574733646ee46311cb5d2cb |
|
07-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Implement batching of input events on the consumer side. To support this feature, the input dispatcher now allows input events to be acknowledged out-of-order. As a result, the consumer can choose to defer handling an input event from one device (because it is building a big batch) while continuing to handle input events from other devices. The InputEventReceiver now sends a notification when a batch is pending. The ViewRoot handles this notification by scheduling a draw on the next sync. When the draw happens, the InputEventReceiver is instructed to consume all pending batched input events, the input event queue is fully processed (as much as possible), and then the ViewRoot performs traversals as usual. With these changes in place, the input dispatch latency is consistently less than one frame as long as the application itself isn't stalled. Input events are delivered to the application as soon as possible and are handled as soon as possible. In practice, it is no longer possible for an application to build up a huge backlog of touch events. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I42c01117eca78f12d66d49a736c1c122346ccd1d
/frameworks/base/services/input/InputDispatcher.cpp
|
1adee11b5e644c74a2ed40344f4836de3bd3ac56 |
|
07-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Optimize dispatcher for back-to-back finished signals. Minor tweak to the dispatcher to handle as many finished signals in a receive callback as possible instead of going back to the Looper and waiting for the next poll() to hit the callback again. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I8471107371693e21ce8ce7cca1e8d79ba4ca2351
/frameworks/base/services/input/InputDispatcher.cpp
|
d1c48a0525d05021036d4b14e937e221c0ae1318 |
|
07-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Dispatch multiple touch events in parallel. This change enables the input dispatcher to send multiple touch events to an application without waiting for them to be acknowledged. Essentially this is a variation on the old streaming optimization but it is much more comprehensive. Event dispatch will stall as soon as 0.5sec of unacknowledged events are accumulated or a focused event (such as a key event) needs to be delivered. Streaming input events makes a tremendous difference in application performance. The next step will be to enable batching of input events on the client side once again. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I025df90c06165d719fcca7f63eed322a5cce4a78
/frameworks/base/services/input/InputDispatcher.cpp
|
8b4be56030c3b8c93dfa45bccac7365f90f377ce |
|
07-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Delete premature optimization. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I5c182f6e17d468bf3033125b2094b2baa5b94e81
/frameworks/base/services/input/InputDispatcher.cpp
|
28b5cf1c33df847d667b8974ba07c4157a49b48a |
|
07-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Delete dead code. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I9f8b93f6a25ddd872f993366b57bab404c93bede
/frameworks/base/services/input/InputDispatcher.cpp
|
59f1ff99786e9d4a94270d6752aa3ca61e10f0a6 |
|
07-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Delete latency tracking information in the Connection. The information gathered here will no longer be valid once we start dispatching multiple events at a time to the same connection. Moreover, we are more concerned with end-to-end latency, which we can measure with sufficiently high accuracy in other ways. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I49a0c9876b64af56b40e96e0d98c45f325da2a73
/frameworks/base/services/input/InputDispatcher.cpp
|
9831d90db8fba7e967d22b1f86eea1d6ac831541 |
|
07-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Remove active connection tracking. The dispatcher no longer needs to track which connections are active except perhaps for diagnostic purposes, so we might as well remove this code. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: Ibadc830b7b792a59b9244d0a6e85f320c4947109
/frameworks/base/services/input/InputDispatcher.cpp
|
e9bb9be9e46523ed901e38cfa83f4630f6496418 |
|
07-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Simplify input target handling in the dispatcher. Since we no longer stream events to the application, we don't need to keep the current list of input targets around longer than it takes to begin the dispatch cycle. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I5824b04e564c8a4dec991598292441e46c331905
/frameworks/base/services/input/InputDispatcher.cpp
|
cbee6d6ede0499fb4a2c00bfc00d5db8d9ed5139 |
|
04-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Rewrite input transport using sockets. Since we will not longer be modifying events in place, we don't need to use an ashmem region for input. Simplified the code to instead use a socket of type SOCK_SEQPACKET. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: I05909075ed8b61b93900913e44c6db84857340d8
/frameworks/base/services/input/InputDispatcher.cpp
|
3241b6b7bd7eff64f0118ba2d636030e505a98f9 |
|
04-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Remove batching and streaming from the input dispatcher. Don't worry, these features will be moving to a different part of the pipeline. We're just getting them out of the way for now so we can make deeper changes to how the input dispatcher works. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: If97de923c8165776882eef23f5204cc448dad0fc
/frameworks/base/services/input/InputDispatcher.cpp
|
308028049a75b36d5ed525c0bcef441da850c2a5 |
|
03-Feb-2012 |
Jeff Brown <jeffbrown@google.com> |
Remove the input dispatcher throttle. This is part of a series of changes to improve input system pipelining. Bug: 5963420 Change-Id: Iab33594bc5df8aa05232ef64c64e98fc61c5bf52
/frameworks/base/services/input/InputDispatcher.cpp
|
112b5f52c5a4b6743eeb7b26a8896c7636c74455 |
|
28-Jan-2012 |
Jeff Brown <jeffbrown@google.com> |
Improve watchdog monitor for InputReader and InputDispatcher. Try harder to test for liveness. There are situations where the lock might not be held but the input system is stuck in a callback into the window manager policy that has hung. Bug: 5094994 Change-Id: Iff88655512a5dc8bbb4615be65f4115e975c020b
/frameworks/base/services/input/InputDispatcher.cpp
|
c0cb3dc2c16883f19bf1caf652b2fcdb55a1a856 |
|
13-Jan-2012 |
Jeff Brown <jeffbrown@google.com> |
Fix a few memory leaks in the input dispatcher. Bug: 5862398 Change-Id: Iae3284a223b8307f541a7987f90f5b28e70b9244
/frameworks/base/services/input/InputDispatcher.cpp
|
ec193dec4d9ca2cfc8295c4becfe950a906a15ed |
|
09-Jan-2012 |
Steve Block <steveblock@google.com> |
Rename LOG_ASSERT to ALOG_ASSERT DO NOT MERGE See https://android-git.corp.google.com/g/157519 Bug: 5449033 Change-Id: I8ceb2dba1b031a0fd68d15d146960d9ced62bbf3
/frameworks/base/services/input/InputDispatcher.cpp
|
3762c311729fe9f3af085c14c5c1fb471d994c03 |
|
06-Jan-2012 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGE(_IF) to (IF_)ALOGE(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/#/c/157220 Bug: 5449033 Change-Id: Ic9c19d30693bd56755f55906127cd6bd7126096c
/frameworks/base/services/input/InputDispatcher.cpp
|
8564c8da817a845353d213acd8636b76f567b234 |
|
06-Jan-2012 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGW(_IF) to (IF_)ALOGW(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/157065 Bug: 5449033 Change-Id: I00a4b904f9449e6f93b7fd35eac28640d7929e69
/frameworks/base/services/input/InputDispatcher.cpp
|
6215d3ff4b5dfa52a5d8b9a42e343051f31066a5 |
|
04-Jan-2012 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGI(_IF) to (IF_)ALOGI(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/156801 Bug: 5449033 Change-Id: Ib08fe86d23db91ee153e9f91a99a35c42b9208ea
/frameworks/base/services/input/InputDispatcher.cpp
|
5baa3a62a97544669fba6d65a11c07f252e654dd |
|
20-Dec-2011 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGD(_IF) to (IF_)ALOGD(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/156016 Bug: 5449033 Change-Id: I4c4e33bb9df3e39e11cd985e193e6fbab4635298
/frameworks/base/services/input/InputDispatcher.cpp
|
fa7fa9a5ba796eabb2dadb8e2ce1b97da38e939e |
|
09-Dec-2011 |
Jeff Brown <jeffbrown@google.com> |
am 944c985b: am e0e9fd98: Merge "Fix system hotkey handling." into ics-mr1 * commit '944c985b4199e6e029568ea87004c9727e469cc0': Fix system hotkey handling.
|
68b909d8acd92343fa0b1dff2f77fcd9d9991f9f |
|
08-Dec-2011 |
Jeff Brown <jeffbrown@google.com> |
Fix system hotkey handling. Fixed a problem where the key up for the ALT or META key was not delivered to the task switcher dialog because it was deemed to be inconsistent with the window's observed state. Consequently the dialog would not be dismissed when the key was released. Moved global hotkey handling for META+* shortcuts and ALT/META-TAB into the window manager policy's interceptKeyBeforeDispatching method. This change prevents applications from hijacking these keys. The original idea was that these shortcuts would be handled only if the application did not handle them itself. That way certain applications, such as remote desktop tools, could deliberately override some of these less important system shortcuts. Unfortunately, that does make the behavior inconsistent across applications. What's more, bugs in the onKeyDown handler of applications can cause the shortcuts to not work at all, for no good reason. Perhaps we can add an opt-in feature later to enable specific applications to repurpose these keys when it makes sense. Bug: 5720358 Change-Id: I22bf17606d12dbea6549c60d20763e6608576cf7
/frameworks/base/services/input/InputDispatcher.cpp
|
a965f083d09bf247cbfc880c0435e4a04c3e4e18 |
|
08-Nov-2011 |
Jeff Brown <jeffbrown@google.com> |
Delete dead code. Change-Id: Ia78e338a363ab82f9c0b45ce324c2a7cfa8d8246
/frameworks/base/services/input/InputDispatcher.cpp
|
71f2cf116aab893e224056c38ab146bd1538dd3e |
|
20-Oct-2011 |
Steve Block <steveblock@google.com> |
Rename (IF_)LOGV(_IF) to (IF_)ALOGV(_IF) DO NOT MERGE See https://android-git.corp.google.com/g/#/c/143865 Bug: 5449033 Change-Id: I0122812ed6ff6f5b59fe4a43ab8bff0577adde0a
/frameworks/base/services/input/InputDispatcher.cpp
|
905805ad7ce18a386076fff99264f821bbad9f83 |
|
12-Oct-2011 |
Jeff Brown <jeffbrown@google.com> |
Improve screenshot chord debouncing. 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
/frameworks/base/services/input/InputDispatcher.cpp
|
cc4f7db698f88b633a286d8ab1105b28a474cd09 |
|
31-Aug-2011 |
Jeff Brown <jeffbrown@google.com> |
Fix input channel leak. Bug: 5156144 Input channels could leak or simply live longer than they should in some cases. 1. Monitor channels (used by the pointer location overlay) are never unregistered, so they would leak. Added code to handle failures in the receive callback by closing the input channel. 2. The DragState held onto its input window and application handles even after the input channel was disposed. Added code to null these handles out when they are no longer needed. 3. Input channels previously used as input event targets would stick around until the targets were cleared (usually on the next event). Added code to detect when the input dispatcher is in an idle state and to proactively clear the targets then to ensure that resources are released promptly. 4. Native input window handles held onto the input channel even after the input window was removed from the input dispatcher. Consequently, the input channel would not be disposed until the input window handle itself was freed. Since the input window handle is held from managed code, this meant that the window's input channel could stick around until the next GC. Refactored the input window handle to separate the properties (info) and identify (handle) state into different objects. Then modified the dispatcher to release the properties (info) when no longer needed, including the input channel. 7. The pointer location overlay does not actually use its standard input channel, only the monitor input channel. Added INPUT_FEATURE_NO_INPUT_CHANNEL to allow windows to request that they not be provided with an input channel at all. Improved some of the error handling logic to emit the status code as part of the exception message. Change-Id: I01988d4391a70c6678c8b0e936ca051af680b1a5
/frameworks/base/services/input/InputDispatcher.cpp
|
9cc695c5796cf93b414fd7627eb049b7b57d15be |
|
24-Aug-2011 |
Jeff Brown <jeffbrown@google.com> |
Clean up InputDispatcher debugging. Change-Id: I020e834bfb541a1f274e26a72705f96f4307dddf
/frameworks/base/services/input/InputDispatcher.cpp
|
65fd251c3913fc921468a3dad190810db19eb9df |
|
18-Aug-2011 |
Jeff Brown <jeffbrown@google.com> |
Input system bug fixes, particularly for stylus. Bug: 5049148 Finished stylus support, including support for indirect stylus and mouse tools. Added TILT axis. When stylus tilt X/Y is available, it is transformed into an orientation and tilt inclination which is a more convenient representation and a simpler extension to the exiting API. Touch devices now only report touch data using a single input source. Previously touch devices in pointer mode would report both absolute touch pad data and cooked pointer gestures. Now we just pick one. The touch device switches modes as needed when the focused application enables/disables pointer gestures. This change greatly simplifies the code and reduces the load on the input dispatcher. Fixed an incorrect assumption that the value of ABS_(MT_)DISTANCE would be zero whenever the stylus was in direct contact. It appears that the correct way to determine whether the stylus is in direct contact (rather than hovering) is by checking for a non-zero reported pressure. Added code to read the initial state of tool buttons and axis values when the input devices are initialized or reset. This fixes problems where the input mapper state might have the wrong initial state. Moved responsibility for cancelling pending inputs (keys down, touches, etc.) to the InputDispatcher by sending it a device reset notification. This frees the InputReader from having to synthesize events during reset, which was cumbersome and somewhat brittle to begin with. Consolidated more of the common accumulator logic from SingleTouchInputMapper and MultiTouchInputMapper into TouchInputMapper. Improved the PointerLocation output. Change-Id: I595d3647f7fd7cb1e3eff8b3c76b85043b5fe2f0
/frameworks/base/services/input/InputDispatcher.cpp
|
755bd67a5081727ae1bbee2d39863b464a8b4f35 |
|
17-Aug-2011 |
Christopher Tate <ctate@google.com> |
Merge "Don't crash if a drag recipient throws an uncaught exception"
|
d9be36c897680361da2daadba9bbc9da3c16329b |
|
17-Aug-2011 |
Christopher Tate <ctate@google.com> |
Don't crash if a drag recipient throws an uncaught exception There turn out to be two distinct bugs leading to runtime restarts. The first, dating from at least Android 3.1, is that following certain kinds of app crashes we properly clean up the drag-state bookkeeping, but aren't prepared in the case of the drag-target timeout clock firing with a now- null drag state in effect. We now catch that edge condition and don't NPE (and note that there was already similar code around the separate timeout when an app is *starting* the drag process). The second bug is that some new-in-ICS code in the input channel management wasn't prepared for certain cases where the current touch window could have become unusable and its input channel torn down summarily in the case of the aforesaid app crash during drag. The code now makes sure that there really is an input channel that needs to be flushed / cancelled prior to attempting that operation. Fixes bug 5173534 Change-Id: Idaae158ecfb4b93456ab1425769b669962893c00
/frameworks/base/services/input/InputDispatcher.cpp
|
abb4d446a10b2defd342b1a2fa6462b52b82cdef |
|
15-Aug-2011 |
Jeff Brown <jeffbrown@google.com> |
Fix blocked event handling in InputDispatcher. Bug: 5161854 The InputDispatcher contains code to recover from ANRs more quickly when the user touches a different application. When triggered, it sets mNextUnblockedEvent to the next event it should dispatch (to the next application). All prior events are dropped. This change fixes a bug where mNextUnblockedEvent could potentially never be reset back to NULL if the inbound queue was drained for some reason. Change-Id: I21be2f02c9fc770bd260ea414db8bb184df89ada
/frameworks/base/services/input/InputDispatcher.cpp
|
89ef0720ee8e0ac6ae1758faa917e4d6c9606fb4 |
|
11-Aug-2011 |
Jeff Brown <jeffbrown@google.com> |
Add input system to Watchdog. Bug: 5094994 Change-Id: I153866958efc64ac19bda8b997c1c9f6ad425ec4
/frameworks/base/services/input/InputDispatcher.cpp
|
be1aa8250cee7819c49741e819e81659d1d03823 |
|
28-Jul-2011 |
Jeff Brown <jeffbrown@google.com> |
Refactor input reader to add stylus support. Bug: 5064702 Introduced the concept of an InputListener to further decouple the InputReader from the InputDispatcher. The InputListener exposes just the minimum interface that the InputReader needs to communicate with the outside world. The InputReader passes arguments to the InputListener by reference, which makes it easy to queue them up. Consolidated all of the InputReader locks into one simple global Mutex. The reason this wasn't done before was due to potential re-entrance in outbound calls to the InputDispatcher. To fix this, the InputReader now queues up all of the events it wants to send using a QueuedInputListener, then flushes them outside of the critical section after all of the event processing is finished. Removing all of the InputMapper locks greatly simplifies the implementation. Added tests for new stylus features such as buttons, tool types, and hovering. Added some helpers to BitSet32 to handle common code patterns like finding the first marked bit and clearing it. Fixed a bug in VelocityTracker where the wrong pointer trace could get cleared when handling ACTION_POINTER_DOWN. Oops. Changed PointerCoords so it no longer stores useless zero axis values. Removed editAxisValue because it is not very useful when all zero value axes are absent and therefore cannot be edited in place. Added dispatch of stylus hover events. Added support for distance and tool types. Change-Id: I4cf14d134fcb1db7d10be5f2af7b37deef8f8468
/frameworks/base/services/input/InputDispatcher.cpp
|
5ea29ab7efa9a9ae22345f15a7cb9be3c5e1bbf5 |
|
27-Jul-2011 |
Jeff Brown <jeffbrown@google.com> |
Reset input dispatcher targets when focus changes apps. This fixes an issue where an ANR can occur in a newly focused application through no fault of its own, simply because the previous app took a little while to transfer focus to the new app. Bug: 4584620 Change-Id: If3227eb68d92a09a108e9de7f0afcbd9a5dbdead
/frameworks/base/services/input/InputDispatcher.cpp
|
ac386073df2514b79a2ca169f4a89f129733002f |
|
21-Jul-2011 |
Jeff Brown <jeffbrown@google.com> |
Remove unimplemented memory pool. dlmalloc does such a great job that we don't need a pool anyways. Change-Id: I105b28c4a5c491543959190c7c0a9de75a5b8052
/frameworks/base/services/input/InputDispatcher.cpp
|
9302c8796fc4dcda08d4bd1e11733848fd4fafaf |
|
14-Jul-2011 |
Jeff Brown <jeffbrown@google.com> |
Refactor input dispatcher use of window/app handles. 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
/frameworks/base/services/input/InputDispatcher.cpp
|
b99a82437cc999ecee143b82482dae36c13049f3 |
|
13-Jul-2011 |
Jeff Brown <jeffbrown@google.com> |
Revert "fix a weird use of Vector::appendVector()" This reverts commit 198fd888add624cf9e53ce31b776568a5d069916 This change seems to have exposed some other bugs. Bug: 5026631
/frameworks/base/services/input/InputDispatcher.cpp
|
198fd888add624cf9e53ce31b776568a5d069916 |
|
12-Jul-2011 |
Mathias Agopian <mathias@google.com> |
fix a weird use of Vector::appendVector() operator= is way more efficient. Change-Id: I61c9adb1413bed230801a77151b8f7000fd11471
/frameworks/base/services/input/InputDispatcher.cpp
|
2717eff2ac04bed60e5fd577bcb8ec1ea7c2ccde |
|
01-Jul-2011 |
Jeff Brown <jeffbrown@google.com> |
Query input device for initial slot index. This fixes a problem where touches can get stuck because the driver and the framework have different ideas of what the initial slot index is. The framework assumed it was slot 0 but it could in principle be any slot, such as slot 1. When that happened, the framework would start tracking the first touch as slot 0, but it might never receive an "up" for that slot. Change-Id: Idaffc4534b275d66b9d4360987b28dc2d0f63218
/frameworks/base/services/input/InputDispatcher.cpp
|
2e45fb6f951d0e0c68d4211fe68108d2230814bc |
|
30-Jun-2011 |
Jeff Brown <jeffbrown@google.com> |
Fix joystick and trackpad regression. Change-Id: I33b6756f95a6b0725ffa210f341da3c98426491b
/frameworks/base/services/input/InputDispatcher.cpp
|
8134681b25dfff814ffeaad8ff70e84316c1869f |
|
29-Jun-2011 |
Jeff Brown <jeffbrown@google.com> |
Improve input event consistency invariants. Fixed some issues where inconsistent streams of events could be generated by the dispatcher, particularly when switching from hovering with one device to hovering with another. Fixed a bug where the touch pad would fail to generate a new HOVER_MOVE following a tap event. As a result, the hover event stream would not resume until the user touched the touch pad again. Change-Id: I444dce84641fb12e56a0af84c931520771d6c493
/frameworks/base/services/input/InputDispatcher.cpp
|
474dcb5c3ddff737c4ac9fc44a1f7be569605e5f |
|
15-Jun-2011 |
Jeff Brown <jeffbrown@google.com> |
Add support for disabling pointer gestures. Made it possible for individual windows to disable pointer gestures while the window has focus using a private API. Cleaned up the InputReader configuration code to enable in-place reconfiguration of input devices without having to reopen them all. This change makes changing the pointer speed somewhat nicer since the pointer doesn't jump back to the origin after each change. Change-Id: I9727419c2f4cb39e16acb4b15fd7fd84526b1239
/frameworks/base/services/input/InputDispatcher.cpp
|
98db5fabdad86dca379740d8050697950b9f026c |
|
09-Jun-2011 |
Jeff Brown <jeffbrown@google.com> |
Allow touches to slide out of the navigation bar. Change-Id: I73cabba3d62f47829bf6217700ace56a27c42b1d
/frameworks/base/services/input/InputDispatcher.cpp
|
7a9db181a64e0e752a447c6408639bbb33c412fc |
|
03-Jun-2011 |
Kenny Root <kroot@google.com> |
No position information for outside touches When a window registers to listen for outside touches, it doesn't need the position information for touches that land outside of its activity for normal use cases. This patch uses the foreground window's UID as a filter to determine whether to pass the position information. This will allow applications to continue to rely on touch information for inputs that were directed at one of its other windows. Bug: 4541250 Change-Id: If16eb1ec8404b797d991859eef55ac0a20a355a3
/frameworks/base/services/input/InputDispatcher.cpp
|
f3b57def9345d6d3cac3604d6a970f6d48f345ec |
|
03-Jun-2011 |
Dianne Hackborn <hackbod@google.com> |
resolved conflicts for merge of 7e193916 to master Change-Id: If06892419319c3a2d4ab6b03dd3ceb99b83803b5
|
214eaf48878bba00cbd5831871bcbd82632b6e34 |
|
27-May-2011 |
Jeff Brown <jeffbrown@android.com> |
Use ViewConfiguration to seed input system configuration. 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
/frameworks/base/services/input/InputDispatcher.cpp
|
2cb7981e70dd1d4e4368dbef8797d336e0797b61 |
|
26-May-2011 |
Jeff Brown <jeffbrown@android.com> |
Fix deadlock in dispatcher. (DO NOT MERGE) This regression was caused due to a bad cherry-pick / merge. Change-Id: I79e84285bbfd4cd4b66681461543fb185b60d3ba
/frameworks/base/services/input/InputDispatcher.cpp
|
5ced76a14350db56f1a80f00076f8be3d982c389 |
|
24-May-2011 |
Jeff Brown <jeffbrown@android.com> |
Coalesce input events that arrive faster than 333Hz. (DO NOT MERGE) Some drivers report individual finger updates one at a time instead of all at once. When 10 fingers are down, this can cause the framework to have to handle 10 times as many events each with 10 times as much data. Applications like PointerLocation would get significantly bogged down by all of the redundant samples. This change coalesces samples that are closely spaced in time, before they are dispatched, as part of the motion event batching protocol. Increased the size of the InputChannel shared memory buffer so that applications can catch up faster if they accumulate a backlog of samples. Change-Id: Ibc6abf8af027d9003011ac75caa12941080caba3
/frameworks/base/services/input/InputDispatcher.cpp
|
7157f6fe13ab7e2fef44cc33c95d1c531418220f |
|
07-Apr-2011 |
Jeff Brown <jeffbrown@google.com> |
Allow batching samples onto the pending motion event. (DO NOT MERGE) This enlarges the window of opportunity for batching to encompass time spent for the window to become ready (while it is busy processing the last event). Change-Id: I8870cc3081d27a4de659fb4e375f888fe966460b
/frameworks/base/services/input/InputDispatcher.cpp
|
524ee64b91bc123e1ccfc881a0f1a1e84722251d |
|
30-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Support chorded fallback keys. (DO NOT MERGE) Also be more careful about canceling fallback keys during focus transitions, when the application handles the key, or when the policy decides to do something different. Fixed a crash due to JNI CallObjectMethod returning an undefined value (not null) when an exception is thrown. Fixed a crash due to the policy trying to create a Dialog for recent apps on the dispatcher thread. It should happen on the policy's Looper instead. Bug: 4187302 Change-Id: I043f82913830f411b3bb4018d6422467b6ca454f
/frameworks/base/services/input/InputDispatcher.cpp
|
22d789d580a4ab5bed83c0ed698d2f5bc721e176 |
|
25-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Fix focused application handle. (DO NOT MERGE) Fix a bug where we were always setting the focused application handle to NULL. This broke ANR processing while starting applications and caused input events to be dropped while starting applications. Bug: 4174573 Change-Id: Ice7ce3a2b65219568a8227fc1383bafb294666b5
/frameworks/base/services/input/InputDispatcher.cpp
|
68d6075b4ad2205c10064c78cde552e3210cca91 |
|
17-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Refactor how timeouts are calculated. (DO NOT MERGE) Added a timeout mechanism to EventHub and InputReader so that InputMappers can request timeouts to perform delayed processing of input when needed. Change-Id: I89c1171c9326c6e413042e3ee13aa9f7f1fc0454
/frameworks/base/services/input/InputDispatcher.cpp
|
96ad3979f328a1aa098917ca1c35575e85345526 |
|
10-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Use touch pad gestures to manipulate the pointer. (DO NOT MERGE) 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: I7b7ddacc724fb1306e1590dbaebb740d3130d7cd
/frameworks/base/services/input/InputDispatcher.cpp
|
fe9f8ab03a63b1037f07dd85799fbea80ec6adaa |
|
07-May-2011 |
Jeff Brown <jeffbrown@google.com> |
Add initial API for stylus and mouse buttons. Added the concept of pointer properties in a MotionEvent. This is currently used to track the pointer tool type to enable applications to distinguish finger touches from a stylus. Button states are also reported to application as part of touch events. There are no new actions for detecting changes in button states. The application should instead query the button state from the MotionEvent and take appropriate action as needed. A good time to check the button state is on ACTION_DOWN. As a side-effect, applications that do not support multiple buttons will treat primary, secondary and tertiary buttons identically for all touch events. The back button on the mouse is mapped to KEYCODE_BACK and the forward button is mapped to KEYCODE_FORWARD. Added basic plumbing for the secondary mouse button to invoke the context menu, particularly in lists. Added clamp and split methods on MotionEvent to take care of common filtering operations so we don't have them scattered in multiple places across the framework. Bug: 4260011 Change-Id: Ie992b4d4e00c8f2e76b961da0a902145b27f6d83
/frameworks/base/services/input/InputDispatcher.cpp
|
2ba3e80f942d35695310f8dde8c16d9687447e47 |
|
11-May-2011 |
Dianne Hackborn <hackbod@google.com> |
resolved conflicts for merge of 037b54cf to master Change-Id: I1bc2827596a349963d8aa2b63b3f7801f155668a
|
e7d25b74b0f5c8ad32225c7a3e98a0d1717eb7c7 |
|
10-May-2011 |
Dianne Hackborn <hackbod@google.com> |
Fix scaling of batched motion events. Change-Id: I1e070c936f7b2e8f1bb7ebae62b1df0aa6998b82
/frameworks/base/services/input/InputDispatcher.cpp
|
aa9d84c37e05f696ec158dac98ce38cf41e18314 |
|
10-May-2011 |
Dianne Hackborn <hackbod@google.com> |
resolved conflicts for merge of 05be6d6f to master Change-Id: Ic6a6c5bb300f6f1d43f9ed550b284282b4f16212
|
e2515eebf42c763c0a2d9f873a153711778cfc17 |
|
28-Apr-2011 |
Dianne Hackborn <hackbod@google.com> |
Better compat mode part one: start scaling windows. First step of improving app screen size compatibility mode. When running in compat mode, an application's windows are scaled up on the screen rather than being small with 1:1 pixels. Currently we scale the application to fill the entire screen, so don't use an even pixel scaling. Though this may have some negative impact on the appearance (it looks okay to me), it has a big benefit of allowing us to now treat these apps as normal full-screens apps and do the normal transition animations as you move in and out and around in them. This introduces fun stuff in the input system to take care of modifying pointer coordinates to account for the app window surface scaling. The input dispatcher is told about the scale that is being applied to each window and, when there is one, adjusts pointer events appropriately as they are being sent to the transport. Also modified is CompatibilityInfo, which has been greatly simplified to not be so insane and incomprehendible. It is now simple -- when constructed it determines if the given app is compatible with the current screen size and density, and that is that. There are new APIs on ActivityManagerService to put applications that we would traditionally consider compatible with larger screens in compatibility mode. This is the start of a facility to have a UI affordance for a user to switch apps in and out of compatibility. To test switching of modes, there is a new variation of the "am" command to do this: am screen-compat [on|off] [package] This mode switching has the fundamentals of restarting activities when it is changed, though the state still needs to be persisted and the overall mode switch cleaned up. For the few small apps I have tested, things mostly seem to be working well. I know of one problem with the text selection handles being drawn at the wrong position because at some point the window offset is being scaled incorrectly. There are probably other similar issues around the interaction between two windows because the different window coordinate spaces are done in a hacky way instead of being formally integrated into the window manager layout process. Change-Id: Ie038e3746b448135117bd860859d74e360938557
/frameworks/base/services/input/InputDispatcher.cpp
|
4e91a180be46c0c7c3bf398d4df4cbe2404216b5 |
|
07-Apr-2011 |
Jeff Brown <jeffbrown@google.com> |
Coalesce input events that arrive faster than 333Hz. Some drivers report individual finger updates one at a time instead of all at once. When 10 fingers are down, this can cause the framework to have to handle 10 times as many events each with 10 times as much data. Applications like PointerLocation would get significantly bogged down by all of the redundant samples. This change coalesces samples that are closely spaced in time, before they are dispatched, as part of the motion event batching protocol. Increased the size of the InputChannel shared memory buffer so that applications can catch up faster if they accumulate a backlog of samples. Added logging code to help measure input dispatch and drawing latency issues in the view hierarchy. See ViewDebug.DEBUG_LATENCY. Change-Id: Ia5898f781f19901d2225c529a910c32bdf4f504f
/frameworks/base/services/input/InputDispatcher.cpp
|
f6989da7c7727ad433b75ad2c8d8d23c2651f70b |
|
07-Apr-2011 |
Jeff Brown <jeffbrown@google.com> |
Allow batching samples onto the pending motion event. This enlarges the window of opportunity for batching to encompass time spent for the window to become ready (while it is busy processing the last event). Change-Id: I3fb5a394ab1b85d6591192678168ca6e35dd9d53
/frameworks/base/services/input/InputDispatcher.cpp
|
b6110c2de0cd7950360aeb2c248a44e4ea5f33f5 |
|
02-Apr-2011 |
Jeff Brown <jeffbrown@google.com> |
Fix dispatcher crash when input monitoring enabled. Also ensure that we actually log assertion failures. Bug: 4203092 Change-Id: I5c14bc41b2255f876858121f5572e2de75cabcc3
/frameworks/base/services/input/InputDispatcher.cpp
|
0029c66203ab9ded4342976bf7a17bb63af8c44a |
|
30-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Add input filter mechanism for accessibility. 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
/frameworks/base/services/input/InputDispatcher.cpp
|
da3d5a91b6b311ed77f2707d4456c1f18b84d73b |
|
30-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Support chorded fallback keys. Also be more careful about canceling fallback keys during focus transitions, when the application handles the key, or when the policy decides to do something different. Fixed a crash due to JNI CallObjectMethod returning an undefined value (not null) when an exception is thrown. Fixed a crash due to the policy trying to create a Dialog for recent apps on the dispatcher thread. It should happen on the policy's Looper instead. Bug: 4187302 Change-Id: I659a3fd1bd2325ed36d965f9beb75dacb89790c9
/frameworks/base/services/input/InputDispatcher.cpp
|
a2cc28d732577dd48a02de637c635e9764400248 |
|
25-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Fix focused application handle. Fix a bug where we were always setting the focused application handle to NULL. This broke ANR processing while starting applications and caused input events to be dropped while starting applications. Bug: 4174573 Change-Id: Icd7b8c4c49ed73c41978f3ff076c2e5cd839a802
/frameworks/base/services/input/InputDispatcher.cpp
|
a032cc008618b83ecbbede537517d1e7998e3264 |
|
08-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Add MotionEvent.HOVER_ENTER and HOVER_EXIT. The input dispatcher sends a HOVER_ENTER to a window before dispatching it any HOVER_MOVE events. For compatibility reasons, the window will *also* receive the HOVER_MOVE. When the pointer moves into a different window or the pointer goes down or when events are canceled for some reason, the input dispatcher sends a HOVER_EXIT to the previously hovered window. The view hierarchy behavior is similar. All views under the pointer receive onHoverEvent with HOVER_ENTER followed by any number of HOVER_MOVE events. When the pointer leaves a view, the view receives HOVER_EXIT. Similarly, if a parent view decides to capture hover by returning true from onHoverEvent, the hovered descendants will receive HOVER_EXIT. The default behavior of onHoverEvent is to update the view's hovered state by calling setHovered(true/false). Views can query their current hovered state using isHovered(). For testing purposes, the hovered state is mapped to the pressed drawable state. This will change in a subsequent commit with the introduction of a new hovered drawable state. Change-Id: Ib76a7a90236c8f2c7336e55773acade6346cacbe
/frameworks/base/services/input/InputDispatcher.cpp
|
aa3855d5836d2a2d83baafdf6e40caf90d3dad1c |
|
17-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Refactor how timeouts are calculated. 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
/frameworks/base/services/input/InputDispatcher.cpp
|
ace13b17866dc9136aeecf6dfaf7077f37434469 |
|
10-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Use touch pad gestures to manipulate the pointer. 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
/frameworks/base/services/input/InputDispatcher.cpp
|
efd3266b719eed5f1b217021c0a9e76e4b274b06 |
|
09-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Input improvements and bug fixes. 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
/frameworks/base/services/input/InputDispatcher.cpp
|
924c4d47774fa7d8a5ce659d12291ef7df82ee05 |
|
08-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Support POLICY_FLAG_ALT et. al. (DO NOT MERGE) Change-Id: Ida3b8300764623662052f80095973186cb9d4616
/frameworks/base/services/input/InputDispatcher.cpp
|
f634ded277f246bd9568e9b7dcad40790767c6ab |
|
02-Mar-2011 |
makarand.karvekar <makarand.karvekar@motorola.com> |
Set last event time to previous event batch delivery time to apps Determination of the last event time. Currently, uses the time that the first event in the previous batch that was sent from hardware. This produces inconsistent timing intervals for event delivery to apps. Now, use the time that the previous batch was delivered to the application. Original Author: Stephen Moore <steve.moore@motorola.com> Signed-off-by: makarand.karvekar <makarand.karvekar@motorola.com> Change-Id: I2a3701915702d622dc04fbf4bbd4918a9ebe8856
/frameworks/base/services/input/InputDispatcher.cpp
|
e2e012683d6f35f5eedfd0c39167ea78e32e2650 |
|
03-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Only set KeyEvent long press flag when repeat count equals 1. This fixes a Gingerbread regression. Bug: 3507021 Change-Id: I8c2acb35be718fea7e996175c1407e84315d17ef
/frameworks/base/services/input/InputDispatcher.cpp
|
56194ebec6212e229f4ccdaa4b187166d20013ef |
|
03-Mar-2011 |
Jeff Brown <jeffbrown@google.com> |
Wake screen from external HID peripherals. 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
/frameworks/base/services/input/InputDispatcher.cpp
|
33bbfd2232ea9eaae9a9d87a05a95a430f09bd83 |
|
25-Feb-2011 |
Jeff Brown <jeffbrown@google.com> |
Add support for mouse hover and scroll wheel. Dispatch ACTION_HOVER_MOVE and ACTION_SCROLL through the View hierarchy as onGenericTouchEvent. Pointer events dispatched this way are delivered to the view under the pointer. Non-pointer events continue to be delivered to the focused view. Added scroll wheel support to AbsListView, ScrollView, HorizontalScrollView and WebView. Shift+VSCROLL is translated to HSCROLL as appropriate. Added logging of new pointer events in PointerLocationView. Fixed a problem in EventHub when a USB device is removed that resulted in a long stream of ENODEV errors being logged until INotify noticed the device was gone. Note that the new events are not supported by wallpapers at this time because the wallpaper engine only delivers touch events. Make all mouse buttons behave identically. (Effectively we only support one button.) Change-Id: I9ab445ffb63c813fcb07db6693987b02475f3756
/frameworks/base/services/input/InputDispatcher.cpp
|
bfaf3b91709ef35e0d5901b186edd7c2a9729161 |
|
23-Feb-2011 |
Jeff Brown <jeffbrown@google.com> |
Be more precise about tracking fallback keys. Only initiate fallback key handling if the first key down was not handled and there is no other fallback key already in progress. This prevents spurious fallbacks from being generated when applications handle the initial down but not repeated downs or the up. Change-Id: I8a513896cf96b16dc502cd72291926d5532aa2ab
/frameworks/base/services/input/InputDispatcher.cpp
|
cc0c159e9b3dd4e0f48da0ce3e33d2c68a651413 |
|
19-Feb-2011 |
Jeff Brown <jeffbrown@google.com> |
Add new hover move action and scroll wheel plumbing. 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
/frameworks/base/services/input/InputDispatcher.cpp
|
ebbd5d14ad3b1e762d9fcfa026e19413cc857e05 |
|
17-Feb-2011 |
Jeff Brown <jeffbrown@google.com> |
Fix a regression with MotionEvent parceling. Also added some more unit tests. Change-Id: I413654294d1a998eec056884e6df5eaa50f3daf4
/frameworks/base/services/input/InputDispatcher.cpp
|
91c69ab01539f7ba28708f41ec1835cc2920d0a0 |
|
15-Feb-2011 |
Jeff Brown <jeffbrown@google.com> |
Add support for arbitrary axes in MotionEvents. 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
/frameworks/base/services/input/InputDispatcher.cpp
|
58a2da843f2f22f406df8df1f011738eb8b7fcb1 |
|
26-Jan-2011 |
Jeff Brown <jeffbrown@google.com> |
Fix crashes caused by some input devices. The touch screen sometimes reports more than 10 pointers even though that's all we asked for. When this happens, we start dropping events with more than 10 pointers. This confuses applications and causes them to crash. Raised the limit to 16 pointers. Bug: 3331247 The default behavior was to identify all touch devices as touch screens. External devices that are plugged in are more likely to be touch pads not attached to a screen. Changed the default to be a touch pad and renamed some internal constants to avoid confusion. A certain mouse happens to also behave like a touch pad. That caused problems because we would see multiple concurrent traces of motion events coming from the same input device so we would batch them up. Added code to ensure that we don't batch events unless they come from the same *source* in addition to coming from the same *device*. Due to batching or misbehaving drivers, it's possible for the set of pointer ids to be different from what we expect when it comes time to split motion events across windows. As a result, we can generate motion events with 0 pointers. When we try to deliver those events, we cause an error in the InputTransport so we tear down the InputChannel and kill the application. Added code to check out assumption about pointer ids and drop the event gracefully instead. Patched up the tests to take into account the change in default behavior for identifying touch screens and touch pads. Change-Id: Ic364bd4cb4cc6335d4a1213a26d6bdadc7e33505
/frameworks/base/services/input/InputDispatcher.cpp
|
fbf097732137a32930d151f7ba6816a5b870c32a |
|
16-Jan-2011 |
Jeff Brown <jeffbrown@google.com> |
Support non-rectangular input regions. This enables the system bar to carve out a region through which events will be sent to the IME behind it. Bug: 3238092 Change-Id: I69b855a8d9b5b3ee525266c0861826e53e5b5028
/frameworks/base/services/input/InputDispatcher.cpp
|
928e054931d357326613c78e62f4d850b7c442ff |
|
10-Jan-2011 |
Jeff Brown <jeffbrown@google.com> |
Prevent events from getting backlogged. This change implements two heuristics. 1. When events are older than 10 seconds, they are dropped. 2. If the application is currently busy processing an event and the user touches a window belonging to a different application then we drop the currently queued events so the other application can start processing the gesture immediately. Note that the system takes care of synthesizing cancelation events automatically for any events that it drops. Added some new handle types to allow the native dispatcher to indirectly refer to the WindowManager's window state and app window token. This was done to enable the dispatcher to identify the application to which each window belongs but it also eliminates some lookup tables and linear searches through the window list on each key press. Bug: 3224911 Change-Id: I9dae8dfe23d195d76865f97011fe2f1d351e2940
/frameworks/base/services/input/InputDispatcher.cpp
|
95712850665492af670824abdba77f0944d984d1 |
|
05-Jan-2011 |
Jeff Brown <jeffbrown@google.com> |
Only allow touch events from one device at a time. Reject movements from other devices when one device is already down. This fixes jittery behavior when the user moves the mouse and touches the screen at the same time. Change-Id: I99151c8f2596a3139720f776bcbc559d4b314878
/frameworks/base/services/input/InputDispatcher.cpp
|
b4ff35df5c04aec71fce7e90a6d6f9ef7180c2ad |
|
03-Jan-2011 |
Jeff Brown <jeffbrown@google.com> |
Mouse pointer integration. 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
/frameworks/base/services/input/InputDispatcher.cpp
|