2525 Commits

Author SHA1 Message Date
Mathias Agopian
52a9a10b6b Clearly separate consumer and producer interfaces
Bug: 9265647
Change-Id: Ic68e91788d0a05251e1d2fb9f9d4de403c7099bf
2013-08-06 13:07:42 -07:00
Elliott Hughes
83ad4e393a Remove an unused C zip API.
Change-Id: I10ae849bdedf3e3bb97547c4f9e5a20742e9d6b1
2013-08-05 14:12:50 -07:00
Dianne Hackborn
d45c68dd24 Resource memory optimization.
Don't ever need the cached UTF-16 string conversions on the
device.  Don't need to create those strings, and don't need
to create the lookup array for them at all.  This requires
fixing all of the remaining places in the platform where we
interacted with the resources with the blind assumption that
the strings are UTF-16.

Change-Id: Ia0e5a150499837471e494e85b23b05fa06e0cf1d
2013-07-31 15:57:49 -07:00
Jeff Brown
9d3b1a424c Move input library code to frameworks/native.
No longer compile libandroidfw as a static library on the device
since it already exists as a shared library.  Keeping the static
library would force us to provide a static library version of
libinput for the device as well which doesn't make sense.

Change-Id: I3517881b87b47dcc209d80dbd0ac6b5cf29a766f
2013-07-01 20:11:42 -07:00
Mathias Agopian
1f5762e646 libutils clean-up
Change-Id: I11ee943da23a66828455a9770fc3c5ceb4bbcaa9
2013-05-07 17:09:46 -07:00
Bjorn Bringert
fb903a45d7 Allow compiling aapt for the device
Changes:

- The static device version of libandroidfw now includes
  the extra functions needed by aapt. I could only find
  a few host tools that use the static library, so this is
  hopefully not a problem.

- The pseudolocalization code is moved into aapt.
  It was previously in libhost, but only used by aapt.

Change-Id: Ib393ebb7dcebee8abbb628cbe5255ea1679674ac
2013-04-26 15:07:09 +01:00
Michael Wright
a44dd26a75 Rewrite input handling for native applications
Bug: 8473020
Change-Id: Ic4353d8924ab877bec21aff8c2dba9fe725bf906
2013-04-22 17:01:51 -07:00
Michael Wright
bdb706e48d Merge "Pipe through device resolution information" into jb-mr2-dev 2013-04-05 21:43:31 +00:00
Jeff Brown
1951ce86c2 Correctly manage the lifecycle of IME InputChannels.
InputChannels are normally duplicated when sent to a remote process
over Binder but this does not happen if the recipient is running within
the system server process.  This causes problems for KeyGuard because the
InputMethodManagerService may accidentally dispose the channel
that KeyGuard is using.

Fixed the lifecycle of InputChannels that are managed by the IME
framework.  We now return a duplicate of the channel to the application
and then take care to dispose of the duplicate when necessary.
In particular, InputBindResult disposes its InputChannel automatically
when returned through Binder (using PARCELABLE_WRITE_RETURN_VALUE).

Bug: 8493879
Change-Id: I08ec3d13268c76f3b56706b4523508bcefa3be79
2013-04-04 22:45:12 -07:00
Michael Wright
c6091c64c9 Pipe through device resolution information
Bug: 8424494
Change-Id: Iafeeee0d5cd29342c1cdc86b9616222aaa5d1b94
2013-04-04 18:10:37 -07:00
Mathias Agopian
29479ebe10 clean-up following Surface split
Change-Id: I853a76d92d957ee38a36fcdd280d6407ec316987
2013-02-15 12:47:40 -08:00
Dianne Hackborn
56a2301c7a Implement issue #6646859: 4K!!!! 4K!!!! 4K!!!!
Change-Id: Ib05a2eb6a03db50074805a437a3639a7d10684a0
2013-02-12 15:41:49 -08:00
Michael Wright
1df477acf6 Add initial plumbing for brightness keys
Change-Id: I595e8a25e6c245e4b22f06df9a8acdbb75e4b041
2013-02-01 16:29:59 -08:00
Andy McFadden
d47f7d8b5f Rename ISurfaceTexture and SurfaceTexture
The C++ class names don't match what the classes do, so rename
ISurfaceTexture to IGraphicBufferProducer, and SurfaceTexture to
GLConsumer.

Bug 7736700

Change-Id: I08e677faf2ebb418ef131d0a8008e01037db0e50
2012-12-18 11:22:21 -08:00
Kenny Root
7b172a49a9 am 58ed5d74: am 768d9e1a: Merge "Correct executable bit for source files"
* commit '58ed5d748c0b9b64845975ef5844ad313de7c3f6':
  Correct executable bit for source files
2012-11-07 13:08:25 -08:00
Kenny Root
58ed5d748c am 768d9e1a: Merge "Correct executable bit for source files"
* commit '768d9e1a72ceee7d4a5f608776b87b62d6ce4a04':
  Correct executable bit for source files
2012-11-07 11:52:12 -08:00
Kenny Root
3a084af2e9 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
2012-11-07 10:27:31 -08:00
Mike Lockwood
c59b2f9a77 More changes to fix PDK build:
move screencap back to frameworks/base
move libdiskusage to frameworks/native

Change-Id: I8abe425c4bbf305bbe8650094c40c16df8c6d5e4
2012-10-24 12:31:10 -07:00
Jeff Sharkey
4fbbda4cec Handle multi-user mountObb() requests.
Since emulated external storage paths differ based on execution
context, carefully fix up paths for various use-cases:

1. When sending paths to DefaultContainerService, always scope
   OBB paths as belonging to USER_OWNER.
2. When sending paths to vold, always build emulated storage paths
   visible to root.
3. Always use the original untouched path when talking with apps.

Mount OBB containers using shared app GID, so that an app can read
the mount point across users.

Handle legacy paths like "/sdcard" by resolving the canonical path
before sending to MountService.  Move tests to servicestests, and
add tests for new path generation logic.

Bug: 7212801
Change-Id: I078c52879cd08d9c8a52cc8c83ac7ced1e8035e7
2012-09-25 17:34:48 -07:00
Jeff Brown
83d616a9c7 Make input system aware of multiple displays.
The input system needs to know about the window that has
focus, even if it is on a secondary display.  So now we
send it the list of all windows and indicate which display
they are on.  We filter the list of windows as necessary
when delivering touch events.

To keep things simple, monitor input channels and input
filters are not supported except on the main display.
We also do not pass the display id to applications; it is
only used inside the input system for now.

Properly scale touch coordinates based on the viewport.
This will be needed to ensure that touch works on external
display as well as when the internal display is being used
to simulate a different resolution.

Change-Id: I1815579a52fcc852c519b5391fc7ab8767c2dc59
2012-09-10 15:48:47 -07:00
Jeff Brown
cbad976b2a Add support for Wifi display.
Change-Id: I99693786cf9d07d07d3400046c55eb4933730b80
2012-09-07 13:26:31 -07:00
Fabrice Di Meglio
035ce2ca92 Merge "Add support for "-rtl" in resources" into jb-mr1-dev 2012-09-04 15:01:03 -07:00
Jeff Brown
64a55af0ac Add plumbing for new surface flinger display API.
Cleaned up the implementation of Surface and SurfaceSession
to use more consistent naming and structure.

Added JNI for all of the new surface flinger display API calls.

Enforced the requirement that all Surfaces created by
the window manager be named.

Updated the display manager service to use the new methods.

Change-Id: I2a658f1bfd0437e1c6f9d22df8d4ffcce7284ca2
2012-08-27 14:34:54 -07:00
Fabrice Di Meglio
5f79799939 Add support for "-rtl" in resources
- fix bug #7035019 Need to have "-rtl" support for Resource

Change-Id: Ic82145c2ac672729d8a6c695a5f343276a1a0a2c
2012-08-23 14:55:33 -07:00
Jeff Brown
b696de5c10 Move and rename user activity event type constants.
Change-Id: Ie565808796773b6896e71ddfac6aaaf8031de846
2012-07-27 18:14:56 -07:00
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