2522 Commits

Author SHA1 Message Date
Elliott Hughes
42a4bb5730 Remove incorrect (and unused) capget code.
Note that if you revert this change, the code it removes is incorrect,
and doesn't handle the top 32 bits of capabilities, one of which we're
already using: CAP_BLOCK_SUSPEND.

Bug: 11508244
Change-Id: Ice1f51334bce4941c6d24d6016450a2ebcf92886
2013-11-07 22:35:23 -08:00
Elliott Hughes
c367d48c55 Fix a variety of small publicly-reported bugs.
Possible NULL dereference in cmds/bootanimation/BootAnimation.cpp.
https://code.google.com/p/android/issues/detail?id=61556

Missing fclose in core/jni/android_os_Debug.cpp.
https://code.google.com/p/android/issues/detail?id=61546

Bad loop guards in core/jni/android_util_Process.cpp.
https://code.google.com/p/android/issues/detail?id=61557

Assignment to wrong variable in libs/androidfw/AssetManager.cpp.
https://code.google.com/p/android/issues/detail?id=61560

Missing delete[]s in libs/androidfw/ObbFile.cpp.
https://code.google.com/p/android/issues/detail?id=61549

Leaks on error in tools/aapt/Images.cpp.
https://code.google.com/p/android/issues/detail?id=61552

Two missing fclose calls in tools/aapt/Resource.cpp.
https://code.google.com/p/android/issues/detail?id=61553

Missing fclose in tools/aidl/aidl.cpp.
https://code.google.com/p/android/issues/detail?id=61554

Change-Id: I5820f3824e72d07a9acb776cf0af3e7443f5694a
2013-10-29 13:12:55 -07:00
Mathieu Chartier
6ecb7a9a27 Fix whitespace issues after casts.
Change-Id: Ief3e50fbedd193e22509aac783f16ba1288908de
2013-10-18 11:04:31 -07:00
Mathieu Chartier
7384b428c4 Remove dependency on jniGetNonMovableArrayElements.
jniGetNonMovableArrayElements is not safe and is going to be deleted.

Change-Id: I6daae1e4ac9e01ca593cda522fdbeb774eef1eff
(cherry picked from commit 75a5038849cecf38aba72721272ff07cca09501f)
2013-10-18 10:58:25 -07:00
synergydev
01994c79f4 core: fix arithmetic on a pointer to void
Use char* instead of void* for this
pointer arithmetic. Fixes the following:

error: arithmetic on a pointer to void
buf = buf + offset;
      ~~~ ^

Change-Id: I6cfc92c9240fda66a52e780cda7820fdba76914a
2013-10-14 12:27:22 -07:00
Elliott Hughes
428d3fcbe3 Regenerate all the OpenGL stubs.
Bug: https://code.google.com/p/android/issues/detail?id=60390
Change-Id: I2e6f210178f656a5f08a1fcd4239581d680329a6
2013-09-24 17:15:41 -07:00
Chris Craik
28fe1ee579 Forward compatibility fix
Change-Id: Ib031372d43881a9bb7af1e51fb2c7cf55e03a326
2013-08-27 10:55:44 -07:00
Elliott Hughes
437e76208d The VM handles blocking SIGPIPE.
We don't need this any more.

Bug: 10211309
Change-Id: I8be0071d50296974e3861f8af9d2bae4f5678d5a
2013-08-21 13:56:15 -07:00
Elliott Hughes
a0b320a66f Merge "Remove possible leak when exception occurred." 2013-08-09 21:58:37 +00:00
Jean-Baptiste Queru
17548b3c70 Revert "be more robust with handling unknown sensors"
This reverts commit 80ba0a6baec17d5ac5a1e6f9e4b84f7d013d07e6.
2013-08-02 17:31:54 -07:00
Mathias Agopian
80ba0a6bae be more robust with handling unknown sensors
- add support for new sensors (post 4.3)
- don't crash when encountering an unknown sensor type
- clean-up

Bug: 9683153
Change-Id: Iecd883e8a7d0297be1bd2bd4f00c5cc3ffcbccfe
2013-08-02 13:49:41 -07:00
Elliott Hughes
6d4b1e24ae Switch Process.myTid over to the libcore JNI too.
Change-Id: I80eaecff014fabf809f4be3c9ee8b26aa64bf0cf
2013-07-31 17:38:11 -07:00
Jeff Hao
406ec15647 Replace native Process getpid/getuid with calls to libcore equivalents.
The Process natives were getting called were getting called while
handling a jdwp packet before the vm had a chance to register them.

(cherry-pick of 5bce6a308fc8a3c1e449cf905b8b6e8ace4ef3e2.)

Change-Id: Ia2b4f79b11e427283a712b2d0c52948f394640bf
2013-07-31 17:19:23 -07:00
Oliver Woodman
dae9aa3f37 am 9ad7b946: am 0661dd15: Merge "Expose latency methods through AudioManager and AudioTrack." into jb-mr2-dev
* commit '9ad7b946fe9a5dd706205e90046ddc1bd6cb8ad0':
  Expose latency methods through AudioManager and AudioTrack.
2013-07-02 01:33:56 -07:00
Oliver Woodman
e64716ad01 Expose latency methods through AudioManager and AudioTrack.
There's a longer term plan to fix audio/video sync, but
this gets the Java level to parity with the native level,
and allows applications in Java to achieve sync in the
same way as the native media player. APIs are left as hidden
for now.

Bug: 9587132
Change-Id: Iaf70baac1ffb50ef48e03355163158568fbd0fe9
2013-07-01 22:30:18 +01:00
Dianne Hackborn
1d4cd87904 am 11cd57ca: Merge "Avoid unnecessary FindClass("java/lang/String")."
* commit '11cd57caee4058dab743b91e715d7469c59a5c2f':
  Avoid unnecessary FindClass("java/lang/String").
2013-06-17 18:21:41 -07:00
Vladimir Marko
aa5fe3d206 Avoid unnecessary FindClass("java/lang/String").
Use previously retrieved global reference instead.
Check for NULL after creating the global reference.

Change-Id: I21670d2ef0f63ddb5801dd21e7e56359e5519479
2013-06-17 17:54:58 +01:00
Jeff Brown
e20fbc6feb am d6619ed8: Merge "Add a queue of pending finished input events." into jb-mr2-dev
* commit 'd6619ed89ff7e10b0b66aadc353cfea171929344':
  Add a queue of pending finished input events.
2013-05-22 15:46:57 -07:00
Geremy Condra
1b12ab0099 am 9c759e39: Merge "Fix SELinux get.. methods aborting on invalid address"
* commit '9c759e3968015c0d30a1a049754e4514adfdb565':
  Fix SELinux get.. methods aborting on invalid address
2013-05-22 13:03:21 -07:00
Jeff Brown
56513492ea Add a queue of pending finished input events.
Although in practice an application or IME is unlikely to fill up
the input channel with finish events, it can happen when events are
being delivered very rapidly.  Handle this situation by queuing
up the pending finish events until the socket becomes writable again.

Bug: 9034301
Change-Id: I938a62a75d12106a19cff2d016ba7af0db877ecf
2013-05-22 10:33:48 -07:00
Richard Haines
81ad284517 Fix SELinux get.. methods aborting on invalid address
SELinux get.. JNI need the 'security_context_t tmp' entries set
to NULL, otherwise on error freecon() tries to release uninitialised
memory causing apps to abort with invalid address.
Also fixed getPeerCon ALOGV call as this caused Zyote to abort when
verbose logging set.

Signed-off-by: Richard Haines <richard_c_haines@btinternet.com>
2013-05-22 15:12:16 +01:00
Romain Guy
25f6f4f5d0 am 3c1ad55f: Merge "Update Canvas.getClipBounds to not account for AA clips." into jb-mr2-dev
* commit '3c1ad55fcfa54c2c30073d07917da699d156dc58':
  Update Canvas.getClipBounds to not account for AA clips.
2013-05-17 14:12:43 -07:00
Derek Sollenberger
00a33a8ce8 Update Canvas.getClipBounds to not account for AA clips.
This preserves the existing behavior at the SDK level while skia
investigates a more comprehensive solution.

bug: 8986473
Change-Id: Ief82dcfd47f1ba08d28d43402b3c28694f94f2e4
2013-05-16 09:31:27 -04:00
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