2457 Commits

Author SHA1 Message Date
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
Kenny Root
cd19e3f2db Update SELinux JNI to use helpers
Change-Id: Ifc707eafd1ecbba64c93fa2250c4334d0ce40005
2013-03-20 15:24:25 -07:00
Chris Craik
4494599e5a Merge "Use snapshot alpha for layers" into jb-mr2-dev 2013-03-20 22:22:44 +00:00
Fabrice Di Meglio
665f02c667 Fix bug #8437358 Clean any ICU related code from TextLayout / Paint and their dependencies
- remove the ICU related methods and update the methods using the "reserved" argument
- update to CTS in another CL too

Change-Id: I5509736568c342d9d17bfeafc17951117ab5d3cc
2013-03-20 14:56:05 -07:00
Mathias Agopian
7c116b54b7 make Surface.java internal state thread-safe
it's still incorrect to use Surface from different
threads, however this shouldn't result to native crashes
anymore.

Bug: 8328715
Change-Id: I89ac5cc1218dc5aa0e35f8e6d4737879a442f0c6
2013-03-18 20:29:18 -07:00
Chris Craik
a08f95cfec Use snapshot alpha for layers
Removes mMultipliedAlpha, using the snapshot alpha for all
non-overlapping display list alpha control.

Additionally, fixes opacity issues where children of
hasOverlappingRendering=false displaylists (both hw layer sublists and
other sublists with hasOverlappingRendering=false)

Change-Id: I6adc16da855835f9f518f8967628e5d0135c789b
2013-03-15 17:29:27 -07:00
Fabrice Di Meglio
261f82ca99 Merge "Revert "Clean Paint.mBidiFlags as it is no longer used"" into jb-mr2-dev 2013-03-15 20:34:06 +00:00
Fabrice Di Meglio
2d93475c69 Merge "Revert "Fix bug #8194572 Chrome SIGBUS'es on launch around TextLayoutCacheKey"" into jb-mr2-dev 2013-03-15 20:33:49 +00:00
Fabrice Di Meglio
fe099074c4 Merge "Revert "fix argument mismatches in Paint JNI"" into jb-mr2-dev 2013-03-15 20:33:22 +00:00
Fabrice Di Meglio
da12f389eb Revert "Clean Paint.mBidiFlags as it is no longer used"
This reverts commit 6d9fe5bd22b531bfce69b146254a4791c76acddc.
2013-03-15 11:26:56 -07:00
Fabrice Di Meglio
19f46b0d7a Revert "Fix bug #8194572 Chrome SIGBUS'es on launch around TextLayoutCacheKey"
This reverts commit ebcacc785b0883c9435a3e850f790785fba93370.
2013-03-15 11:26:23 -07:00
Fabrice Di Meglio
a4bf8114a7 Revert "fix argument mismatches in Paint JNI"
This reverts commit b61fb10fe435b74a761e82f517abd0320f22193e.
2013-03-15 11:22:29 -07:00
Robert Greenwalt
28cdf1dc22 Don't update routes if Dhcp fails.
bug:8377625
Change-Id: I11d2c29728078813bfb1245cc46e8cce2b307a2c
2013-03-15 10:48:46 -07:00
Mathias Agopian
b1fa4f92dc Merge "fix CloseGuard usage in Surface" into jb-mr2-dev 2013-03-14 02:13:13 +00:00
Mathias Agopian
86e1bc7305 fix CloseGuard usage in Surface
Bug: 8375415
Change-Id: I03e9f318c2ad586f4bd93b280557ada66121d275
2013-03-13 18:21:11 -07:00
Mathias Agopian
065a118e0e Merge "Try to keep the same native Surface object when reading a parcel" into jb-mr2-dev 2013-03-13 23:54:34 +00:00
Mathias Agopian
c3b9cd6351 Try to keep the same native Surface object when reading a parcel
If the IGraphicBufferProducers are the same, it's really the same
window, so we keep the same native object.

Bug: 8322406
Change-Id: I96d55a90e6656a05d4e32ae22945226c350b5747
2013-03-13 16:07:57 -07:00
Jaikumar Ganesh
1aab1dbca5 Revert "Add new sensor types."
This reverts commit bc03a348d78326dee779a8ecc325799c9fceac98.
2013-03-13 15:00:21 -07:00
Mathias Agopian
2530b32de5 Merge "remove uses of Surface in favor of IGraphicBufferProducer" into jb-mr2-dev 2013-03-13 21:42:35 +00:00
Mathias Agopian
4a05f43698 remove uses of Surface in favor of IGraphicBufferProducer
Change-Id: I2ec590eed03c76a084ee6b0af362a3ca6476bf9f
2013-03-12 18:43:34 -07:00
Jaikumar Ganesh
bc03a348d7 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: I1957d723de2b65c31dadaee7386fd8d51ea2f7e5
2013-03-12 10:50:41 -07:00
Mathias Agopian
b1d90c8f60 fix JNI use of incStrong/decStrong
Change-Id: Ia11b404dea483dc19bbc30f4d7bcff516655e180
2013-03-06 17:48:20 -08:00
Elliott Hughes
bf49422197 am 582c5b85: am 690d3435: Merge "jni: remove obsolete flag from makefile"
* commit '582c5b85c5653d93afc63b00ac1efff94d0853ab':
  jni: remove obsolete flag from makefile
2013-03-05 22:43:07 +00:00
Bruce Beare
d625127db9 jni: remove obsolete flag from makefile
Change-Id: Ia7e67694a736745333e9d36396b8cb6194fd26ec
Signed-off-by: Bruce Beare <bruce.j.beare@intel.com>
2013-03-05 14:29:46 -08:00
Andy McFadden
0c361e9d3c Add eglPresentationTimeANDROID
Added EGL extension to set a timestamp on a surface.

Bug 8191230

Change-Id: Ie73bd7d1217348c9c64b8c68da38d671d48355f7
2013-03-05 11:16:10 -08:00
Mathias Agopian
0449a40586 screenshots can now go into a Surface from java
A Surface can trivially be created from a SurfaceTexture.
Update ElectronBeam to use this new API.

Bug: 6940974
Change-Id: I20459443d0d853e3f8ae23104c08d185c336abea
2013-03-04 17:45:26 -08:00
JP Abgrall
62f16bfc5e jni: net.TrafficStats: fix getIfaceStat, have it use the iface.
Missing iface8 in call to parseIfaceStats().

Bug: 8304054
Change-Id: Ibb01d86a0f7241cdd8f23401973840673f847efb
2013-03-04 18:53:07 +00:00
Nick Kralevich
e606757966 am edb95c3f: am 937cfa77: Merge "ZygoteInit: use correct header files."
* commit 'edb95c3f3ca4e51ef0432af925b8f4330e6dae81':
  ZygoteInit: use correct header files.
2013-03-01 17:41:53 +00:00
Romain Guy
8b5aa48469 Restore the ability to track native Surface changes
Bug #8230990

ViewRootImpl needs to know when the native Surface objects changes
to recreate the EGL surface. A recent refactoring in Surface broke
the behavior of getGenerationId(). This simply restores the old
behavior (every change increments the generation ID by 1.)

Change-Id: Ife1df1ffb2ee7a373b8ebf2431192702ba10f344
2013-02-28 18:16:31 -08:00
Nick Kralevich
b3c4a0bb5c ZygoteInit: use correct header files.
Don't define capget / capset when we already have definitions
of it in our header files.

Change-Id: Ia2d7e408879bd09019f99aef52acb63a7a243d48
2013-02-28 16:56:16 -08:00
Derek Sollenberger
5b6591c1d0 fix issue when replacement bitmap is larger than original.
getTotalClip() returns the canvas bounds even if no explicit clip
was set. This CL fixes that issue by only transfering clips that
were explicitly set to the new canvas.

bug: 8255582
Change-Id: I0144d430e7718151ad93d988fcf20b412f74b256
2013-02-28 11:18:50 -05:00
Ian Rogers
7e112d51c4 am 14d0ab55: am de3c20bc: Merge "Track stack memory in MemoryInfo."
* commit '14d0ab55e983d314128bb7b3293023f4a237d991':
  Track stack memory in MemoryInfo.
2013-02-27 20:09:25 +00:00
Ian Rogers
7c9f30bfb3 Track stack memory in MemoryInfo.
In /proc/pid/maps the main stack is identified as "[stack]". In Linux 3.4
thread stacks are identified as "[stack:<tid>]" where <tid> is the thread ID of
the thread using that stack. Add support in MemInfo's otherStats to track
memory being used by the stack.

Add sanity check on the length of the otherStats array.
Add detail messages to two null pointer exceptions.

Bug: 8265251

Change-Id: I2b228b147da9bdc5c7a4d825dfc628fcc7923927
2013-02-27 11:34:42 -08:00
Eino-Ville Talvala
c0e55bd3cf Merge "Camera and MediaRecorder: Support AppOps" into jb-mr2-dev 2013-02-26 01:36:05 +00:00
Mathias Agopian
19a38f6f40 Merge "Fix SurfaceControl.setDisplaySurface() such that it accepts a null Surface" into jb-mr2-dev 2013-02-26 00:55:25 +00:00
Mathias Agopian
ffddc9b804 Fix SurfaceControl.setDisplaySurface() such that it accepts a null Surface
also fix a typo that made us call the wrong Surface ctor

Bug: 8225509
Change-Id: I23f92179b6003d4c3e0febb35166c1caeafa27f5
2013-02-25 16:49:57 -08:00
Mathias Agopian
15284dee8e regenerate GLES java bindings
- added most missing validation checks
    - glGet* validation reimplement from khronos documentation

    Bug: 7402895

Change-Id: I92a805bb1aba1600d3372dc2db22eab08c975d7f
2013-02-25 16:48:44 -08:00
Ian Rogers
fec1178bbf am 92f3e9a1: am e88c0d9e: Merge "Recognize odex files in memory accounting."
* commit '92f3e9a1fba2873c00d1d89179c051a82e924d76':
  Recognize odex files in memory accounting.
2013-02-25 18:09:55 +00:00
Eino-Ville Talvala
788717ca59 Camera and MediaRecorder: Support AppOps
- Allow media processes to update AppOps state
- Pass package name to media services

Bug: 8181262
Change-Id: I115d39f0b306cb9eb7cd3d3e663c680b7322fd3f
2013-02-25 09:27:42 -08:00
Ian Rogers
9f8589c31f Recognize odex files in memory accounting.
Give odex files the same heap category as dex files.

Change-Id: I82539e20ac20a2b80c63c0cfceb266d9c59e22b7
2013-02-22 20:35:56 -08:00
Mathias Agopian
0d1ab1db22 Merge "regenerate egl/gles stubs from glgen" 2013-02-23 04:13:34 +00:00
Mathias Agopian
89be00bcda regenerate egl/gles stubs from glgen
those are minor cosmetic changes.

Change-Id: I84ee5383577f0ca33ed7cc32d03e53c1475f068d
2013-02-22 20:08:06 -08:00