To help track down ANRs, include more information about recent
events in the input dispatcher dumps.
Bug: 9774124
Change-Id: I94732f173d3518c2f4780668d2eb3ee9ae9fcb10
No longer compile libandroidfw as a static library on the device
since it already exists as a shared library. Keeping the static
library would force us to provide a static library version of
libinput for the device as well which doesn't make sense.
Change-Id: I3517881b87b47dcc209d80dbd0ac6b5cf29a766f
The new implementation more accurately tracks the velocity
of flings and takes care to avoid obvious discontinuities.
The main goal is for a fling to appear to be a linear
extension of the movement already in progress. The minimum
fling velocity is set to ensure that flings appear to be
fairly smooth despite being discretized.
Use sequences of repeated key events instead of individual
down/up events to represent continuous motions in one
direction which can be helpful for stopping flings at boundaries
such as when flinging the cursor position within a text view.
Compute the movement thresholds based on the physical
size of the touch pad, if known. If not known, we assume a
nominal size.
Support stopping flings with a tap just like we do for
normal touch events elsewhere in the framework.
Moved the detection of ASSIST swipes into the InputReader
where it belongs. These swipes must be detected globally
to ensure consistent behavior across the all applications.
Added a custom protocol in EventHub to enable input device
drivers to override the timestamp of the following events
in a packet. This change enables input device drivers
that have a better idea of when an input event was actually
generated to pass this information to the input system.
Particularly useful with uinput.
Bug: 8583760
Change-Id: I8ef4e827804786d549cfaa00793a2b9dd0fda465
The code currently in place assumes that orientation has a range
of [-pi/2, +pi/2] as may be found with a touch digitizer. However,
when used with a digitzer that can report the full [-pi, +pi] range
of orientations (e.g. a stylus) the calculations here are incorrect.
This patch checks if the post-rotation value is out of range for
the axis, and wraps it back around.
Change-Id: I03a22f7bf9526a5d995df1a18430d6dd24c6d6ee
This reverts commit 6c0307dd0aefe9a08794b155fc03ee60ebd14f25, reversing
changes made to a2cd828b749c444d55c2c41c7dbb85088ff94b9f.
Conflicts:
packages/SystemUI/res/values-sv/strings.xml
Change-Id: Ia178efe8b14751583d47b2826bfe3d3d5463dd2e
Ensure that all callbacks into the window manager policy occur
on the input dispatcher thread in the right place. This fixes
a potential deadlock that may occur if the window manager
unregisters an input channel while holding its own lock.
The change is simply to defer running asynchronous commands
(usually callbacks into the policy) until the next iteration
of the dispatch looper thread.
Bug: 7382388
Change-Id: I90095580d717fcddb2209ef332df56400f837a34
This can happen due to a race when the input device is
opened or if the kernel happens to be missing the required
Android patches to set the timestamp correctly.
Bug: 7291243
Change-Id: If4319440eaff2889147c86296abd39efc5664346
Added a new WindowManager.LayoutParams inputFeatures flag
to disable automatic user activity behavior when an input
event is sent to a window.
Added a new WindowManager.LayoutParams field userActivityTimeout.
Bug: 7165399
Change-Id: I204eafa37ef26aacc2c52a1ba1ecce1eebb0e0d9
The input system needs to know about the window that has
focus, even if it is on a secondary display. So now we
send it the list of all windows and indicate which display
they are on. We filter the list of windows as necessary
when delivering touch events.
To keep things simple, monitor input channels and input
filters are not supported except on the main display.
We also do not pass the display id to applications; it is
only used inside the input system for now.
Properly scale touch coordinates based on the viewport.
This will be needed to ensure that touch works on external
display as well as when the internal display is being used
to simulate a different resolution.
Change-Id: I1815579a52fcc852c519b5391fc7ab8767c2dc59
The window manager is no longer responsible for telling the
input system about the display viewport.
Change-Id: I932882bae55decef55f25093bb2a7ebac1620bb1
Cleaned up the implementation of Surface and SurfaceSession
to use more consistent naming and structure.
Added JNI for all of the new surface flinger display API calls.
Enforced the requirement that all Surfaces created by
the window manager be named.
Updated the display manager service to use the new methods.
Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
Some touch device drivers report the range of
ABS_MT_ORIENTATION as [0,1]. The Linux multitouch protocol
spec says that the 0 value should always be considered vertical.
Add a new 'box' calibration mode for size to handle the case
where width and height are being provided. The 'diameter'
calibration mode is inadequate because it drops one of these
components.
Change-Id: I7bd744fdff95acd4044d295efe8bd7186dbe8061
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
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
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