History log of /frameworks/base/core/java/android/view/InputDevice.java
Revision Date Author Comments (<<< Hide modified files) (Show modified files >>>)
89625d35477606081e3ea46e287fe86f79b71f9c 16-Feb-2017 Aaron Whyte <awhyte@google.com> Unhide InputDevice.SOURCE_ROTARY_ENCODER

Test: Treehugger
Bug: 27314061
Bug: 22836852
Bug: 18707397
Change-Id: Icfb5b09533b7fa785b16251accfd24a10daee034
/frameworks/base/core/java/android/view/InputDevice.java
3787de16d24001eeb452e1c711d4290a396e67c9 21-Dec-2016 Vladislav Kaznacheev <kaznacheev@google.com> Implement pointer capture API

When in pointer capture mode, mouse pointer disappears and
further mouse events are dispatched to the focused view
in the window which has requested capture.

The captured events have the source SOURCE_MOUSE_RELATIVE
belonging to SOURCE_CLASS_TRACKBALL. They are
dispatched through dispatchCapturedPointerEvent /
onCapturedPointerEvent. There is also a new listener.

Pointer capture mode may only be granted to a currently
focused window, and will be canceled upon a window focus change.

Test: cts-tradefed ... --test android.view.cts.PointerCaptureTest
Bug: 30897034
Change-Id: I6e5934aa415ac2b6dda1cee173d0f23e5021af84
/frameworks/base/core/java/android/view/InputDevice.java
67e2ae86396c6d0f989285275cbf908dee5e71f7 12-Oct-2016 Aurimas Liutikas <aurimas@google.com> Fix import statement in view|transition|animation packages.

This change also remove trailing whitespace.

Test: code still compiles
Change-Id: I7eff4546320d67d2bae58d31bad0625ea0791b8f
/frameworks/base/core/java/android/view/InputDevice.java
e051f6f1fdb5e21cbed394d29dfcab5c642e4129 13-May-2016 Michael Wright <michaelwr@google.com> Rename PointerIcon and Pointer Capture APIs

This is a response to API council feedback.

Bug: 26830970
Change-Id: I1be541a53e3943d06640169671824f7daea15462
/frameworks/base/core/java/android/view/InputDevice.java
1f9dc882a52810940ef2fd0c353f80a57d64356f 26-Mar-2016 Kristian Monsen <kristianm@google.com> Store number of axis in Parcel to prevent infinite loop

BUG=25637534

Change-Id: Id3ca2fe12a4c45280bce65ee60906b8eeb63a530
/frameworks/base/core/java/android/view/InputDevice.java
d4eaef7f4c5a5d281de4fff272cd33e892e26264 30-Oct-2015 Jun Mukai <mukai@google.com> Make public pointer icon API with custom icons.

BUG: 25778347, 23804184
Change-Id: If138b97c750c912e9848412c27b65004899961eb
/frameworks/base/core/java/android/view/InputDevice.java
3e5f615800c37b8ba2af409c7d9f775b617e9a44 08-Dec-2015 Prashant Malani <pmalani@google.com> Merge "Add rotary encoder input source" into cw-e-dev am: 487f0d3d15 am: 6344cb8144 am: 3ebd5ceb90
am: 54909b8e6b

* commit '54909b8e6b45c913081df54496423bb35bd8955c':
Add rotary encoder input source
1db5397d88e722b1ab82ccb2b429ceec1179ccd8 12-Sep-2015 Jun Mukai <mukai@google.com> Allow changing mouse pointer icon for the current context.

Right now, it only supports I-beam on EditText, but further
rules will come in the future.

The png files for the icons are from chromium.

Bug: 24180385
Change-Id: I8de4ec8a5412b4830c08aa232c5083841c5c751c
/frameworks/base/core/java/android/view/InputDevice.java
67322b1ff058d9abadd94c10b0ce167508ead6f5 26-Aug-2015 Prashant Malani <pmalani@google.com> Add rotary encoder input source

Devices which have rotating encoders for input devices can mark
their MotionEvents as belonging to SOURCE_ROTARY_ENCODER. This is better
than mapping such input events to pre-existing input sources, which may
result is conflation regarding the expected behaviour of these older input
sources.

Events emanating from this input soruce will be accessible to the View
hierarchy via onGenericMotionEvent().

We also introduce a new axis constant, AXIS_SCROLL, for axis movements
that aren't strictly vertical or horizontal.

Bug: 18707397
Change-Id: I1ad9af7c87b97d2c98b58b71cab2b780d0c86ec3
/frameworks/base/core/java/android/view/InputDevice.java
f18920ba3182087938e245fab8e3e3008a39606b 12-Jun-2015 Michael Wright <michaelwr@google.com> Add new SOURCE_BLUETOOTH_STYLUS.

Bug: 21531826
Change-Id: Ib3448230d542a2aadb0f697db33451f69e089612
/frameworks/base/core/java/android/view/InputDevice.java
72285e5600fad17c42730d6f84164d8425d4d43c 06-Jun-2015 Tim Kilbourn <tkilbourn@google.com> API review: Update hasMic to hasMicrophone.

Also make the SearchEvent constructor available for testing.

Bug: 21572283
Bug: 21572676
Change-Id: I35cfd88b45aeb97b6ccf83aeb46b0ecc4bbc0947
/frameworks/base/core/java/android/view/InputDevice.java
6d85cf2bd7cba6890f1b2bb26073105c3b8fc432 08-Apr-2015 Tim Kilbourn <tkilbourn@google.com> Simplify input-audio device mapping

Instead of matching on unique ids, allow an .idc file to specify
whether the input device also has a mic.

Bug: 15374820
Change-Id: Ib5f934f1f37f6b98bb906a5be86c6bfa9a5f09c8
/frameworks/base/core/java/android/view/InputDevice.java
415b450bf29a8ad28ecc5c1c1eea9bd61e49bf72 20-Mar-2015 Tim Kilbourn <tkilbourn@google.com> Add unique id to InputDevice.

If an input device driver assigns unique ids to devices (e.g., MAC
address), this method will be used to retrieve it from the device.

Change-Id: If1fd6643c5be7af5b989ef47f4bb653e7a63b6c6
/frameworks/base/core/java/android/view/InputDevice.java
96658f716779b4f2f5dd148cbf6df59d5a87ace4 14-May-2014 Jinsuk Kim <jinsukkim@google.com> New keycode definitions for HDMI-CEC

Following keys are added to be mapped to HDMI-CEC standard keys:

KEYCODE_MEDIA_TOP_MENU
KEYCODE_11
KEYCODE_12
KEYCODE_LAST_CHANNEL
KEYCODE_TV_DATA_SERVICE

Also updated the information on the key code update by removing
some files not present any more.

Change-Id: I305d9b578c1824f34c457144a68132717dc9a97f
/frameworks/base/core/java/android/view/InputDevice.java
d08c864784b5d416805aee502e5294b0188a7bd8 28-Mar-2014 Michael Wright <michaelwr@google.com> Add InputDevice#supportsSource(int).

This mirrors the InputEvent#isFromSource API.

Change-Id: Ie4869cc52d22d49a71d4d3e22f1ae38b16367395
/frameworks/base/core/java/android/view/InputDevice.java
ca9eef6203b7cfb0084f8305d4dcc5d70a7a25cd 16-Dec-2013 RoboErik <epastern@google.com> b/12068020 Make kb layouts only unique to vendor/product. Do not merge

This is a cherry-pick of https://googleplex-android-review.git.corp.google.com/#/c/399886/

Instead of storing a kb layout per device descriptor (which is expected
to be unique), store it for each vendor/product. This way we can keep
a consistent layout between identical but physically different keyboards.

There are some corner cases this is expected to fail on, namely devices
that incorrectly have the same vendor/product id. Devices that don't
define a vendor/product id will continue to use the descriptor to store
layout files.

Change-Id: I1f2508561992080459310d5a644dad65a9c24f1a
/frameworks/base/core/java/android/view/InputDevice.java
10fac45b6f620ac2ef242e983c3b4d6ad85eb223 03-Sep-2013 Michael Wright <michaelwr@google.com> Clarify InputDevice#getControllerNumber documentation

Bug: 10461158
Change-Id: I7a4e6e3eb09daa48ed72d2acf9638d8cf54d86ef
/frameworks/base/core/java/android/view/InputDevice.java
b7b2d4b490f5dd672e0b00ced579dc052e3637e9 20-Aug-2013 Michael Wright <michaelwr@google.com> Expose API to query devices for supported keys

Change-Id: I29f230e19c6f851b4b72b2fc8dd41f5abcba4631
/frameworks/base/core/java/android/view/InputDevice.java
54e56946d1aa3586e7b27fb63dfb7d3c1238c61d 13-Aug-2013 Michael Wright <michaelwr@google.com> Expose vendor and product IDs for InputDevices

Change-Id: I08665a41e474cbedd10b342eeae20d2ca7c03ac0
/frameworks/base/core/java/android/view/InputDevice.java
ac6c78b6eef49f5c1ab2a346d90ccb99ccec18f4 17-Jul-2013 Michael Wright <michaelwr@google.com> Add controller numbers for gamepads / joysticks

Change-Id: I30ac9add6a2473a5ebd83a022c571545e61d1136
/frameworks/base/core/java/android/view/InputDevice.java
7ddd11035b25b0a2dbf09f9d9efd3fca701f0a79 21-May-2013 Michael Wright <michaelwr@google.com> Add input device property for buttons under touchpads

Bug: 8990644
Change-Id: I2cc10457595a861b707c0394bd435d60efa8405b
/frameworks/base/core/java/android/view/InputDevice.java
072137c80a9ce30a1c79cc416932a24bd2e4dccb 25-Apr-2013 Michael Wright <michaelwr@google.com> Fixed javadoc in input related classes

Change-Id: Ie415f812a0f473488d74119dab18296a488db6b9
/frameworks/base/core/java/android/view/InputDevice.java
c6091c64c90e9557ea58e0d7cf75915aea7c6c3e 02-Apr-2013 Michael Wright <michaelwr@google.com> Pipe through device resolution information

Bug: 8424494
Change-Id: Iafeeee0d5cd29342c1cdc86b9616222aaa5d1b94
/frameworks/base/core/java/android/view/InputDevice.java
e7a9ae8ba0fb7fc61960e3facd0c5534e9ffce1e 09-Mar-2013 Michael Wright <michaelwr@google.com> Add touch navigation input source

Bug: 8276741
Change-Id: I674b9804bf9ae76d694ae7073b54a7d43474a43c
/frameworks/base/core/java/android/view/InputDevice.java
74e4156e5c62392c37f4a70358de30dcfff4956f 08-Mar-2013 Michael Wright <michaelwr@google.com> Add InputDevice#isFromSource convenience method

Change-Id: If2d2e37bc3fff5a862ea3652c7ef9778018e7ecc
/frameworks/base/core/java/android/view/InputDevice.java
3a084af2e90849aaa8beb3a610189e3399c63ea0 07-Nov-2012 Kenny Root <kroot@google.com> Correct executable bit for source files

Many media files and source code files were marked as executable in Git.
Remove those.

Also a shell script and python script were not marked as executable.

Change-Id: Ieb51bafb46c895a21d2e83696f5a901ba752b2c5
/frameworks/base/core/java/android/view/InputDevice.java
7e4ff4b986d626493afb676dd4824d2b3663260a 30-May-2012 Jeff Brown <jeffbrown@google.com> Fix comparison of device source bits.

Bug: 6576743
Change-Id: I6952b052e2ab9e62ddd46ab76f4df37ecc656757
/frameworks/base/core/java/android/view/InputDevice.java
daa3753a04699724d2cfe824ac1f5a266d643a05 02-May-2012 Jeff Brown <jeffbrown@google.com> Improve handling of built-in keyboard.

The window manager policy made some incorrect assumptions about the
meaning of the Configuration.keyboard field. We need to be more
careful about distinguishing between built-in and external keyboards.

Most of this change is to move the determination of the parts of
the Configuration related to input devices into the WindowManagerService
leveraging new features of the InputManagerService to good effect.

Then we plumb through the flag that indicates whether a device
is internal or external so that we can be more particular about
how the lid switch effects changes to the Configuration.

Bug: 6424373
Change-Id: I36a1c22ade35e578955465a25940a33f227b9763
/frameworks/base/core/java/android/view/InputDevice.java
00710e906bdafd58386ee7f81fa84addd218122f 20-Apr-2012 Jeff Brown <jeffbrown@google.com> Make InputDevice.SOURCE_STYLUS meaningful.

Bug: 5424551
Change-Id: I415cb1842422e050cc41b17f5a1f13b4fab17a44
/frameworks/base/core/java/android/view/InputDevice.java
a47425a13c19f95057df78b8bb65bb25657e8753 13-Apr-2012 Jeff Brown <jeffbrown@google.com> Add support for input devices that have vibrators.

Added a getVibrator() method to InputDevice which returns a Vibrator
associated with that input device. Its uses the same API as the
system vibrator which makes it easy for applications to be modified
to use one or the other.

Bug: 6334179
Change-Id: Ifc7f13dbcb778670f3f1c07ccc562334e6109d2e
/frameworks/base/core/java/android/view/InputDevice.java
af9e8d38184c6ba4d2d3eb5bde7014a66dd8a78b 13-Apr-2012 Jeff Brown <jeffbrown@google.com> Notify applications when input devices change.

This change allows the InputManager to keep track of what input
devices are registered with the system and when they change.
It needs to do this so that it can properly clear its cache of
input device properties (especially the key map!) when changes
occur.

Added new API so that applications can register listeners for
input device changes.

Fixed a minor bug in EventHub where it didn't handle EPOLLHUP
properly so it would spam the log about unsupposed epoll events
until inotify noticed that the device was gone and removed it.

Change-Id: I937d8c601f7185d4299038bce6a2934fe4fdd2b3
/frameworks/base/core/java/android/view/InputDevice.java
9f25b7fdf216c9ef0bd2322cd223eeaf0d60f77f 10-Apr-2012 Jeff Brown <jeffbrown@google.com> Request key maps from input manager service.

Instead of each application loading the KeyCharacterMap from
the file system, get them from the input manager service as
part of the InputDevice object.

Refactored InputManager to be a proper singleton instead of
having a bunch of static methods.

InputManager now maintains a cache of all InputDevice objects
that it has loaded. Currently we never invalidate the cache
which can cause InputDevice to return stale motion ranges if
the device is reconfigured. This will be fixed in a future change.

Added a fake InputDevice with ID -1 to represent the virtual keyboard.

Change-Id: If7a695839ad0972317a5aab89e9d1e42ace28eb7
/frameworks/base/core/java/android/view/InputDevice.java
e38fdfae9196afd1bdc14c5ec6c12793af1e2550 06-Apr-2012 Jeff Brown <jeffbrown@google.com> Add a unique input device descriptor.

The purpose of the input device descriptor is to make it possible
to associate persistent settings for each input device, such as the
keyboard layout.

The descriptor is a hash of the information we have about the
device, such as its vendor id, product id, unique id, name,
or location.

Bug: 6110399
Change-Id: Idb80f946819b3f0dbf4e661bb0a753dbc2b60981
/frameworks/base/core/java/android/view/InputDevice.java
ac14351e16e1258f1cb54e2bf772b8be004eb2b8 06-Apr-2012 Jeff Brown <jeffbrown@google.com> Move some APIs from window manager to input manager.

Simplified input injection API down to just one call.

Removed all input state reading API. It was only used by the
window manager policy and required a permission that applications
could not obtain. READ_INPUT_STATE is now unused and deprecated.

Change-Id: I41278141586ddee9468cae0fb59ff0dced6cbc00
/frameworks/base/core/java/android/view/InputDevice.java
9df6e7a926ce480baf70e97ee1b9ea387193f6ad 05-Apr-2012 Jeff Brown <jeffbrown@google.com> Initial commit of InputManager and keyboard layout API.

Added a new InputManager service for interacting with input
devices and configuring them. This will be the focus of
an upcoming refactoring.

Added an API for registering keyboard layouts with the system
based on the use of a broadcast receiver. Applications can
register their own keyboard layouts simply by declaring a
broadcast receiver in their manifests.

Added the skeleton of a package that will ultimately contain
the keyboard layouts and other input device related resources
that are part of the base system.

Bug: 6110399
Change-Id: Ie01b0ef4adbd5198f6f012e73964bdef3c51805c
/frameworks/base/core/java/android/view/InputDevice.java
1e08fe90df18930691b0c2ec22e5db25d7fcb4cf 16-Nov-2011 Jeff Brown <jeffbrown@google.com> Eliminate hw.keyboards system properties.

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
/frameworks/base/core/java/android/view/InputDevice.java
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/core/java/android/view/InputDevice.java
44bc17c6b517aef35a390c81b5aa79c4f284f744 21-Apr-2011 Dianne Hackborn <hackbod@google.com> Rework display size access.

Applications now get the display size from the window manager. No
behavior should be changed yet, this is just prep for some real
changes.

Change-Id: I2958a6660895c1cba2b670509600014e55ee9273
/frameworks/base/core/java/android/view/InputDevice.java
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/core/java/android/view/InputDevice.java
6f2fba428ca5e77a26d991ad728e346cc47609ee 19-Feb-2011 Jeff Brown <jeffbrown@google.com> Add new axes for joysticks and mouse wheels.

Added API on InputDevice to query the set of axes available.
Added API on KeyEvent and MotionEvent to convert keycodes and axes
to symbolic name strings for diagnostic purposes.
Added API on KeyEvent to query if a given key code is a gamepad button.
Added a new "axis" element to key layout files to specify the
mapping between raw absolute axis values and motion axis ids.
Expanded the axis bitfield to 64bits to allow for future growth.
Modified the Makefile for keyboard prebuilts to run the keymap
validation tool during the build.
Added layouts for two game controllers.
Added default actions for game pad button keys.
Added more tests.
Fixed a bunch of bugs.

Change-Id: I73f9166c3b3c5bcf4970845b58088ad467525525
/frameworks/base/core/java/android/view/InputDevice.java
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/core/java/android/view/InputDevice.java
cb1404e45639d20439d7700b06d57ca1a1aad1fa 16-Jan-2011 Jeff Brown <jeffbrown@google.com> Add joystick support to framework.

Change-Id: I95374436708752e1a9cff3f85c5b9bc3e0987961
/frameworks/base/core/java/android/view/InputDevice.java
dc1ab4b5cc274b7d744c11a939bb5910becec5e0 15-Sep-2010 Jeff Brown <jeffbrown@google.com> Input API review.

Drop currently unsupported input features.
Add documentation comments.

Change-Id: I407d2e1dd90c5ee82983a3ccf177430d35ee7592
/frameworks/base/core/java/android/view/InputDevice.java
6eb5ac9ceeb3ff67d38c7ead54b4247e762f278d 31-Aug-2010 Jeff Brown <jeffbrown@google.com> Fix doc link in InputDevice.

Change-Id: I3b356b8e3803661ccfe5bb4812021b6c6d576d21
/frameworks/base/core/java/android/view/InputDevice.java
8d60866e2100db70ecf0502c14768a384514d7e9 30-Aug-2010 Jeff Brown <jeffbrown@google.com> Input device calibration and capabilities.

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
/frameworks/base/core/java/android/view/InputDevice.java
6d0fec2de3601821f4f44eeb7d7deedebb2b7117 24-Jul-2010 Jeff Brown <jeffbrown@google.com> Refactor input reader to support new device types more easily.

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
/frameworks/base/core/java/android/view/InputDevice.java
e33348ba54cd68d6936cffd4507037c14d4b10c2 16-Jul-2010 Jeff Brown <jeffbrown@google.com> Fix bug with phantom input windows.

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
/frameworks/base/core/java/android/view/InputDevice.java
c5ed5910c9ef066cec6a13bbb404ec57b1e92637 15-Jul-2010 Jeff Brown <jeffbrown@google.com> Add support for new input sources.

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
/frameworks/base/core/java/android/view/InputDevice.java