3009 Commits

Author SHA1 Message Date
Mike Lockwood
ad5f83e91b USB Manager string clean up:
- Use "Cancel" instead of "Ignore"
- Customize the text for the "always use" checkbox for devices and accessories
- Clean up strings for AccessoryChat test program

Bug: 4074719

Change-Id: Ideec838e4c1f1a82ef4ae411c9124417ffb63165
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-15 16:23:40 -04:00
Romain Guy
ee7ace065f Merge "Fix rendering artifact in edge fades. Bug #4092053" into honeycomb-mr1 2011-03-14 18:16:39 -07:00
Romain Guy
7b5b6abf85 Fix rendering artifact in edge fades.
Bug #4092053

The problem always existed but was made visible by partial invalidation.
When saving a layer, the renderer would try to postpone glClear()
operations until the next drawing command. This however does not work
since the clip might have changed. The fix is rather simple and
simply gets rid of this "optimization" (that turned out to be
usless anyway given how View issues saveLayer() calls.)

This change also fixes an issue with gradients (color stops where
not properly computed when using a null stops array) and optimizes
display lists rendering (quickly rejects larger portions of the
tree to avoid executing unnecessary code.)

Change-Id: I0f5b5f6e1220d41a09cc2fa84c212b0b4afd9c46
2011-03-14 18:05:08 -07:00
Jamie Gennis
122dd0999f Merge "SurfaceTexture: fix transform matrix computation." into honeycomb-mr1 2011-03-14 17:42:48 -07:00
Mike Lockwood
015b1ecaec Add support for USB accessory serial numbers
Change-Id: I47b79f091b300ced60bfc61eff2f771139663aae
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-14 20:10:47 -04:00
Jamie Gennis
f3cedb6021 SurfaceTexture: fix transform matrix computation.
This change fixes the transform matrix computation in SurfaceTexture
when a crop rectangle is specified by the image producer.  It also adds
a test for this case as well as a basic test for the uncropped case.

Bug: 4070775
Change-Id: I1481c9ce9d08fe7f2bff86d3afdeab7d4002b157
2011-03-14 11:30:16 -07:00
Mike Lockwood
62cfeeb821 USB: minor cleanup work
Bug: 4067029

Change-Id: Icd8f912ab8732b5f770a217b9b3731092597ce02
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-11 18:51:29 -05:00
Jamie Gennis
b2e606f5f1 Merge "SurfaceFlinger: Respect the PROTECTED gralloc bit." into honeycomb-mr1 2011-03-10 18:06:32 -08:00
Jamie Gennis
f72606ce3e SurfaceFlinger: Respect the PROTECTED gralloc bit.
This change makes SurfaceFlinger treat layers for which the active
buffer has the GRALLOC_USAGE_PROTECTED bit set as if they have the
'secure' flag set.

Change-Id: Ic60b6513a63e4bb92ec6ce9fd12fd39b4ba5f674
Bug: 4081304
2011-03-10 16:25:48 -08:00
Mike Lockwood
cc08c439bc Merge "UsbAccessory: Add URI string, replace type string with description" into honeycomb-mr1 2011-03-10 07:50:30 -08:00
Mike Lockwood
ac36d7c715 UsbAccessory: Add URI string, replace type string with description
This is a first step toward adding USB accessory URI support

BUG: 4073248

Modified USB accessory matching logic to look only at manufacturer, model and version
(description and URI are not considered when matching apps to accessories)

Also added test for USB accessory protocol version to accessorytest

BUG: 4080288

Change-Id: I992a3433c74efa7a7db37bf030f02c1f0c92f9e2
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-09 22:12:49 -05:00
Jeff Brown
efd3266b71 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
2011-03-09 18:30:28 -08:00
Mike Lockwood
564f12ebe4 Merge changes Ifd78cca3,Ieadb86fe,If5b44ebd into honeycomb-mr1
* changes:
  MTP: Convert date created and modified values from seconds to milliseconds
  Update USB accessory compatibility library to support new requestPermission API
  UsbService: Don't require permissions for UsbManager.getCurrentAccessory()
2011-03-09 15:47:10 -08:00
Jamie Gennis
6167a390e3 Merge "ANativeWindow: add queues-to-window-composer check." into honeycomb-mr1 2011-03-09 14:47:56 -08:00
Mike Lockwood
580b641117 Update USB accessory compatibility library to support new requestPermission API
BUG: 4069037

Change-Id: Ieadb86fed577eeb7697d524e8a684ea6ea632f39
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-09 16:46:35 -05:00
Stephen Hines
cac8228e9c Fix a race condition during Context init/teardown.
This change makes Context initialization wait properly for all threads to be
available before leaving initContext(). This prevents a case where ~Context()
gets called before all created threads have started/finished their work. This
was triggered/discovered by running some very short-lived tests in CTS.

BUG=4064203

Change-Id: I1dd6f43fa7942c53881008e857df864e2395202e
2011-03-08 16:54:23 -08:00
Jamie Gennis
d2acedf18c ANativeWindow: add queues-to-window-composer check.
This change adds a new 'method' to the ANativeWindow interface to check
whether buffers queued to the window will be sent directly to the system
window compositor.

Change-Id: I4d4b199e328c110b68b250029aea650f03c8724d
Bug: 3495535
2011-03-08 16:49:51 -08:00
Romain Guy
bc8a8e8c92 Merge "Add support for partial invalidates in WebView Bug #3461349" into honeycomb-mr1 2011-03-07 22:40:27 -08:00
Romain Guy
cabfcc1364 Add support for partial invalidates in WebView
Bug #3461349

This change also fixes two bugs that prevented partial invalidates
from working with other views. Both bugs were in our EGL implementation:
they were preventing the caller from comparing the current context/surface
with another context/surface. This was causing HardwareRenderer to always
redraw the entire screen.

Change-Id: I33e096b304d4a0b7e6c8f92930f71d2ece9bebf5
2011-03-07 18:09:03 -08:00
Jeff Brown
8529745b27 Joystick tweaks. (DO NOT MERGE)
Ensure that the joystick can always reach -1.0, 0.0 and 1.0 positions
even when noise filtering is applied.  (Bug: 3514510)

Add support for a few more standard axes.

Add additional mapping modes for axes.
Some axes are inverted from standard interpretation
or are actually intended to be split into two distict axes
such as left/right trigger controls or accelerator/brake.

Add key layout file for a G25 racing wheel and XBox 360 controller
to tweak behavior.  They work fine without them but the axis mappings
are not ideal.

Change-Id: I0fddd90309af4dc14d35f34fe99ed6e521c0b7c7
2011-03-04 19:12:41 -08:00
Stephen Hines
1bf1f8df17 DO NOT MERGE: Almost all warnings are now errors in RS build.
Change-Id: Ie4952cdf5c75bf1b7a7899a32b3b1f8747686356
2011-03-03 16:12:43 -08:00
Jeff Brown
55acdf7dcd Merge "Wake screen from external HID peripherals." 2011-03-02 19:59:07 -08:00
Jeff Brown
56194ebec6 Wake screen from external HID peripherals.
Added some plumbing to enable the policy to intercept motion
events when the screen is off to handle wakeup if needed.

Added a basic concept of an external device to limit the scope
of the wakeup policy to external devices only.  The wakeup policy
for internal devices should be based on explicit rules such as
policy flags in key layout files.

Moved isTouchEvent to native.

Ensure the dispatcher sends the right event type to userActivity
for non-touch pointer events like HOVER_MOVE and SCROLL.

Bug: 3193114
Change-Id: I15dbd48a16810dfaf226ff7ad117d46908ca4f86
2011-03-02 19:57:07 -08:00
Jeff Brown
192f0b0608 Merge "Fade out the mouse pointer after inactivity or other events." 2011-03-02 15:54:42 -08:00
Romain Guy
058f47e845 Merge "We need to go deeper. Bug #3431907" 2011-03-02 15:48:33 -08:00
Romain Guy
84962f2fe6 We need to go deeper.
Bug #3431907

When drawing layers inside a layer, the wrong target FBO would be used.
This would happen for instance with app widgets using a ViewFlipper
in Launcher. The ViewFlipper uses a fade animation that triggers a
call to saveLayerAlpha(), which in turns creates an FBO. If this happened
during a scroll, the ViewFlipper's FBO would be composited back directly
inside FBO 0, i.e. the screen. This properly initializes the snapshots
of hardware layers to use the layer's FBO as the default compositing
target instead of using 0.

This problem did not happen when drawing hardware layers inside
hardware layers because LayerRenderer already takes care of figuring
out the FBO it needs to composite into. The bug would occur only
with layers generated with saveLayer() and its saveLayerAlpha()
variation.

Layers inside hardware layers insider layers inside hardware layers
now work properly.

Change-Id: Ibe852301087f3d414ad8a18436eebc81f8ac66f5
2011-03-02 15:43:44 -08:00
Jeff Brown
05dc66ada6 Fade out the mouse pointer after inactivity or other events.
Fades out the mouse pointer:
- after 15 seconds of inactivity normally
- after 3 seconds of inactivity in lights out mode
- after a non-modifier key down
- after a touch down

Extended the native Looper to support enqueuing time delayed
messages.  This is used by the PointerController to control
pointer fade timing.

Change-Id: I87792fea7dbe2d9376c78cf354fe3189a484d9da
2011-03-02 15:37:57 -08:00
Romain Guy
40a787f89a Properly initialize FBO textures for linear filtering.
Change-Id: I67fc4fd760483ef85809be8d6e608cf4f469650f
2011-03-02 15:15:42 -08:00
Romain Guy
a91320e364 Merge "Properly initialize FBO textures for linear filtering." 2011-03-02 15:14:52 -08:00
Mike Lockwood
403af5c688 Merge "Combine the USB accessory support library with the platform feature" 2011-03-02 14:19:38 -08:00
Romain Guy
4677c5118c Merge "Fix problem with glyph cache and textScaleX property" 2011-03-02 14:04:47 -08:00
Chet Haase
8668f8a633 Fix problem with glyph cache and textScaleX property
Glyphs drawn with paints that had different textScaleX values were not
being recognized as different, so the glyph cache was being used regardless
of different scaleX values. This change adds the scaleX attribute to the native
Font object to allow the cache to distinguish between this difference and cache
accordingly.

Change-Id: I5d8fc26d47460b27dc8e373a473d46b2f1b8dc30
2011-03-02 14:02:19 -08:00
Mike Lockwood
b547fc297f Combine the USB accessory support library with the platform feature
Also renamed the support library to com.android.future.usb.accessory.jar

Change-Id: Id6226991ce73f75dfedc497adf1c25bffb670243
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-02 13:59:56 -08:00
Romain Guy
e6c524022d Merge "Correctly mark layers dirty when drawing WebView." 2011-03-01 14:53:48 -08:00
Romain Guy
d643bb56fd Correctly mark layers dirty when drawing WebView.
Change-Id: I7ae0c3cfa0916d8fbeaf01e8da127c621a06a0f4
2011-03-01 14:55:21 -08:00
Jamie Gennis
5a6f9faf5d Merge "Add the MIN_UNDEQUEUED_BUFFERS query to ANW." 2011-03-01 14:38:20 -08:00
Romain Guy
6910f429cd Merge "Avoid UTF-8 conversions and string copies whenever possible." 2011-03-01 14:28:13 -08:00
Romain Guy
321dce646d Avoid UTF-8 conversions and string copies whenever possible.
Change-Id: Ie4584417bbb7247e6c567fbfdb819529e548bb8f
2011-03-01 11:45:33 -08:00
Mike Lockwood
c4308f01c9 Move USB framework support from android.hardware to android.hardware.usb package
Change-Id: I00fd4f0caaa4aebe48f71c576bb211b5f38bf88d
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-03-01 08:07:20 -08:00
Mike Lockwood
eb3885d692 Merge "USB accessory support library" 2011-02-28 17:45:08 -08:00
Mike Lockwood
2755531562 USB accessory support library
This provides a mechanism for developing applications to work with
USB accessories in versions of android prior to the introduction
of the android.hardware.UsbManager APIs.

Applications should link against the com.google.android.usb library
to use this support.

Change-Id: I48ff80467fd9a6667aa84a758eca754132f546b9
Signed-off-by: Mike Lockwood <lockwood@android.com>
2011-02-28 17:25:57 -08:00
Mathias Agopian
7c4beadf57 Merge "surfaceflinger_client: Don't dereference NULL ptrs." 2011-02-28 12:50:25 -08:00
Mathias Agopian
8c8cfec0ea Merge "Fix sp<> conversion operator / constructor" 2011-02-28 12:50:04 -08:00
Jamie Gennis
96dcc97843 Add the MIN_UNDEQUEUED_BUFFERS query to ANW.
This change adds a new query to ANativeWindow for getting the minimum
number of buffers that must be left un-dequeued during the steady-state
operation of the ANativeWindow.

Change-Id: Ie8c461fc26b02ecde02ddb4f95bf763662cf1551
Related-Bug: 3356050
2011-02-28 12:24:40 -08:00
Alex Sakhartchouk
802e37e7b8 Merge "These moved into developmnet samples" 2011-02-28 10:59:29 -08:00
Jamie Gennis
a1c7e0e706 surfaceflinger_client: Don't dereference NULL ptrs.
This change adds a null pointer check before dereferencing buffers in
a Surface list of known GraphicBuffer objects.  If not all the buffers
have been dequeued before this list can legitimately contain NULL
entries.

Change-Id: I0e105b53a3f6f9a5404716b7bf150c793ff648a6
2011-02-27 18:43:17 -08:00
Mathias Agopian
32a55cf66e Fix sp<> conversion operator / constructor
some of the conversion operators were not using the proper
pointer type when calling incStrong/decStrong, usually it
has no bad consequences, but for some implementation
of the ref-counted object it could lead to recording the wrong
owner id.

Change-Id: If574b9069b8a4cf6e0911a992c8f095aba799995
2011-02-25 16:20:52 -08:00
Alex Sakhartchouk
45b1adf947 Merge "Moving dependency includes out of librs headers." 2011-02-25 14:53:34 -08:00
David Li
4368c449d7 Merge "Fix mTexCoordsSlot > 0 check to mTexCoordsSlot >= 0" 2011-02-25 12:59:14 -08:00
David Li
cf28957c89 Fix mTexCoordsSlot > 0 check to mTexCoordsSlot >= 0
0 Is a valid attribute location.

Change-Id: Ib24335f48efd6cc59e2ab877569d7d0c95f8490a
Signed-off-by: David Li <davidxli@google.com>
2011-02-25 12:05:44 -08:00