| Commit message (Collapse) | Author | Age | Files | Lines |
|\
| |
| |
| |
| |
| |
| | |
Merge commit '03aa28fb36589a3d601be08e75c08a24c4344d6f' into gingerbread-plus-aosp
* commit '03aa28fb36589a3d601be08e75c08a24c4344d6f':
Improve the input policy handling a bit.
|
| |
| |
| |
| |
| |
| |
| | |
Fixed some issues with Monkeys turning off their own screens. Ook ook!
Added some more comments to explain what's going on.
Change-Id: Id2bc0466161a642a73ef7ef97725d1c81e984b12
|
|\ \
| |/
| |
| |
| |
| |
| |
| |
| | |
into gingerbread
Merge commit '1da8d4d1697cec871dea8c30dad67e90db10bde6' into gingerbread-plus-aosp
* commit '1da8d4d1697cec871dea8c30dad67e90db10bde6':
Fix an event injection bug when the policy is bypassed.
|
| |\ |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Added the concept of a "trusted" event to distinguish between events from
attached input devices or trusted injectors vs. other applications.
This change enables us to move certain policy decisions out of the
dispatcher and into the policy itself where they can be handled more
systematically.
Change-Id: I4d56fdcdd31aaa675d452088af39a70c4e039970
|
|\ \ \
| |/ /
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
into gingerbread
Merge commit '86564dc673db6dd752c326e53404677a3db43bec' into gingerbread-plus-aosp
* commit '86564dc673db6dd752c326e53404677a3db43bec':
GPS: Add update_network_state call to AGpsRillInterface
|
| | |
| | |
| | |
| | |
| | | |
Change-Id: I404a7a45773f592de7dfe75a8287fef15515ea8b
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|\ \ \
| |/ /
|/| |
| | | |
Change-Id: Ie00785e37809b677d6e8ab44c47e1f26037793d2
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
The Linux kernel supports reporting "cold" battery health to sysfs.
Android framework has not implemented this and it defaults to "unknown"
This adds handling the cold battery health.
Change-Id: Idcc156aae6aabce73391081143f79d052edf332e
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
BUG: 3082940
Change-Id: I0953882cb768aec608f754c3bc9ab41418eded97
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
|\ \ \
| | |/
| |/| |
|
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
This change fixes several issues where events would be dropped in the
input dispatch pipeline in such a way that the dispatcher could not
accurately track the state of the input device.
Given more robust tracking, we can now also provide robust cancelation
of input events in cases where an application might otherwise become
out of sync with the event stream due to ANR, app switch, policy decisions,
or forced focus transitions.
Pruned some of the input dispatcher log output.
Moved the responsibility for calling intercept*BeforeQueueing into
the input dispatcher instead of the input reader and added support for
early interception of injected events for events coming from trusted
sources. This enables behaviors like injection of media keys while
the screen is off, haptic feedback of injected virtual keys, so injected
events become more "first class" in a way.
Change-Id: Iec6ff1dd21e5f3c7feb80ea4feb5382bd090dbd9
|
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
BUG: 3082940
Change-Id: Idd584ab8fe4512aae0769ecd1274c55d6ea2e5e7
Signed-off-by: Mike Lockwood <lockwood@google.com>
|
|/ /
| |
| |
| |
| | |
Change-Id: I5f2b55959bd67864168690c1fe619e55edc18268
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
| |
| |
| |
| |
| | |
Change-Id: Ic5551c94bfb4e2c31cdc3ed92d938f00f46785d6
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Adding changes to be able to have access to missing data to SUPL
(celld, imsi, WAP_PUSH and SMS)
Change-Id: I0207f7f7ea6595ed3fd7021cb732feddf52e4cf9
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
| |
| |
| |
| |
| |
| |
| |
| | |
Added dumpsys reporting to EventHub.
Made the formatting a bit clearer.
Added 'Locked' suffix to some internal methods of EventHub.
Change-Id: Ic449560bcce378f6361895d27c66854e9724abb0
|
| |
| |
| |
| | |
Change-Id: I83e4108a87332692e03791dc066206becbc7941f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This feature is currently used to enable dragging the start and end
selection handles of a TextView at the same time. Could be used for
other things later.
Deleted some dead code in ArrowKeyMovementMethod and CursorControllers.
Change-Id: I930accd97ca1ca1917aab8a807db2c950fc7b409
|
| |
| |
| |
| | |
Change-Id: I9360c4ec5c29937fce06b44ffc71fca58c8b3d5f
|
| |
| |
| |
| |
| |
| | |
This optimization was broken due to recent changes in how ANRs are handled.
Change-Id: Ic99248a12755fadac8d4893e7d305b773e038d3d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Redesigned the input dispatcher's ANR timeout mechanism so it is much
closer to Froyo's policy. ANR is only ever signalled if the dispatcher
is waiting on a window to finish processing its previous event(s) and
there is new pending input.
In the old code, we tracked the dispatch timeout separately for each
input channel. This was somewhat complicated and also resulted in the
situation where applications could ANR long after the user had pushed
them into the background.
Change-Id: I666ecada0952d4b95f1d67b9f733842b745c7f4b
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change is essentially a rewrite of the main input dispatcher loop
with the target identification folded in. Since the input dispatcher now
has all of the window state, it can make better decisions about
when to ANR.
Added a .5 second deadline for processing app switch keys. This behavior
predates Gingerbread but had not previously been ported.
Fixed some timing inaccuracies in the ANR accounting that could cause
applications to ANR sooner than they should have.
Added a mechanism for tracking key and motion events that have been
dispatched to a window so that appropriate cancelation events can be
synthesized when recovering from ANR. This change helps to keep
applications in sync so they don't end up with stuck buttons upon
recovery from ANRs.
Added more comments to describe the tricky parts of PollLoop.
Change-Id: I13dffca27acb436fc383980db536abc4d8b9e6f1
|
| |
| |
| |
| | |
Change-Id: I6216e082324ee29bf50e37acc673350ca5417c4d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added the MotionEvent.FLAG_WINDOW_IS_OBSCURED flag which is set by the
input manager whenever another visible window is partly or wholly obscured
the target of a touch event so that applications can filter touches
accordingly.
Added a "filterTouchesWhenObscured" attribute to View which can be used to
enable filtering of touches when the view's window is obscured.
Change-Id: I936d9c85013fd2d77fb296a600528d30a29027d2
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Finished the input device capability API.
Added a mechanism for calibrating touch devices to obtain more
accurate information about the touch contact area.
Improved pointer location to show new coordinates and capabilities.
Optimized pointer location display and formatting to avoid allocating large
numbers of temporary objects. The GC churn was causing the application to
stutter very badly when more than a couple of fingers were down).
Added more diagnostics.
Change-Id: Ie25380278ed6f16c5b04cd9df848015850383498
|
| |
| |
| |
| |
| | |
Bug: 2931575
Change-Id: Ib8b1793addcda74b2fa6de2ce61b6133b8ffda9d
|
| |
| |
| |
| | |
Change-Id: I24b3a17753e91ecda60a60fe5cd2e6b3260e033d
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Previously, the input dispatcher assumed that the input channel's
receive pipe file descriptor was a sufficiently unique identifier for
looking up input channels in its various tables. However, it can happen
that an input channel is disposed and then a new input channel is
immediately created that reuses the same file descriptor. Ordinarily
this is not a problem, however there is a small opportunity for a race
to arise in InputQueue.
When InputQueue receives an input event from the dispatcher, it
generates a finishedToken that encodes the channel's receive pipe fd,
and a sequence number. The finishedToken is used by the ViewRoot
as a handle for the event so that it can tell the InputQueue when
the event has finished being processed.
Here is the race:
1. InputQueue receives an input event, assigns a new finishedToken.
2. ViewRoot begins processing the input event.
3. During processing, ViewRoot unregisters the InputChannel.
4. A new InputChannel is created and is registered with the Input Queue.
This InputChannel happens to have the same receive pipe fd as
the one previously registered.
5. ViewRoot tells the InputQueue that it has finished processing the
input event, passing along the original finishedToken.
6. InputQueue throws an exception because the finishedToken's receive
pipe fd is registered but the sequence number is incorrect so it
assumes that the client has called finish spuriously.
The fix is to include a unique connection id within the finishedToken so
that the InputQueue can accurately confirm that the token belongs to
the currently registered InputChannel rather than to an old one that
happened to have the same receive pipe fd. When it notices this, it
ignores the spurious finish.
I've also made a couple of other small changes to avoid similar races
elsewhere.
This patch set also includes a fix to synthesize a finished signal
when the input channel is unregistered on the client side to
help keep the server and client in sync.
Bug: 2834068
Change-Id: I1de34a36249ab74c359c2c67a57e333543400f7b
|
| |
| |
| |
| |
| |
| |
| | |
Results in an approximately 60% reduction in InputDispatcher thread CPU time.
(Went from 3% to 1% when measured with CPU frequency scaling disabled.)
Change-Id: Ia6e6087a719ee518fe37b428a871c7240bd4143f
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This change involves adding a new method to IWindowManager,
monitorInput() that returns an InputChannel to receive a copy of all
input that is dispatched to applications. The caller must have
the READ_INPUT_STATE permission to make this request (similar to
other window manager methods such as getKeycodeState).
Change-Id: Icd14d810174a5b2928671ef16de73af88302aea0
|
| |
| |
| |
| |
| |
| |
| | |
Added a new asynchronous injection mode and made the existing
synchronization mechanism more robust.
Change-Id: Ia4aa04fd9b75ea2461a844c5b7933c831c1027e6
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Refactored the input reader so that each raw input protocol is handled
by a separate subclass of the new InputMapper type. This way, behaviors
pertaining to keyboard, trackballs, touchscreens, switches and other
devices are clearly distinguished for improved maintainability.
Added partial support for describing capabilities of input devices
(incomplete and untested for now, will be fleshed out in later commits).
Simplified EventHub interface somewhat since InputReader is taking over
more of the work.
Cleaned up some of the interactions between InputManager and
WindowManagerService related to reading input state.
Fixed swiping finger from screen edge into display area.
Added logging of device information to 'dumpsys window'.
Change-Id: I17faffc33e3aec3a0f33f0b37e81a70609378612
|
| |
| |
| |
| |
| |
| |
| | |
remove old sensor service and implement SensorManager
on top of the new (native) SensorManger API.
Change-Id: Iddb77d498755da3e11646473a44d651f12f40281
|
| |
| |
| |
| |
| |
| | |
Fix a minor threading bug in InputManager dump.
Change-Id: Ic2eecf7df5a8dc9f40561fcb03ebe58a2c073778
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Add dumpsys integration for the native input dispatcher.
Add some InputDevice API stubs.
Add an appendFormat helper method to String8 for printf style
string formatting mainly for debugging purposes.
Use generic ArrayList<WindowState> everywhere in WindowManagerService
to eliminate unnecessary casts all over.
Change-Id: I9d1e3bd90eb7222d10620200477f11b7bfd25e44
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added several new coordinate values to MotionEvents to capture
touch major/minor area, tool major/minor area and orientation.
Renamed NDK input constants per convention.
Added InputDevice class in Java which will eventually provide
useful information about available input devices.
Added APIs for manufacturing new MotionEvent objects with multiple
pointers and all necessary coordinate data.
Fixed a bug in the input dispatcher where it could get stuck with
a pointer down forever.
Fixed a bug in the WindowManager where the input window list could
end up containing stale removed windows.
Fixed a bug in the WindowManager where the input channel was being
removed only after the final animation transition had taken place
which caused spurious WINDOW DIED log messages to be printed.
Change-Id: Ie55084da319b20aad29b28a0499b8dd98bb5da68
|
| |
| |
| |
| | |
Change-Id: I0439648f6eb5405f200e4223c915eb3a418b32b9
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Removed old input dispatch code.
Refactored the policy callbacks.
Pushed a tiny bit of the power manager state down to native.
Fixed long press on MENU.
Made the virtual key detection and cancelation a bit more precise.
Change-Id: I5d8c1062f7ea0ab3b54c6fadb058c4d5f5a9e02e
|
| |
| |
| |
| |
| |
| |
| |
| | |
This change mainly unwinds a premature optimization in the
dispatch pipeline.
To test HOME injection, run 'adb shell input keyevent 3'.
Change-Id: I1c4b7377c205da7c898014b8b07fc6dc1d46e4dd
|
| |
| |
| |
| |
| | |
Change-Id: Ifc68f27a6cb841240db182f4c77ddd8085a8c149
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Set a default orientation of ROTATION_0.
Added some more careful checks based on whether we have valid
absolute axis information from the driver.
Reset key repeating during configuration changes since the keyboard
device may have been removed.
Change-Id: I685960828acffcb17595fc5683309e8064a76714
|
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Target identification is now fully native.
Fixed a couple of minor issues related to input injection.
Native input enabled by default, can be disabled by setting
WindowManagerPolicy.ENABLE_NATIVE_INPUT_DISPATCH to false.
Change-Id: I7edf66ed3e987cc9306ad4743ac57a116af452ff
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Rather than polling for events from the native code in an event thread,
we now require the GPS HAL libraries to call our callbacks from a thread
that is registered with the JVM to call directly into Java.
This eliminates a thread from our code and removes one step in the chain
of message passing from the GPS to the Location Manager client.
Change-Id: I2745a157690310ba9a699a8369f54a7366c6b1ba
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added ANRs handling.
Added event injection.
Fixed a NPE ActivityManagerServer writing ANRs to the drop box.
Fixed HOME key interception.
Fixed trackball reporting.
Fixed pointer rotation in landscape mode.
Change-Id: I50340f559f22899ab924e220a78119ffc79469b7
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Added more tests.
Fixed a regression in Vector.
Fixed bugs in pointer tracking.
Fixed a starvation issue in PollLoop when setting or removing callbacks.
Fixed a couple of policy nits.
Modified the internal representation of MotionEvent to be more
efficient and more consistent.
Added code to skip/cancel virtual key processing when there are multiple
pointers down. This helps to better disambiguate virtual key presses
from stray touches (such as cheek presses).
Change-Id: I2a7d2cce0195afb9125b23378baa94fd2fc6671c
|
| |
| |
| |
| |
| |
| |
| |
| | |
Refactored the code to eliminate potential deadlocks due to re-entrant
calls from the policy into the dispatcher. Also added some plumbing
that will be used to notify the framework about ANRs.
Change-Id: Iba7a10de0cb3c56cd7520d6ce716db52fdcc94ff
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
The old dispatch mechanism has been left in place and continues to
be used by default for now. To enable native input dispatch,
edit the ENABLE_NATIVE_DISPATCH constant in WindowManagerPolicy.
Includes part of the new input event NDK API. Some details TBD.
To wire up input dispatch, as the ViewRoot adds a window to the
window session it receives an InputChannel object as an output
argument. The InputChannel encapsulates the file descriptors for a
shared memory region and two pipe end-points. The ViewRoot then
provides the InputChannel to the InputQueue. Behind the
scenes, InputQueue simply attaches handlers to the native PollLoop object
that underlies the MessageQueue. This way MessageQueue doesn't need
to know anything about input dispatch per-se, it just exposes (in native
code) a PollLoop that other components can use to monitor file descriptor
state changes.
There can be zero or more targets for any given input event. Each
input target is specified by its input channel and some parameters
including flags, an X/Y coordinate offset, and the dispatch timeout.
An input target can request either synchronous dispatch (for foreground apps)
or asynchronous dispatch (fire-and-forget for wallpapers and "outside"
targets). Currently, finding the appropriate input targets for an event
requires a call back into the WindowManagerServer from native code.
In the future this will be refactored to avoid most of these callbacks
except as required to handle pending focus transitions.
End-to-end event dispatch mostly works!
To do: event injection, rate limiting, ANRs, testing, optimization, etc.
Change-Id: I8c36b2b9e0a2d27392040ecda0f51b636456de25
|
| |
| |
| |
| |
| |
| |
| | |
Also update to support new position mode API.
Change-Id: I00acc094d3e85bc5c0cd431af517064bfa8f2b1a
Signed-off-by: Mike Lockwood <lockwood@android.com>
|
| |
| |
| |
| |
| | |
Change-Id: I9071f31badee9628126c91cd4ce55acf41ee186f
Signed-off-by: Mike Lockwood <lockwood@android.com>
|