4345 Commits

Author SHA1 Message Date
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
Chet Haase
6f9ad204cc Fix launcher invisibility bug
There was a bug in the DisplayList code for layers where we would
set the alpha value for a layer only if the alpha were non-1. This works
most of the time (since the value is usually 1 and doesn't need to
be set at all, and if the value is non-1, it is set correctly). But when
the value has been set to a non-1 value, setting alpha back to 1 cannot happen
due to this logic. This caused launcher to have some invisible pages when
returning to Home because those pages previously had an alpha value of 0, and
setting the alpha to 1 had no effect due to this DisplayList code.

The fix is to simply remove the check for non-1 values; we should
always set the alpha value of layers to handle all cases.

Issue #6413892 alpha value is messed up after AlphaAnimation

Change-Id: Ia51acb2eaaf0609ea7189998ed449bdd9ea7e05f
2012-05-01 10:05:13 -07:00
Jeff Brown
ffd6ea4523 Merge "Resample touch events on frame boundaries." into jb-dev 2012-04-27 17:31:50 -07:00
Jeff Brown
771526c88f Resample touch events on frame boundaries.
Bug: 6375101
Change-Id: I8774e366306bb2b6b4e42b913525bf25b0380ec3
2012-04-27 15:58:42 -07:00
Romain Guy
665a376d24 Merge "Work-around for a Skia rasterization bug Bug #6411457" into jb-dev 2012-04-27 15:20:04 -07:00
Romain Guy
fdd6fc1beb Work-around for a Skia rasterization bug
Bug #6411457

Skia does not generates the bottom right pixel of a rect when
drawing a rect as an SkPath into an alpha8 bitmap.

Change-Id: Ifb5286ae67745c9e44ee387b6d6ad607a9a2e6ce
2012-04-27 11:47:13 -07:00
Romain Guy
8bd12ea800 Merge "Decode common GL error codes when logging frame error status" into jb-dev 2012-04-26 14:06:41 -07:00
Romain Guy
a44a63ac5c Decode common GL error codes when logging frame error status
Change-Id: I38b333eea53aef20340ce48dfcb0dd30a223f7a8
2012-04-26 14:05:02 -07:00
John Reck
a75fbc3c76 Merge "On new content, attach functor directly" into jb-dev 2012-04-26 12:27:56 -07:00
Romain Guy
c189ef5322 Ensure we start every frame in the proper GL state
Bug #6345013, #6314960

Change-Id: I6985f7f233eb6a5f9223e9f4be3f323154b5dbf0
2012-04-25 20:02:53 -07:00
Chris Craik
c2c9543c13 On new content, attach functor directly
bug:6323847

depends on external/webkit change: https://android-git.corp.google.com/g/#/c/184314/

Change-Id: Ibdf997f3ee4f5c5c1ea5a320556813f175fea93f
2012-04-25 15:42:59 -07:00
Romain Guy
3d745c03ac Fix the build before the bot yells at me.
Change-Id: Ice7fe02b684ad662262aae3cac7a48a835ebcad5
2012-04-23 20:36:17 -07:00
Romain Guy
ba6be8a62d Prevent WebView from crashing when detached from the window
Bug #6365056

WebView enqueues a functor in the hardware renderer to handle
animations and this functor is called at a later time by the
hardware renderer. However, the functor was not removed from
the queue when WebView was removed from the window. This could
cause the hardware renderer to attempt to execute an invalid
functor and lead to a crash.

Change-Id: I9d38e80f3fdc5e29d4d0cdfa1e893c251a954508
2012-04-23 20:29:31 -07:00
Jeff Brown
8bca94ad83 More work on international keyboards.
Changed the English US keymaps to implement a strict US key map
with no additional ALT functions.

Fixed a bug copying the alias in the InputDevice copy constructor.

Added support for end of line comments in KCM and KL files.

Added the German keyboard layout.

Sorted the keys in the keyboard layout files by physical arrangement
to make it easier to maintain them.

Bug: 6110399
Change-Id: If44d83de5b98f2bf0016cbb8e12264387b286aaa
2012-04-23 16:12:32 -07:00
Chet Haase
1271e2cc80 Remove USE_DISPLAY_LIST_PROPERTIES flag
This flag was still hanging around pending any need to disable
DisplayList properties. But things seem stable, so it's time to clean up
and simplify the code.

At the same time, I reduced redundance in DisplayList dimensions. We
used to call drawDisplayList() with width/height parameters that were
used to do a clip reject. This is redundant with the DisplayList properties
that set the bounds of the DisplayList; the left/right and top/bottom properties
represent the same width/height properties formerly used in drawDisplayList().
The new approach is to not pass dimensions to drawDisplayList(), but to
instead pull those dimensions directly from the DisplayList when needed.

Change-Id: I8871beff03b1d4be95f7c6e079c31a71d31e0c56
2012-04-23 11:13:17 -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
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
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
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
882735972e Merge "Notify applications when input devices change." 2012-04-12 18:55:57 -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
Chet Haase
a23eed808a Fix layer blending bug
Cached layers were sometimes retaining an obsolete blending
value, causing artifacts where translucent objects were disappearing
completely. Also, added extra tracing info for DisplayLists.

Issue #6303668 Flickering views during SwipeHelper drag

Change-Id: I66ce158652c4a3ed316040585b40b1744e1fad0c
2012-04-12 15:20:16 -07:00
Jeff Brown
cc11698319 HID usage should take precedence over scan code.
Change-Id: Ibd8988e3dcc0d64f4019ffe491d9789733f9d243
2012-04-12 10:05:41 -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
Ying Wang
5bcbfcec4b You don't need LOCAL_STATIC_LIBRARIES when building static library.
and there is no target static library with name libutils.

Change-Id: Ifec34e1b484d749d3fcd11abe610f192a3213767
2012-04-06 16:33:11 -07:00
Jeff Brown
69bba1dfb7 Merge "Add a unique input device descriptor." 2012-04-06 15:04:53 -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
65924a3e56 fix functor flag parsing, tweak process delay
Change-Id: I0a679cc33f92ff6fd2e33db9ad58b52622def012
2012-04-05 17:52:11 -07:00
Romain Guy
fda531c9e4 Merge "Disable AA lines vertex attrib arrays after rendering" 2012-04-04 11:53:28 -07:00
Romain Guy
7b63142d2f Disable AA lines vertex attrib arrays after rendering
Change-Id: I2f035e9d87f4f97bc1e37355c84570fd58df0374
2012-04-04 11:38:54 -07:00
Romain Guy
8c8c240092 Merge "Optimize FBOs composition" 2012-04-03 19:33:06 -07:00
Romain Guy
e0aa84b7dc Optimize FBOs composition
Change-Id: Ifc8eada8922509373c0e4c3b2ed75b6f08d098de
2012-04-03 19:30:26 -07:00
Chet Haase
db8c9a6a4d Optimization of alpha with DisplayList properties
Some views (such as ImageView and TextView) handle non-opaque alpha
values directly. This was originally an optimization, but we can handle it faster
in many cases without this optimization when DisplayList properties are enabled.
Basically, if a view has non-overlapping rendering, we set the alpha value directly
on the renderer (the equivalent of setting it on the Paint object) and draw each
primitive with that alpha value. Doing it this way avoids re-creating DisplayLists
while getting the same speedup that onSetAlpha() used to get pre-DisplayList properties.

Change-Id: I0f7827f075d3b35093a882d4adbb300a1063c288
2012-04-03 14:02:17 -07:00
Romain Guy
e2eaf6997d Merge "Prevent crash when flushing the layers cache Bug #6258973" 2012-04-02 17:49:20 -07:00
Romain Guy
5c88fc744d Prevent crash when flushing the layers cache
Bug #6258973

When flushing the layer caches we would attempt to delete the FBOs
associate with layers in the cache. The FBO property was however not
always properly cleared when recycling layers.

Change-Id: I7dedfe391d659a0849f1e1d84df17313b2c6e2b2
2012-04-02 17:45:25 -07:00
Chris Craik
b6a80077dc Merge "Allow fine-grained control over functors execution" 2012-04-02 17:07:21 -07:00
Chet Haase
8d56b0e1d2 Enabling DisplayList properties
An earlier commit fixed problems with enabling DisplayList properties.
This CL actually enables the properties.

Change-Id: I5c41d0c64e9241822af53eb367de0fed7d9608e0
2012-04-02 16:34:48 -07:00
Chet Haase
9420abd56a Re-enable DisplayList properties.
Re-enabling DisplayList properties last week caused some app
errors due to the way that some transforms were being handled (specifically,
those coming from the old Animations and ViewGroup's childStaticTransformation
field). This change pushes *all* transform/alpha data from View.draw() into
the view's DisplayList, making DisplayLists more encapsulated (and correct).

Change-Id: Ia702c6aae050784bb3ed505aa87553113f8a1938
2012-04-02 15:31:24 -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
Chet Haase
f1260aac0e Merge "Disable DisplayList properties pending fixes for AlphaAnimation" 2012-03-29 09:45:38 -07:00
Chet Haase
76240dafe8 Disable DisplayList properties pending fixes for AlphaAnimation
The new DisplayList properties design has ordering conflicts with the
way that alpha works with old animations (AlphaAnimation). This CL
disables DiksplayList properties while I'm working on a fix and some
more thorough tests for old animations-vs-DL properties in general.

Change-Id: I8f6893138f939171491c2ec3c889214ee55d17b7
2012-03-29 09:42:34 -07:00
Alex Sakhartchouk
972ed5809c Merge "Moving libRS" 2012-03-28 15:08:56 -07:00
Alex Sakhartchouk
b43a1e5ddf Moving libRS
Change-Id: I1e42204e862585b9c2f7818b615890c60f08faf6
2012-03-28 14:18:15 -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
Alex Sakhartchouk
c72cb1c2e0 Merge "State based shader recompile to support camera input." 2012-03-27 08:49:52 -07:00
Chet Haase
b85967b9af Re-enabling DisplayList properties
Several issues came up after DisplayList properties were enabled,
so they were disabled pending fixes. Those issues have been fixed, so
DisplayList properties are once again being enabled by default. This
CL both re-enables these properties (in View.java and DisplayListRenderer.h)
and fixes the various issues that enabling them caused the first time around.

Related issues (all currently marked as Fixed, though that was simply because
DL properties were disabled - this CL provides the real fixes now that
DL properties are enabled by default):
Issue #6198276 Text input broken
Issue #6198472 Native crash at pc 00076428 in many different apps in JRM80
Issue #6204173 Date/time picker isn't rendering all parts of UI
Issue #6203941 All Apps overscroll effect is rendered weirdly/has flickering
Issue #6200058 CAB rendering issue - not drawing items?
Issue #6198578 Front camera shows black screen after taking picture.
Issue #6232010 Layers not recreated when children change (DisplayList properties)

Change-Id: I8b5f9ec342208ecb20d3e6a60d26cf7c6112ec8b
2012-03-27 08:17:54 -07:00