Stop using system properties to publish information about
the key character map path. Instead, we can retrieve it
on demand by asking the window manager.
It was possible to exhaust the supply of system properties
when repeatedly adding and removing input devices.
Bug: 5532806
Change-Id: Idd361a24ad7db2edc185c8546db7fb05f9c28669
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
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
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
GPS Provider Service changes
GPS engine needs to receive network state changes from Android fw.
Added db query for the current APN, also added a new parameter
between JNI / HAL to the new method in AGpsRilInterface struct
for gps engine to receive APN from GPSLocationService
Conflicts:
services/java/com/android/server/location/GpsLocationProvider.java
Change-Id: I33c45027f1571493d3525324f62d199517c4960c
Signed-off-by: Mike Lockwood <lockwood@android.com>
GPS engine needs to receive network state changes from Android fw.
Added db query for the current APN, also added a new parameter
between JNI / HAL to the new method in AGpsRilInterface struct
for gps engine to receive APN from GPSLocationService
Change-Id: I62e35c948d2ac1961771d1a10581a3b8e695c05a
Signed-off-by: Mike Lockwood <lockwood@android.com>
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
Also defer anything that could start an activity from "system ready"
to "boot completed" time.
Bug: 5051683
Change-Id: I69db751cb991dd247bd0ac3c70a0d84c0d71f365
Signed-off-by: Mike Lockwood <lockwood@android.com>
1. No more End-Of-Arguments.
2. Daemons close the control socket after they are initialized.
3. No more system properties.
4. ip-up-vpn now creates state to pass the configuration.
5. JNI methods are split again for legacy VPN.
Change-Id: I02fafdf01d425c965345ef712b2bd5fdee3a0cab
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
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
The public API splits default route into two narrower routes.
Add this check in case some one calls the private API.
Change-Id: Ie1fc0155b74415b971380bc8429cd74026c3fda0
The first release of this API only supports TUN interface, and
so far there is no plan for TAP. TUN works on IP frames which
makes gateway nearly useless. The only value to have a gateway
is that kernel may use it to select the source address. However
currently it does not work in IPv6, and even in IPv4 applications
can bind to any local address on the device. Remove it to keep
the API clear, and it can be added back at any time if needed.
Change-Id: If9086d20d885a3a7f7ab5f07afbcfeecb677bbea
Packet info header (struct tun_pi) was required to support IPv6
in kernel prior to 2.6.26. Setting IFF_NO_PI will remove the header
from the packets sent/recieved via TUN file descriptor, so now they
are just raw IP packets.
Change-Id: I0b4ae9db23d3bc10995a00eb053527b499ad6eb6
This removes the dependency of android_util_Binder.h.
This change also removes some redundant zeroing.
Change-Id: Ie9fedd471dfa198f9a3261e03651f945cefbbf61
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
Host support is in UsbHostManager, device support is in UsbDeviceManager
Renamed UsbDeviceSettingsManager to UsbSettingsManager
Change-Id: Ib76e72957c233fa7f08f454d4d9a2a1da6368cc7
Signed-off-by: Mike Lockwood <lockwood@android.com>
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
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
Refactored PointerController to extract the surface management
code to a new component called a SpriteController so that it can
be used to move finger tracking spots around the screen as well.
The SpriteController is designed to fully decouple the client from
any latency introduced by surface transactions and drawing.
All sprite updates are performed asynchronously on the Looper using
a copy of the sprite state.
Added a stub SpotController implementation for touch pad UX.
It will be implemented in a subsequent patch.
Fixed a little bug in pointer orientation changes when entering
DISPLAY_ORIENTATION_90 the x offset was clobbered.
Change-Id: I6d59d80df9af61e93af50290e7776337d10c9d5a
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
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