2498 Commits

Author SHA1 Message Date
Brian Carlstrom
bf7afa239e am 94f55b30: Merge "Tracking libnativehelper dependencies"
* commit '94f55b30e3e04dbea63836197e76c7464d8d6d37':
  Tracking libnativehelper dependencies
2013-05-10 22:47:57 -07:00
Brian Carlstrom
fde1f91d9b Tracking libnativehelper dependencies
Change-Id: I05ec62c43fbe5f8ba23256abac7271ca0b1a7242
2013-05-10 21:16:12 -07:00
Derek Sollenberger
bee78812d0 Merge "Fix bug where we incorrectly clipped the bounds to the device size." into jb-mr2-dev 2013-05-09 18:23:57 +00:00
Raph Levien
dde8e539c3 Merge "Fix bug 8717690 Full-width Latin Letters Garbled on Tumblr App" into jb-mr2-dev 2013-05-09 18:04:39 +00:00
Derek Sollenberger
708144e828 Fix bug where we incorrectly clipped the bounds to the device size.
This CL also updates the documenation to make it clear that the API
returns in local space, not clipped to the size of the bitmap/device.

bug: 8747526
Change-Id: I389844672ce955341863f9940c3b401ab00dc1dc
2013-05-09 14:00:29 -04:00
Raph Levien
dd0a91294b Fix bug 8717690 Full-width Latin Letters Garbled on Tumblr App
For fullwidth latin (or, more generally, a font considered as a complex
script, but not supported by the font specified), and for a font other
than a system default font, we were getting a mismatch in baseGlyphCount
between the shaping and painting fonts.

This patch preserves the original typeface in this case. In that sense,
it is a slightly more general fix for bug 8127795.

Change-Id: Ibdbfdb34eb7dc39cc8f0784a67c93c9af4ce6ab2
2013-05-06 15:00:41 -07:00
Jesse Hall
237c2b871f Register EGLExt JNI methods
Bug: 8678160
Change-Id: I8ecd2e6da2aee250b3433be18fff6af927b02994
2013-05-06 11:36:59 -07:00
Dave Burke
236cc476e6 Temporarily revert field name change (DO NOT MERGE)
VisualOn is using hidden fields, causing HBO and Xfinity to crash.
Bug: 8549617
Bug: 8331866

Change-Id: I35a9fe66dea8d56f4fcff9b492679226a17f4acc
2013-05-06 00:21:30 -07:00
Jesse Hall
02b7128f87 Merge "Add android.opengl.EGLExt class for EGL extensions" into jb-mr2-dev 2013-05-04 17:50:48 +00:00
Jeff Brown
17cf4e4d4a Merge "Really make Surface thread-safe." into jb-mr2-dev 2013-05-03 02:11:03 +00:00
Jeff Brown
fc0ebd7d37 Really make Surface thread-safe.
There were many places where the native object was being
accessed improperly.  Also some places where CloseGuard might
not be acquired or released correctly or where the generation
count might not be updated.

Fixed them all.

That said, Surface isn't intended to be used concurrently
so please don't do it.  This is only intended to make
hard to find crashes less likely.

Bug: 8328715
Change-Id: I981ef33425823e0fd7ad6b64443f2ec9b0c8335e
2013-05-01 15:28:01 -07:00
Jesse Hall
0c79d808cb Add android.opengl.EGLExt class for EGL extensions
Add the ES-relevant constants from the EGL_KHR_create_context
extension. These allow apps to check which EGLConfigs (if any) support
ES3 contexts. Otherwise, the app has to create a context with an
EGLConfig and then check whether it is an ES2 or ES3 context.

Also move eglSetPresentationTimeANDROID from EGL14 to EGLExt, since it's an
extension function. It's new in API 18.

Bug: 8678160
Change-Id: I3cba6e59ebb0a3a4c4012aa54a36b940c288bcec
2013-05-01 13:46:58 -07:00
Jesse Hall
d877efe3b1 Fix GLES30 JNI registration
Bug: 8657863
Change-Id: I498f32480863b0716b2a8dfce467143087573cce
2013-04-29 16:02:16 -07:00
zzy
71bfafc84a Added flush() for bluetooth output stream
Bug 8498784

Zebra QL420 Plus Bluetooth printer fails on Android 4.2.2
2013-04-24 00:24:34 -07:00
Raph Levien
22a3344cda Merge "Fix for bug 8695466 GPOS combining mark positioning broken before space" into jb-mr2-dev 2013-04-23 21:19:20 +00:00
Raph Levien
9d47db23ff Fix for bug 8695466 GPOS combining mark positioning broken before space
This patch makes segmentation into script runs behave the same in RTL
as in LTR modes - so that inherited script characters are always
associated with the preceding run. Otherwise, for a sequence such as
u+0631 u+064d u+0020, it would get split after the first character,
which would lose the ability to correctly position the u+064d mark.

Change-Id: I3c12ba1b77d18334f55e707f518be1046e6b339b
2013-04-23 12:51:27 -07:00
Michael Wright
5fe6e4c4c9 Merge "Rewrite input handling for native applications" into jb-mr2-dev 2013-04-23 00:04:44 +00:00
Michael Wright
a44dd26a75 Rewrite input handling for native applications
Bug: 8473020
Change-Id: Ic4353d8924ab877bec21aff8c2dba9fe725bf906
2013-04-22 17:01:51 -07:00
Chet Haase
dd671599be Fix quickReject logic to account for setClipChildren() setting
The rendering code optimizes by rejecting drawing operations that
lie outside of the bounds of their views. This works in most
situations, but breaks down when containers have called
setClipChildren(false), because we reject drawing that is outside
of that container, but which should be drawn anyway.

Fix is to pass in the value of that flag to the DisplayList drawing
routines which take that flag into account when deciding whether
to quickReject any particular operation.

Issue #8659277 animation clipping

Change-Id: Ief568e4db01b533a97b3c5ea5ad777c03c0eea71
2013-04-19 15:36:37 -07:00
Victoria Lease
25df1a82a8 Merge "use appropriate fallback chain for style" into jb-mr2-dev 2013-04-17 16:23:38 +00:00
Jamie Gennis
6ad0452e63 Disable tracing from Zygote
This change disables all atrace tracing in Zygote immediately after it is
initialized.  This is necessary because Zygote has no way to receive
notifications that the enabled trace tags have been changed.  Tracing is
re-enabled when other processes fork from Zygote.

Change-Id: If2983858fb0c4890ba9ab041849b1c4d98f66c13
2013-04-16 22:15:21 +00:00
Jesse Hall
811d373444 Merge "Add android.opengl.GLES30, hidden for now" into jb-mr2-dev 2013-04-16 21:32:36 +00:00
Victoria Lease
cc0f9d8469 use appropriate fallback chain for style
TextLayoutShaper was defaulting to the Regular-style fallback chain
for all unknown scripts. This became problematic in that the
codepoint->glyphID enumeration stage of shaping was always using the
Regular-style fallback chain for unknown scripts, and there's no
guarantee that glyph indices are compatible between fallback chains.

Defaulting to a style-appropriate fallback chain addresses this
issue, and probably unreported but related issues, as well.

Bug: 8189208
Change-Id: I6ecf531c74d71a8e4a5359d23439ccc950b0cf80
2013-04-16 09:51:45 -07:00
Jesse Hall
d830e74ff4 Add android.opengl.GLES30, hidden for now
Bug: 8566953
Change-Id: Ia5a01d5e857b4fce12a451e2dcab0359758ad648
2013-04-15 17:37:33 -07:00
Dianne Hackborn
15fed390c4 Merge "Add new resources trace, also trace apk dex loading." into jb-mr2-dev 2013-04-12 23:58:50 +00:00
Dianne Hackborn
f7be4800df Add new resources trace, also trace apk dex loading.
Change-Id: Ia48566efb21ee018659bd976ddb3a0f4997b9a3a
2013-04-12 14:53:10 -07:00
Romain Guy
50b68bf836 Merge "Add async events tracing to android.os.Trace" into jb-mr2-dev 2013-04-12 20:58:00 +00:00
Jaikumar Ganesh
9a8df4dcf9 Add new sensor types.
1. Add uncalibrated gyros and magnetic field sensor.
2. Change max number of events from 3 to 16.
3. Add new APIs for trigger sensors.

Change-Id: Ifac5c0024c8e5f88b721e5cd97ff26afaaa36717
2013-04-11 10:25:35 -07:00
Romain Guy
9425f923fa Add async events tracing to android.os.Trace
Change-Id: I106a50732a88c03a00602c328f8b46626bf66e08
2013-04-10 16:35:48 -07:00
Derek Sollenberger
c37b63d6e7 Merge "Ensure that a canvas is always backed by some form of SkDevice." into jb-mr2-dev 2013-04-10 12:11:14 +00:00
Ying Wang
d8b26d6c42 Merge "Add liblog" into jb-mr2-dev 2013-04-10 05:16:14 +00:00
Ying Wang
d685894212 Add liblog
Bug: 8580410
Change-Id: I746aa8258866508c3a725d0773faf4518096548f
2013-04-09 21:54:12 -07:00
Derek Sollenberger
45fa0cbc54 Ensure that a canvas is always backed by some form of SkDevice.
bug: 8518884
Change-Id: Id6c597179878ce5b938c00422e88bef5f12e2e1f
2013-04-09 16:36:55 -04:00
Jamie Gennis
f9c7d6bc15 Add APIs for application-generated systrace events
This change adds new APIs to enable applications to generate custom Systrace
begin/end events.  Application-generated events use the ATRACE_APP_TAG tag,
which is enabled only if either the application has declared itself debuggable
in its manifest or ro.debuggable is set to 1 on the device.

Change-Id: I311d09e2e6ed1a30f5ffa84907f250e11cc0d48d
2013-04-09 11:59:43 -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
Jeff Brown
a4ca8ea0ad Fix reference cycle in InputEventReceiver and Sender.
If the receiver or sender was not properly disposed, then
the underlying input channel might be leaked because the
native peer was holding a strong reference to the object.

Switched to using a weak reference.

Also updated Binder to use a new helper created for this purpose.

Change-Id: I19680bf96d0548777bff02aa1d91874d1e8e41da
2013-04-02 18:59:15 -07:00
Michael Wright
10f9b0997e Start input event sequence numbers at 1
Change-Id: Ia69574cb25bfced8bbeefbc23350706bacdfee12
2013-04-01 13:11:34 -07:00
Victoria Lease
a4b68908bd Merge "bidiFlags != SkPaint::Flags" into jb-mr2-dev 2013-03-29 15:00:50 +00:00
Victoria Lease
626d3c2281 bidiFlags != SkPaint::Flags
We've a number of native functions in the text layout path that take
a bidiFlags argument. We've a number of callers of those functions
passing in SkPaint::Flags in that slot. This completely breaks text
directionality for the affected functions, as
SkPaint::kAntiAlias_Flag happens to share values with kBidi_RTL,
resulting in anti-aliased SkPaints measuring text as if it were RTL,
and non-anti-aliased SkPaints measuring text as if it were LTR,
regardless of the actual text directionality. Oops!

To address the issue, this commit replaces erroneous calls to
SkPaint.getFlags() with the value of Paint.mBidiFlags, and includes
the necessary plumbing to get that value where it needs to be.

Bug: 8471481
Change-Id: I2d04b70defed3130fc1ad13f4c9098f5fce4ffde
2013-03-28 15:56:14 -07:00
Jeff Brown
6c81a93ef3 Support specifying buffer start offset for USB requests.
Deprecated existing API which only supported passing buffer
and length in favor of a new one that also supports passing
the start.

Being able to pass a start index is very important because
the kernel imposes size limits on how much data can be transferred
at a time so we often need to transmit large buffers in chunks.

Change-Id: I3484b5e68f1ece61d4645ea04be8ee6a3b79169d
2013-03-28 03:13:09 -07:00
Jeff Brown
44e13ef1a1 Disable some noisy error logs.
Disabled some error logs that occur when an input channel is
closed remotely by its peer.  These can happen during normal
course of operations because the act of removing windows or
finishing IME sessions is asynchronous so both peers may react
to the change independently at different times.

The coordination with the input dispatcher is designed to
avoid logging these errors.  However it's not possible to achieve
the same coordination with the IME so we might as well silence
the errors since they don't tell us anything useful.

If something truly bad happens then one of two things will occur:

1. The system will realize that the process crashed because
   of a DeadObjectException or other error, so it will take
   measures to clean up.

2. If the error was spurious and non-fatal (how?) then at worst
   an ANR may occur because the consumer stopped reading from
   the input channel.  However this has never been observed
   and I doubt it's even possible.

Change-Id: I11a05d6d75e63e91be003971a544069b3a0d77f4
2013-03-27 12:34:30 -07:00
Jeff Brown
ca3d655d20 Merge "Use input transport for communications between app and IME." into jb-mr2-dev 2013-03-27 02:43:54 +00:00
Jeff Brown
c28867a1d6 Use input transport for communications between app and IME.
The input method manager service now supplies an input channel for
communication while creating an IME session on behalf of the
application.

This change significanly reduces the overhead of IME event dispatch
by using a standard input channel to send input events rather than
using binder.  This results in fewer thread context switches
and fewer object allocations.

What's more, the IME may perform additional batching of the motion
events that it receives which may help it catch up if it is
getting behind while processing them.

Bug: 7984576
Bug: 8473020
Change-Id: Ibe26311edd0060cdcae80194f1753482e635786f
2013-03-26 15:42:39 -07:00
Elliott Hughes
c5f790f3ba am 145e60b3: am 6c75deb5: Merge "Remove the fixed-length buffer in DdmHandleNativeHeap.getLeakInfo."
* commit '145e60b3e31f8daaf8e12dba0668c12e47968dd1':
  Remove the fixed-length buffer in DdmHandleNativeHeap.getLeakInfo.
2013-03-26 14:58:10 -07:00
Elliott Hughes
a480dafbf2 Remove the fixed-length buffer in DdmHandleNativeHeap.getLeakInfo.
It was possible to overrun this buffer, and even if you did fill
the buffer in a single read and exit the loop, the "string" still
wouldn't be terminated.

Bug: 8468088
Change-Id: Ia19f4d26dfd79e7b63807a7ec9540b932163d246
2013-03-26 13:18:52 -07:00
Chris Craik
a4e16c58c9 Restore final canvas state after deferred flush
bug:8450062

- Fixes overdraw indication with DeferredDisplayList
- Fixes drawHardwareLayer called after flush

Additionally changes drawLayer to pass its paint to native via setLayerPaint

Wrap flush in save/restore so that reordering doesn't affect final
transform

Change-Id: I08befa42c28500da6387699eefd4be28aedf9f4c
2013-03-22 11:54:51 -07:00
Kenny Root
afd10322f5 am d9520336: am 20345bd8: Merge "Update SELinux JNI to use helpers"
* commit 'd9520336a74560cdd983c9480b2e6a317dd8a193':
  Update SELinux JNI to use helpers
2013-03-20 16:08:11 -07:00
Fabrice Di Meglio
19eceaadd7 Merge "Fix bug #8437358 Clean any ICU related code from TextLayout / Paint and their dependencies" into jb-mr2-dev 2013-03-20 22:27:37 +00:00