2500 Commits

Author SHA1 Message Date
Jeff Brown
de7a8ead24 Add new ASSIST key and map it to the global assist intent.
Moved some duplicate code from SearchPanelView and LockScreen
over to SearchManager to avoid creating yet another copy of it
in PhoneWindowManager.

Bug: 6594275
Change-Id: Ib4ebcd6817639d17548952ab2ce7cb876c05777c
2012-06-14 04:16:26 -07:00
Jeff Brown
51df04b93e Port the legacy velocity tracker strategy.
For comparison purposes, port the legacy velocity tracker
algorithm as it behaved prior to ICS.

Bug: 6413587
Change-Id: I7e8e56584dcdb1a3c660ca9d8f9c5bd5d868e449
2012-06-04 12:34:03 -07:00
Jeff Brown
a5b0698231 Implement a second order integrating VT strategy.
Bug: 6413587
Change-Id: I51bc7b8cbff22b10b728fc84ee15370e9984dd55
2012-06-04 12:34:03 -07:00
Jeff Brown
18f329e948 Implement a weighted least squares VelocityTracker strategy.
No change to the default strategy.

Bug: 6413587
Change-Id: I08eb6f9a511e65ad637359b55b5993c26ba93b40
2012-06-04 12:34:03 -07:00
Jeff Brown
1fbbc0716f Merge "Implement an integrating VelocityTracker strategy." into jb-dev 2012-06-03 21:16:38 -07:00
Jeff Brown
f47e76e2c7 Merge "Make velocity tracker strategy configurable." into jb-dev 2012-06-03 21:16:18 -07:00
Jeff Brown
53dd12a668 Implement an integrating VelocityTracker strategy.
This algorithm better tolerates certain kinds of errors in the
touch input than the least squares strategy but it may underestimate
the velocity of accelerating movements.  This algorithm is
mainly of interest as a baseline for testing and comparison with the
least squares algorithm, which remains the default.

Bug: 6413587
Change-Id: I8ddb50084e44875e234717907e5b06d03f59788c
2012-06-03 19:23:58 -07:00
Jeff Brown
9eb7d86181 Make velocity tracker strategy configurable.
This change is very useful for testing purposes because it makes it
easy to compare different implementations to see how they behave.

There is no change to the current default strategy.

Bug: 6413587
Change-Id: I4d8567aa4160571ba9fa397ce419882cd9366749
2012-06-03 19:21:49 -07:00
Chet Haase
486590963e Skip eglSwapBuffers() call when we do not draw to GL
The fix is to track when we issue GL drawing commands, and to skip the
call to eglSwapBuffers() when a DisplayList does not result in
any actual rendering calls to GL.

Issue #6364143 QuickMuni list items and buttons flicker instead of fade

Change-Id: I60a02c61a58c32d92481a1e814b4c8a49c6a37a3
2012-05-31 17:22:27 -07:00
Jeff Brown
90729403d5 Detect when pointer has stopped moving.
Some input devices do not generate ACTION_MOVE events while all
pointers have stopped, thereby lulling the VelocityTracker into
a false sense of complacency.  Before handling the following sample,
reset the VelocityTracker state so as not to be influenced by
earlier samples before the pointer stopped.  The velocity after
stopping is assumed to be discontinuous.

Bug: 6413587
Change-Id: I6387bc036ff141d083d3d17a89e37eeaa3188349
2012-05-14 18:57:05 -07:00
Jeff Brown
7174a491bc Improve touch event resampling.
Fixed a few bugs related to the id-to-index mapping for
pointer coordinates.

Tightened the bounds on the resampling time interval to
avoid predicting too far into the future.

Only lerp X and Y components of motion events.

Alter the future to satisfy past predictions.  (Rewrite touch
events to conceal obvious discontinuities.)

Added a system property to control whether resampling is enabled
for debugging purposes.

Bug: 6375101
Change-Id: I35972d63278bc4e78148053a4125ad9abeebfedb
2012-05-14 18:31:53 -07:00
Jeff Brown
85bd0d6283 More VelocityTracker refactoring.
Bug: 6413587
Change-Id: Ida1152e7a34d5fe5caab5e6b5e1bc79f6c7a25e6
2012-05-13 16:10:57 -07:00
Jeff Brown
8a90e6e317 Minor refactoring before starting on velocity tracker changes.
Bug: 6413587
Change-Id: I5eba2bb57193bff78cb3740de5f87aca0b31d154
2012-05-11 12:32:56 -07:00
Jeff Brown
fd23e3ed97 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
2012-05-09 13:34:28 -07:00
Jeff Brown
0632b35b68 Merge "Improve handling of built-in keyboard." into jb-dev 2012-05-01 18:39:00 -07:00
Jeff Brown
daa3753a04 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
2012-05-01 16:34:20 -07:00
Chris Craik
92bc5d086a Revert "Add header for forward compatibility"
GPL build fix mistakenly merged into master

This reverts commit fd862e9828d544f593a622f2914d1257366ae802.
2012-05-01 11:20:20 -07:00
Jeff Brown
771526c88f Resample touch events on frame boundaries.
Bug: 6375101
Change-Id: I8774e366306bb2b6b4e42b913525bf25b0380ec3
2012-04-27 15:58:42 -07:00
Jeff Brown
5bbd4b4f5f Get alias for Bluetooth devices.
Bluetooth devices can be renamed by the user.  Make the
input system aware of the user-specified name and transparently
pass it down to applications.  This enables the keyboard
layout picker Settings UI to use device names that are
consistent with what the user set in the Bluetooth UI.

Bug: 6363157
Change-Id: I8eea26ce2c69c2a3f09c8de02e9e847610e0419c
2012-04-20 20:11:12 -07:00
Jeff Brown
9a2bbf680e Improve handling of certain keyboard layout properties.
Automatically choose a default value for the 'number' property
based on the characters that the key can generate.

Don't generate any character when ctrl, alt or meta is
pressed unless the behavior exactly matches the modifier keys
that are pressed.

Simplified the basic keyboard layouts taking into account the
new features.

Bug: 6110399
Change-Id: Ibc0f0b50c2dcf3f962a33ac77c24d2993b77637d
2012-04-18 15:01:57 -07:00
Jeff Brown
6957b60378 Merge "Add Dvorak keyboard layout." 2012-04-17 19:21:34 -07:00
Jeff Brown
4a3862f6b0 Add Dvorak keyboard layout.
Added support for mapping both scan codes and HID usages to
KeyLayoutMap and KeyCharacterMap.  Keyboard overlays can
now influence how key events are mapped to key codes.

Bug: 6110399
Change-Id: I6619fd2d3e1337c55928f89869dbc45b535c7ccf
2012-04-17 18:50:05 -07:00
Jeff Brown
420489ca1f Merge "Support loading keyboard layout overlays from resources." 2012-04-17 17:59:03 -07:00
Jeff Brown
6ec6f79e1a Support loading keyboard layout overlays from resources.
Added the concept of a keyboard layout overlay, which is
a key character map file that has "type OVERLAY".

Added support for loading keyboard layout overlays from
resources dynamically.  The layouts are reloaded whenever they
are changed in the Settings application or an application
is installed.  This is somewhat more aggressive than necessary
so we might want to optimize it later.

Before system-ready, the input system uses just the generic
keyboard layouts that are included on the device system image.
After system-ready, it considers the user's selected keyboard
layout overlay and attempts to load it as necessary.  We need to
wait until system-ready before doing this because we need to
be in a state where it is safe to start applications or access
their resources.

Bug: 6110399
Change-Id: Iae0886d3356649b0d2440aa00910a888cedd8323
2012-04-17 17:56:32 -07:00
Chris Craik
3844067c3c am a6d62b76: am 4f998a1e: am fd862e98: Add header for forward compatibility
* commit 'a6d62b76ad8f09bd677fa115fbb71fdae2510552':
  Add header for forward compatibility
2012-04-17 12:08:25 -07:00
Chris Craik
fd862e9828 Add header for forward compatibility
Change-Id: I6e3da852d50fc14cfb6fb50f7dd867f37daea19d
2012-04-17 10:56:17 -07:00
Jeff Brown
a47425a13c 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
2012-04-13 17:01:15 -07:00
Jeff Brown
af9e8d3818 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
2012-04-12 18:54:54 -07:00
Teng-Hui Zhu
3d7f0cb3d9 Update header for forward compatibility
Change-Id: Idf38142dc073dce14741e8da005e7d2eaf9242de
2012-04-12 10:59:57 -07:00
Jeff Brown
49ccac530b Refactor key code mapping.
Added handling for EV_MSC / MSC_SCAN which typically reports
the HID usage associated with a key.  This will enable key maps
to map keys with HID usages that Linux does not natively recognize.

Removed keyCode and flags fields from EventHub RawEvent since
they don't necessarily make sense in isolation now that we
pay attention to HID usage codes too.

Removed the fallback code for mapping keys and axes.  In practice,
an input device should be self-sufficient.  We should not ever
need to look at the built-in keyboard's key map.  In fact, there
usually isn't a built-in keyboard anyhow.  This code was originally
working around a problem where we weren't loading the key map
for touch screens with virtual keys, which has long since been fixed.

Change-Id: I0a319bdec44be9514f795526347397e94d53a127
2012-04-11 20:28:09 -07:00
Chet Haase
7b6a75872b Pass width/height parameters to webview
When webview draws into an fbo layer, it needs to know the
size of that surface to create the rendering transform appropriately.
This change copies in the current viewport size to the structure that
is passed to the webview.

Change-Id: I7160b0836d00834134c799c95a439cdc045e2035
2012-04-11 14:32:02 -07:00
Jeff Brown
9f25b7fdf2 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
2012-04-10 18:23:58 -07:00
Teng-Hui Zhu
544f89aece Update SurfaceTexture interface for forward compatibility
Change-Id: I32d224428c0127800714a976b4d7bb68cc7c2464
2012-04-10 07:35:54 -07:00
Jeff Brown
e38fdfae91 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
2012-04-06 14:57:19 -07:00
Chris Craik
c70e89e2a0 Fix hybrid build
Change-Id: Ieef556473e1878d1319f9844fb0bbb974637999e
2012-04-03 14:44:38 -07:00
Jeff Brown
56bad16f02 Merge "Add Japanese specific key codes." 2012-04-02 17:08:13 -07:00
Yang Chuang
7511f9cd2f Add Japanese specific key codes.
These keys are specific to Japanese hardware keyboard which can be
used by input method.

Patch ported from AOSP, with the addition of EISU and KANA mappings.

Change-Id: I647473cdd257458e3b9d134b0fc623eae946c3e0
2012-04-02 15:19:45 -07:00
Romain Guy
8f3b8e3299 Allow fine-grained control over functors execution
Adds non-drawing execution mode

Change-Id: I82f92cf1b9a3b9ff2ca6d7427c4e02b73e04e6bf
2012-04-02 15:15:07 -07:00
Colin Cross
4be0041630 Move services/powermanager from frameworks/base to frameworks/native
Move services/powermanager into frameworks/native so audioflinger can
use it.  Note that this is not the same as a PowerManagerService,
which is part of systemserver and handles turning the screen on and
off, etc.  This is just a binder interface to allow taking wakelocks.

Change-Id: I1142e6d9ddbb651cc19ac07d946fa24d8feed8a3
2012-03-28 13:57:51 -07:00
James Dong
d927a1d996 Deleted the media, camera, drm related files since they are relocated
Change-Id: I9bc5573ee07e30b305b5b879023aa9ec69e10b91
2012-03-28 10:42:44 -07:00
Romain Guy
56485fe628 Merge "Use a status_t return type for GL functors" 2012-03-26 16:51:22 -07:00
Romain Guy
6554943a1d Use a status_t return type for GL functors
WebView needs more fine-grained control over the behavior of the
framework upon execution of the display lists. The new status_t
allows WebView to requests its functor to be re-executed directly
without causing a redraw of the entire hierarchy.

Change-Id: I97a8141dc5c6eeb6805b6024cc1e76fce07d24cc
2012-03-26 16:45:05 -07:00
Glenn Kasten
8296628ed8 Merge "mv libcpustats from frameworks/base to /native" 2012-03-26 12:28:38 -07:00
Glenn Kasten
30b8a65c5c mv libcpustats from frameworks/base to /native
OK to lose history

Change-Id: I05ce0452f16a396cff6e18db5424492f3a6f6861
2012-03-26 12:22:57 -07:00
Andreas Huber
b3e2e24f78 Merge "Provisional support for secure decryption of media streams." 2012-03-26 11:43:06 -07:00
Andreas Huber
9b8e496f4d Provisional support for secure decryption of media streams.
Change-Id: Ib3982a9c960bfdb0cb7e1b174440b141b194cfbe
2012-03-26 11:24:04 -07:00
Eric Laurent
383c4b3e63 Merge "reorganize SoundPool and JetPlayer code." 2012-03-26 11:23:49 -07:00
Eric Laurent
f5e1812549 reorganize SoundPool and JetPlayer code.
Reorganize SoundPool and JetPlayer code to be ready for the
creation of libmedia_native.

Split SoundPool between libsoundpool (JNI) and libmedia(sound pool implementation).
Remove dependencies on nativehelper/jni.h from JetPlayer.

Change-Id: I130c6014173b714329929dd82c5dfb70b757a610
2012-03-26 10:54:41 -07:00
Glenn Kasten
4acee00352 Add TRACK_FAST for IAudioFlinger::createTrack
Currently not implemented by client or server

Change-Id: Ib11dda57db3eeb871bcc7b546e340078776875f5
2012-03-26 07:25:48 -07:00
Glenn Kasten
39581f9248 Merge "IAudioFlinger::createTrack and openRecord flags" 2012-03-26 07:16:37 -07:00